vsyswin-ui 0.2.87 → 0.2.89
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/vsyswin-ui.common.js +61711 -57038
- package/lib/vsyswin-ui.common.js.map +1 -1
- package/lib/vsyswin-ui.umd.js +61711 -57038
- package/lib/vsyswin-ui.umd.js.map +1 -1
- package/lib/vsyswin-ui.umd.min.js +158 -158
- package/lib/vsyswin-ui.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/packages/search-bar/src/search-bar.vue +0 -81
package/package.json
CHANGED
|
@@ -123,12 +123,6 @@
|
|
|
123
123
|
<el-option v-for="opt in item.options" :key="opt.id" :label="opt.label" :value="opt.value"></el-option>
|
|
124
124
|
</el-select>
|
|
125
125
|
</template>
|
|
126
|
-
<template v-else-if="item.type === 'cascade'">
|
|
127
|
-
<span class="syswin-filter-item__name" v-if="item.name && !item.hideName">{{ item.name }}</span>
|
|
128
|
-
<el-cascader size="small" v-model="item.value" :placeholder="`请选择${item.name}`" :style="{
|
|
129
|
-
width: item.width ? item.width : '200px'
|
|
130
|
-
}" :options="item.options" :props="{ multiple: !!item.multiple, checkStrictly: !!item.checkStrictly }" collapse-tags clearable @change="handleChangeDateragne(idx, index)"></el-cascader>
|
|
131
|
-
</template>
|
|
132
126
|
<template v-else-if="item.type === 'slot'">
|
|
133
127
|
<slot :name="item.slot" :item="item">内容为空</slot>
|
|
134
128
|
</template>
|
|
@@ -236,12 +230,6 @@
|
|
|
236
230
|
<el-option v-for="opt in item.options" :key="opt.id" :label="opt.label" :value="opt.value"></el-option>
|
|
237
231
|
</el-select>
|
|
238
232
|
</template>
|
|
239
|
-
<template v-else-if="item.type === 'cascade'">
|
|
240
|
-
<span class="syswin-filter-item__name" v-if="item.name && !item.hideName">{{ item.name }}</span>
|
|
241
|
-
<el-cascader size="small" v-model="item.value" :placeholder="`请选择${item.name}`" :style="{
|
|
242
|
-
width: item.width ? item.width : '200px'
|
|
243
|
-
}" :options="item.options" :props="{ multiple: !!item.multiple, checkStrictly: !!item.checkStrictly }" collapse-tags clearable @change="handleChangeDateragne(idx, index)"></el-cascader>
|
|
244
|
-
</template>
|
|
245
233
|
<template v-else-if="item.type === 'slot'">
|
|
246
234
|
<slot :name="item.slot" :item="item">内容为空</slot>
|
|
247
235
|
</template>
|
|
@@ -336,12 +324,6 @@
|
|
|
336
324
|
<el-option v-for="opt in item.options" :key="opt.id" :label="opt.label" :value="opt.value"></el-option>
|
|
337
325
|
</el-select>
|
|
338
326
|
</template>
|
|
339
|
-
<template v-else-if="item.type === 'cascade'">
|
|
340
|
-
<span class="syswin-filter-item__name" v-if="item.name && !item.hideName">{{ item.name }}</span>
|
|
341
|
-
<el-cascader size="small" v-model="item.value" :placeholder="`请选择${item.name}`" :style="{
|
|
342
|
-
width: item.width ? item.width : '200px'
|
|
343
|
-
}" :options="item.options" :props="{ multiple: !!item.multiple, checkStrictly: !!item.checkStrictly }" collapse-tags clearable @change="handleChangeDateragne(idx, index + maxConditionLength)"></el-cascader>
|
|
344
|
-
</template>
|
|
345
327
|
<template v-else-if="item.type === 'slot'">
|
|
346
328
|
<slot :name="item.slot" :item="item">内容为空</slot>
|
|
347
329
|
</template>
|
|
@@ -404,31 +386,6 @@ function deepCopyFunction(arr1, arr2) {
|
|
|
404
386
|
}
|
|
405
387
|
}
|
|
406
388
|
}
|
|
407
|
-
function findTree(allData, fn) {
|
|
408
|
-
function loopFn(arr, pNode) {
|
|
409
|
-
for (let i = 0; i < arr.length; i++) {
|
|
410
|
-
// debugger
|
|
411
|
-
let result = null
|
|
412
|
-
const item = arr[i]
|
|
413
|
-
item.nodes = [item]
|
|
414
|
-
if (pNode) {
|
|
415
|
-
item.nodes = [...pNode.nodes, item]
|
|
416
|
-
}
|
|
417
|
-
// findTree(item.options, tItem => tItem.value === lastValue)
|
|
418
|
-
const flag = fn(item)
|
|
419
|
-
if (flag) {
|
|
420
|
-
result = item
|
|
421
|
-
if (result) return result
|
|
422
|
-
}
|
|
423
|
-
if (item.children) {
|
|
424
|
-
result = loopFn(item.children, item)
|
|
425
|
-
}
|
|
426
|
-
if (result) return result
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
const res = loopFn(allData)
|
|
430
|
-
return res
|
|
431
|
-
}
|
|
432
389
|
|
|
433
390
|
export default {
|
|
434
391
|
name: 'SySearchbar',
|
|
@@ -644,25 +601,6 @@ export default {
|
|
|
644
601
|
} else {
|
|
645
602
|
obj.name = item.options.find((x) => x.value === item.value).label
|
|
646
603
|
}
|
|
647
|
-
} else if (item.type === 'cascade') {
|
|
648
|
-
if (!item.value) return
|
|
649
|
-
if (item.multiple) {
|
|
650
|
-
if (!item.value.length) {
|
|
651
|
-
return
|
|
652
|
-
}
|
|
653
|
-
// const valueOptions = item.value.map((x) => item.options.find((f) => f.value === x))
|
|
654
|
-
const valueOptions = item.value.map((x) => {
|
|
655
|
-
// console.log('xxxxxxxxxxxxx', x) // 这里的x是个数组
|
|
656
|
-
const lastValue = x[x.length - 1]
|
|
657
|
-
const find = findTree(item.options, tItem => tItem.value === lastValue)
|
|
658
|
-
return find
|
|
659
|
-
})
|
|
660
|
-
obj.name = valueOptions.map((x) => x.nodes.map(y => y.label).join('/')).join(',')
|
|
661
|
-
} else {
|
|
662
|
-
const lastValue = item.value[item.value.length - 1]
|
|
663
|
-
const find = findTree(item.options, tItem => tItem.value === lastValue)
|
|
664
|
-
obj.name = find ? find.nodes.map(y => y.label).join('/') : ''
|
|
665
|
-
}
|
|
666
604
|
} else if (item.type === 'slot') {
|
|
667
605
|
if (!item.getValue) return
|
|
668
606
|
const info = item.getValue() // 这里不能直接调,因为是深拷贝过来的
|
|
@@ -749,9 +687,6 @@ export default {
|
|
|
749
687
|
if (item.type === 'select') {
|
|
750
688
|
item.value = item.multiple ? [] : null
|
|
751
689
|
}
|
|
752
|
-
if (item.type === 'cascade') {
|
|
753
|
-
item.value = item.multiple ? [] : null
|
|
754
|
-
}
|
|
755
690
|
if (item.type === 'slot') {
|
|
756
691
|
item.setValue({ name: '', value: '' })
|
|
757
692
|
}
|
|
@@ -784,9 +719,6 @@ export default {
|
|
|
784
719
|
if (item.type === 'select') {
|
|
785
720
|
item.value = item.multiple ? [] : null
|
|
786
721
|
}
|
|
787
|
-
if (item.type === 'cascade') {
|
|
788
|
-
item.value = item.multiple ? [] : null
|
|
789
|
-
}
|
|
790
722
|
if (item.type === 'slot') {
|
|
791
723
|
item.setValue({ name: '', value: '' })
|
|
792
724
|
}
|
|
@@ -826,13 +758,6 @@ export default {
|
|
|
826
758
|
item.value = null
|
|
827
759
|
}
|
|
828
760
|
}
|
|
829
|
-
if (item.type === 'cascade') {
|
|
830
|
-
if (item.multiple) {
|
|
831
|
-
item.value = []
|
|
832
|
-
} else {
|
|
833
|
-
item.value = null
|
|
834
|
-
}
|
|
835
|
-
}
|
|
836
761
|
item.type === 'slot' && item.setValue({ value: '', name: '' })
|
|
837
762
|
})
|
|
838
763
|
})
|
|
@@ -915,9 +840,6 @@ export default {
|
|
|
915
840
|
if (item.type === 'select') {
|
|
916
841
|
item.value = item.multiple ? [] : null
|
|
917
842
|
}
|
|
918
|
-
if (item.type === 'cascade') {
|
|
919
|
-
item.value = item.multiple ? [] : null
|
|
920
|
-
}
|
|
921
843
|
}
|
|
922
844
|
})
|
|
923
845
|
this.$set(this.currentSearchList, parentIndex, parentItem)
|
|
@@ -998,9 +920,6 @@ export default {
|
|
|
998
920
|
v.value = ele.value
|
|
999
921
|
}
|
|
1000
922
|
if (ele.value) v.isActive = true
|
|
1001
|
-
} else if (v.type === 'cascade') {
|
|
1002
|
-
v.value = ele.value
|
|
1003
|
-
if (ele.value) v.isActive = true
|
|
1004
923
|
} else if (v.type === 'month' || v.type === 'year') {
|
|
1005
924
|
v.value = ele.value
|
|
1006
925
|
if (ele.value) v.isActive = true
|