n20-project-component 1.0.3 → 1.0.6
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/README.en.md +36 -0
- package/README.md +111 -137
- package/dist/img/document.7be80bd0.svg +8 -0
- package/dist/img/folder.4094ac0a.svg +9 -0
- package/dist/img/plus.c03dbfda.svg +3 -0
- package/dist/n20-project-component.common.js +94828 -671
- package/dist/n20-project-component.common.vendors~vuedraggable.js +6175 -0
- package/dist/n20-project-component.css +1 -1
- package/dist/n20-project-component.umd.js +94832 -675
- package/dist/n20-project-component.umd.min.js +33 -1
- package/dist/n20-project-component.umd.min.vendors~vuedraggable.js +8 -0
- package/dist/n20-project-component.umd.vendors~vuedraggable.js +6175 -0
- package/package.json +69 -65
- package/src/components/DemoButton/index.vue +74 -74
- package/src/components/N20CopyText/index.vue +133 -133
- package/src/components/N20FloatingToolbar/index.vue +318 -318
- package/src/components/ProFilterView/AdvancedFilter/filterItem.vue +64 -0
- package/src/components/ProFilterView/AdvancedFilter/formItemRender.vue +847 -0
- package/src/components/ProFilterView/AdvancedFilter/index.vue +899 -0
- package/src/components/ProFilterView/index.vue +634 -0
- package/src/components/ProFilterView/plus.svg +3 -0
- package/src/index.js +48 -45
- package/src/styles/variables.scss +30 -30
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-checkbox-group v-model="checkArrayCalc" :max="maxLength" class="popover-check-box" @change="checkChange">
|
|
3
|
+
<vue-draggable
|
|
4
|
+
:list="filterList"
|
|
5
|
+
:animation="200"
|
|
6
|
+
group="dragBox"
|
|
7
|
+
:handle="'.n20-icon-tuodong'"
|
|
8
|
+
@change="dragChange"
|
|
9
|
+
>
|
|
10
|
+
<div v-for="(item, index) in filterList" :key="index" class="n20-drag-list-item">
|
|
11
|
+
<el-checkbox :disabled="item.static" :label="item.id" :checked="item.checked">{{ item.label }}</el-checkbox
|
|
12
|
+
><i class="n20-drag-icon n20-icon-tuodong"></i>
|
|
13
|
+
</div>
|
|
14
|
+
</vue-draggable>
|
|
15
|
+
</el-checkbox-group>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
import importGlobal from 'n20-common-lib/src/utils/importGlobal.js'
|
|
20
|
+
export default {
|
|
21
|
+
name: 'FilterItem',
|
|
22
|
+
components: {
|
|
23
|
+
vueDraggable: () => importGlobal('vuedraggable', () => import(/*webpackChunkName: "vuedraggable"*/ 'vuedraggable'))
|
|
24
|
+
},
|
|
25
|
+
props: {
|
|
26
|
+
filterList: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default: () => []
|
|
29
|
+
},
|
|
30
|
+
checkArray: {
|
|
31
|
+
type: Array,
|
|
32
|
+
default: () => []
|
|
33
|
+
},
|
|
34
|
+
maxLength: {
|
|
35
|
+
type: Number
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
computed: {
|
|
39
|
+
checkArrayCalc: {
|
|
40
|
+
get() {
|
|
41
|
+
return this.checkArray
|
|
42
|
+
},
|
|
43
|
+
set(value) {
|
|
44
|
+
// 处理初始化时候的报错
|
|
45
|
+
if (typeof value !== 'boolean') {
|
|
46
|
+
this.$emit('update:checkArray', value)
|
|
47
|
+
}
|
|
48
|
+
return value
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
methods: {
|
|
53
|
+
checkChange(keys) {
|
|
54
|
+
if (keys.length > this.maxLength) {
|
|
55
|
+
return this.$message.warning(`${$lc('最多只能添加')}${this.maxLength}${$lc('个')}${$lc('筛选条件!')}`)
|
|
56
|
+
}
|
|
57
|
+
this.$emit('checked', keys)
|
|
58
|
+
},
|
|
59
|
+
dragChange() {
|
|
60
|
+
this.$emit('checked', this.checkArrayCalc)
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
</script>
|