...
|
...
|
@@ -27,6 +27,10 @@ |
|
|
let locationQuery = qs(decodeURIComponent(location.search.replace(/^\?/, '')));
|
|
|
let hasSort = !!locationQuery.sort;
|
|
|
|
|
|
const aliasMap = {
|
|
|
groupSort: 'sort'
|
|
|
};
|
|
|
|
|
|
module.exports = {
|
|
|
props: {
|
|
|
config: Object,
|
...
|
...
|
@@ -97,13 +101,14 @@ |
|
|
setParams: function(item) {
|
|
|
let sortType = this.subType;
|
|
|
|
|
|
if (this.subType === 'groupSort') {
|
|
|
sortType = 'sort';
|
|
|
}
|
|
|
aliasMap[this.subType] && (sortType = aliasMap[this.subType]);
|
|
|
|
|
|
this.$set(`params.${sortType}`, item);
|
|
|
},
|
|
|
|
|
|
showLabel: function(key) {
|
|
|
aliasMap[key] && (key = aliasMap[key]);
|
|
|
|
|
|
const newSelected = this.params[key];
|
|
|
const oldSelected = this.selected[key];
|
|
|
|
...
|
...
|
@@ -114,24 +119,6 @@ |
|
|
}
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
|
unifyTxt: function(val, category) {
|
|
|
let txt = '';
|
|
|
let arr = [];
|
|
|
let foo = $.noop;
|
|
|
|
|
|
|
|
|
if ($.isArray(val)) { // [{categoryName,..},{}..]
|
|
|
foo = (index, obj) => {
|
|
|
arr.push(obj[category + 'Name']);
|
|
|
};
|
|
|
}
|
|
|
|
|
|
$.each(val, foo);
|
|
|
txt = arr.join(',');
|
|
|
return txt;
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
const self = this;
|
|
|
|
...
|
...
|
|