search.page.js
665 Bytes
const Vue = require('yoho-vue');
const $ = require('yoho-jquery');
const search = require('product/search.vue');
$(function() {
const buildSort = function() {
return [
{
txt: '默认',
val: 1
}, {
txt: '最新',
val: 2
}, {
type: 'updown',
txt: '价格',
val: [3, 4] // [up, down]
},
{
type: 'updown',
txt: '折扣',
val: [5, 6]
}
];
};
let app = new Vue(search);
app.sortConfig = buildSort();
});