mooho-base-admin-plus 2.4.38 → 2.4.39

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": "2.4.38",
4
+ "version": "2.4.39",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- <Form ref="form" :model="data" label-position="top" label-colon=":" class="ivu-mt draggable">
3
+ <Form ref="form" :model="data" label-position="top" label-colon=":" class="ivu-mt">
4
4
  <draggable
5
5
  v-model="columns"
6
6
  item-key="index"
@@ -765,7 +765,7 @@
765
765
  default: false
766
766
  },
767
767
  /**
768
- * 筛选
768
+ * 筛选(即将废弃)
769
769
  */
770
770
  filter: {
771
771
  type: Object,
@@ -4,7 +4,7 @@
4
4
  <PageHeader :title="$route.meta.title" :content="$route.meta.description" hidden-breadcrumb />
5
5
  </div>
6
6
  <Card :bordered="false" dis-hover class="ivu-mt">
7
- <view-table ref="table" :filter="filter" view-code="TodoList">
7
+ <view-table ref="table" view-code="TodoList">
8
8
  <template #command="{ row }">
9
9
  <Button size="small" :title="$t('Front_Btn_Detail')" type="info" custom-icon="fa fa-file-alt" @click="$refs.taskForm.open(row)"></Button>
10
10
  </template>
@@ -22,16 +22,17 @@
22
22
  mixins: [mixinPage],
23
23
  components: { taskForm },
24
24
  data() {
25
- return {
26
- filter: {}
27
- };
25
+ return {};
28
26
  },
29
27
  computed: {},
30
28
  created() {
31
- for (let key in this.$route.query) {
32
- this.filter[key] = this.$route.query[key];
33
- }
29
+ setTimeout(() => {
30
+ for (let key in this.$route.query) {
31
+ this.$refs.table.filterData[key] = this.$route.query[key];
32
+ }
33
+ });
34
34
  },
35
35
  methods: {}
36
36
  };
37
37
  </script>
38
+ e
@@ -7,7 +7,6 @@
7
7
  <view-table
8
8
  ref="table"
9
9
  view-code="Permission"
10
- :filter="filter"
11
10
  :selectEnable="true"
12
11
  :tree-enable="true"
13
12
  :tree-load="row => onTreeLoad(row)"
@@ -53,10 +52,7 @@
53
52
  components: {},
54
53
  data() {
55
54
  return {
56
- data: null,
57
- filter: {
58
- parentID: 'null'
59
- }
55
+ data: null
60
56
  };
61
57
  },
62
58
  computed: {},
@@ -172,16 +168,19 @@
172
168
  }
173
169
  },
174
170
  beforeLoadData() {
175
- if (!(this.filter['keyword'] || '').trim()) {
171
+ let filterData = this.$refs.table.filterData;
172
+
173
+ if (!(filterData['keyword'] || '').trim()) {
176
174
  // 普通查询,只查询顶层包装
177
- this.filter['parentID'] = 'null';
175
+ filterData['parentID'] = 'null';
178
176
  } else {
179
177
  // 根据关键词查询,查询所有层级
180
- this.filter['parentID'] = null;
178
+ filterData['parentID'] = null;
181
179
  }
182
180
  },
183
181
  async onLoadData() {
184
- if (!!(this.filter['keyword'] || '').trim()) {
182
+ let filterData = this.$refs.table.filterData;
183
+ if (!!(filterData['keyword'] || '').trim()) {
185
184
  // 根据关键词查询的结果,递归查找所有上层
186
185
  let data = this.$refs.table.data;
187
186
  if (data.length > 0) {