xianniu-ui 0.3.28 → 0.3.30

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,6 +1,6 @@
1
1
  {
2
2
  "name": "xianniu-ui",
3
- "version": "0.3.28",
3
+ "version": "0.3.30",
4
4
  "private": false,
5
5
  "main": "lib/xianniu-ui.umd.min.js",
6
6
  "scripts": {
@@ -107,7 +107,7 @@
107
107
  type="text"
108
108
  @click="isColl = !isColl"
109
109
  >
110
- <template v-if="showColl">
110
+ <template v-if="_showColl">
111
111
  <span>{{ isColl ? "收起" : "高级查询" }}</span
112
112
  ><i class="ml-5" :class="toggle"></i>
113
113
  </template>
@@ -139,8 +139,23 @@ export default {
139
139
  type: Boolean,
140
140
  default: true,
141
141
  },
142
+ defaultColl: {
143
+ type: Number,
144
+ default: 3,
145
+ },
142
146
  },
143
147
  computed: {
148
+ _showColl() {
149
+ const {
150
+ form: { value },
151
+ defaultColl,
152
+ showColl,
153
+ } = this;
154
+ if (value.length <= defaultColl) {
155
+ return false;
156
+ }
157
+ return showColl;
158
+ },
144
159
  col() {
145
160
  const { span } = this;
146
161
  return {
@@ -220,7 +235,7 @@ export default {
220
235
  this.form.value = [];
221
236
  for (let i = 0, formData = this.formData; i < formData.length; i++) {
222
237
  const item = formData[i];
223
- item.isShow = i > 3 && this.showColl ? false : true;
238
+ item.isShow = i >= this.defaultColl && this.showColl ? false : true;
224
239
  this.form.value.push({
225
240
  ...item,
226
241
  key: item.prop,
@@ -8,7 +8,7 @@
8
8
  <el-button
9
9
  type="text"
10
10
  v-show="selectedData.length"
11
- class="ml-5"
11
+ class="ml-5 pt-0 pb-0"
12
12
  size="mini"
13
13
  @click="clearSelection"
14
14
  >取消</el-button