mooho-base-admin-plus 0.4.53 → 0.4.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "0.4.53",
4
+ "version": "0.4.54",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "dotnetVersion": "1.4.0",
7
7
  "license": "MIT",
@@ -173,6 +173,22 @@
173
173
  filter[key] = staticData[key];
174
174
  }
175
175
 
176
+ // 排序
177
+ if (this.tableView.sorting) {
178
+ // 排序
179
+ let obj = JSON.parse(this.tableView.sorting);
180
+ let arr = [];
181
+ for (let key in obj) {
182
+ if (obj[key] === 'desc') {
183
+ arr.push('-' + key);
184
+ } else {
185
+ arr.push('+' + key);
186
+ }
187
+ }
188
+
189
+ filter.orderBy = arr.join(',');
190
+ }
191
+
176
192
  if (this.tableView.isGroupBy) {
177
193
  filter.isGroupBy = true;
178
194
  filter.groupColumn = JSON.parse(this.tableView.groupColumn);