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/lib/xianniu-ui.common.js +45 -30
- package/lib/xianniu-ui.umd.js +45 -30
- package/lib/xianniu-ui.umd.min.js +2 -2
- package/package.json +1 -1
- package/packages/search/main.vue +17 -2
- package/packages/table/main.vue +1 -1
package/package.json
CHANGED
package/packages/search/main.vue
CHANGED
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
type="text"
|
|
108
108
|
@click="isColl = !isColl"
|
|
109
109
|
>
|
|
110
|
-
<template v-if="
|
|
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
|
|
238
|
+
item.isShow = i >= this.defaultColl && this.showColl ? false : true;
|
|
224
239
|
this.form.value.push({
|
|
225
240
|
...item,
|
|
226
241
|
key: item.prop,
|