meixioacomponent 0.3.39 → 0.3.42
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/meixioacomponent.common.js +582 -563
- package/lib/meixioacomponent.umd.js +582 -563
- package/lib/meixioacomponent.umd.min.js +28 -28
- package/lib/style/element/index.css +2 -21
- package/lib/style/index.less +5 -1
- package/package.json +1 -1
- package/packages/components/base/baseIcon/index.vue +49 -45
- package/packages/components/base/baseLineInfoItem/baseLineInfoItem.vue +33 -30
- package/packages/components/base/basePopoverButton/index.vue +15 -19
- package/packages/components/proForm/proForm/pro_form.vue +16 -14
- package/packages/components/proForm/proForm/pro_form_item.vue +15 -3
- package/packages/components/proPageTable/oa_pro_colum_config.vue +81 -92
- package/packages/components/proPageTable/oa_pro_handle_table_border.vue +45 -38
- package/packages/components/proPageTable/oa_pro_table-header.vue +23 -21
- package/packages/components/proPageTable/oa_pro_table.vue +93 -91
- package/packages/components/style/element/index.css +2 -21
- package/packages/components/style/index.less +5 -1
- package/src/App.vue +14 -12
- package/src/component/test.vue +24 -1
- package/src/test.js +3 -3
|
@@ -1,112 +1,103 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<base-popover-button
|
|
3
|
+
iconClass="element"
|
|
4
|
+
v-model="popoverFlag"
|
|
5
|
+
@popoverShow="setDragConfigList"
|
|
6
|
+
buttonIcon="el-icon-s-operation"
|
|
7
7
|
>
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
8
|
+
<div class="config-wrap" slot="popoverContent">
|
|
9
|
+
<span class="tips-text">显示列表项</span>
|
|
10
|
+
<div class="config-content">
|
|
11
|
+
<!-- 显示被固定在头部的列表 -->
|
|
12
|
+
<div class="fixed">
|
|
13
|
+
<div
|
|
14
|
+
class="config-item-wrap"
|
|
15
|
+
:key="index"
|
|
16
|
+
v-for="(item, index) in lockConfigList"
|
|
17
|
+
>
|
|
18
|
+
<div class="item-left" @click="showTableColum(item)">
|
|
19
|
+
<el-checkbox
|
|
20
|
+
v-model="item.show"
|
|
21
|
+
:disabled="item.lock ? true : false"
|
|
22
|
+
></el-checkbox>
|
|
23
|
+
<span class="item-text">{{ item.label }}</span>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
<!-- 可以拖拽的列表 -->
|
|
28
|
+
|
|
29
|
+
<div class="drag">
|
|
30
|
+
<draggable
|
|
31
|
+
element="div"
|
|
32
|
+
v-model="dragConfigList"
|
|
33
|
+
animation="500"
|
|
34
|
+
@start="onStart"
|
|
35
|
+
@end="onEnd"
|
|
36
|
+
>
|
|
21
37
|
<div
|
|
22
38
|
class="config-item-wrap"
|
|
23
39
|
:key="index"
|
|
24
|
-
v-for="(item, index) in
|
|
40
|
+
v-for="(item, index) in dragConfigList"
|
|
25
41
|
>
|
|
26
|
-
<div class="item-left" @click="showTableColum(item)">
|
|
42
|
+
<div class="item-left" @click.self="showTableColum(item)">
|
|
27
43
|
<el-checkbox
|
|
28
44
|
v-model="item.show"
|
|
29
|
-
:disabled="item.lock
|
|
45
|
+
:disabled="item.lock"
|
|
30
46
|
></el-checkbox>
|
|
31
47
|
<span class="item-text">{{ item.label }}</span>
|
|
32
48
|
</div>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
element="div"
|
|
40
|
-
v-model="dragConfigList"
|
|
41
|
-
animation="500"
|
|
42
|
-
@start="onStart"
|
|
43
|
-
@end="onEnd"
|
|
44
|
-
>
|
|
45
|
-
<div
|
|
46
|
-
class="config-item-wrap"
|
|
47
|
-
:key="index"
|
|
48
|
-
v-for="(item, index) in dragConfigList"
|
|
49
|
-
>
|
|
50
|
-
<div class="item-left" @click.self="showTableColum(item)">
|
|
51
|
-
<el-checkbox
|
|
52
|
-
v-model="item.show"
|
|
53
|
-
:disabled="item.lock"
|
|
54
|
-
></el-checkbox>
|
|
55
|
-
<span class="item-text">{{ item.label }}</span>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="item-right">
|
|
58
|
-
<base-icon
|
|
59
|
-
:name="`meixicomponenticon-tuozhuai`"
|
|
60
|
-
:size="`s`"
|
|
61
|
-
:color="`m`"
|
|
62
|
-
></base-icon>
|
|
63
|
-
</div>
|
|
49
|
+
<div class="item-right">
|
|
50
|
+
<base-icon
|
|
51
|
+
:name="`meixicomponenticon-tuozhuai`"
|
|
52
|
+
:size="`s`"
|
|
53
|
+
:color="`m`"
|
|
54
|
+
></base-icon>
|
|
64
55
|
</div>
|
|
65
|
-
</
|
|
66
|
-
</
|
|
56
|
+
</div>
|
|
57
|
+
</draggable>
|
|
67
58
|
</div>
|
|
68
|
-
<baseButtonHandle
|
|
69
|
-
:align="`end`"
|
|
70
|
-
:size="`mini`"
|
|
71
|
-
class="config-footer"
|
|
72
|
-
:config="handleConfig"
|
|
73
|
-
></baseButtonHandle>
|
|
74
59
|
</div>
|
|
75
|
-
|
|
76
|
-
|
|
60
|
+
<baseButtonHandle
|
|
61
|
+
:align="`end`"
|
|
62
|
+
:size="`mini`"
|
|
63
|
+
class="config-footer"
|
|
64
|
+
:config="handleConfig"
|
|
65
|
+
></baseButtonHandle>
|
|
66
|
+
</div>
|
|
67
|
+
</base-popover-button>
|
|
77
68
|
</template>
|
|
78
69
|
|
|
79
70
|
<script>
|
|
80
|
-
import draggable from
|
|
81
|
-
|
|
82
|
-
import baseButtonHandle from "../base/baseButtonHandle/baseButtonHandle.vue";
|
|
71
|
+
import draggable from 'vuedraggable'
|
|
72
|
+
import baseButtonHandle from '../base/baseButtonHandle/baseButtonHandle.vue'
|
|
83
73
|
export default {
|
|
84
74
|
data() {
|
|
85
75
|
return {
|
|
76
|
+
isDrag: false,
|
|
86
77
|
handleConfig: [],
|
|
87
78
|
dragConfigList: [],
|
|
88
|
-
|
|
89
|
-
}
|
|
79
|
+
popoverFlag: false,
|
|
80
|
+
}
|
|
90
81
|
},
|
|
91
82
|
created() {
|
|
92
83
|
this.handleConfig = [
|
|
93
84
|
{
|
|
94
|
-
text:
|
|
95
|
-
type:
|
|
85
|
+
text: '取消',
|
|
86
|
+
type: 'info',
|
|
96
87
|
plain: true,
|
|
97
88
|
click: () => {
|
|
98
|
-
this
|
|
89
|
+
this.popoverFlag = false
|
|
99
90
|
},
|
|
100
91
|
},
|
|
101
92
|
{
|
|
102
|
-
text:
|
|
103
|
-
type:
|
|
93
|
+
text: '确定',
|
|
94
|
+
type: 'primary',
|
|
104
95
|
plain: false,
|
|
105
96
|
click: () => {
|
|
106
|
-
this.setTableHeaderConfig()
|
|
97
|
+
this.setTableHeaderConfig()
|
|
107
98
|
},
|
|
108
99
|
},
|
|
109
|
-
]
|
|
100
|
+
]
|
|
110
101
|
},
|
|
111
102
|
components: {
|
|
112
103
|
draggable,
|
|
@@ -121,42 +112,40 @@ export default {
|
|
|
121
112
|
computed: {
|
|
122
113
|
lockConfigList() {
|
|
123
114
|
return this.$props.config.filter((item) => {
|
|
124
|
-
return item.lock
|
|
125
|
-
})
|
|
115
|
+
return item.lock
|
|
116
|
+
})
|
|
126
117
|
},
|
|
127
118
|
},
|
|
128
119
|
methods: {
|
|
129
120
|
onEnd() {
|
|
130
|
-
this.isDrag = true
|
|
121
|
+
this.isDrag = true
|
|
131
122
|
},
|
|
132
123
|
onStart() {},
|
|
133
|
-
setDragConfigList(
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
});
|
|
140
|
-
}
|
|
124
|
+
setDragConfigList() {
|
|
125
|
+
this.isDrag = false
|
|
126
|
+
this.dragConfigList = []
|
|
127
|
+
this.dragConfigList = this.$props.config.filter((item) => {
|
|
128
|
+
return item.key != 'noData' && !item.lock
|
|
129
|
+
})
|
|
141
130
|
},
|
|
142
131
|
showTableColum(item) {
|
|
143
|
-
if (item.lock) return
|
|
144
|
-
item.show = !item.show
|
|
132
|
+
if (item.lock) return
|
|
133
|
+
item.show = !item.show
|
|
145
134
|
},
|
|
146
135
|
setTableHeaderConfig() {
|
|
147
136
|
if (this.isDrag) {
|
|
148
|
-
this.$emit(
|
|
137
|
+
this.$emit('setTableHeaderConfig', this.dragConfigList)
|
|
149
138
|
}
|
|
150
|
-
this
|
|
139
|
+
this.popoverFlag = false
|
|
151
140
|
},
|
|
152
141
|
},
|
|
153
|
-
}
|
|
142
|
+
}
|
|
154
143
|
</script>
|
|
155
144
|
|
|
156
145
|
<style lang="less" scoped>
|
|
157
146
|
.config-wrap {
|
|
158
147
|
width: 240px;
|
|
159
|
-
height:
|
|
148
|
+
min-height: 66px;
|
|
160
149
|
max-height: 370px;
|
|
161
150
|
background: inherit;
|
|
162
151
|
box-sizing: border-box;
|
|
@@ -170,7 +159,7 @@ export default {
|
|
|
170
159
|
.config-content {
|
|
171
160
|
width: 100%;
|
|
172
161
|
overflow-y: auto;
|
|
173
|
-
max-height: calc(
|
|
162
|
+
max-height: calc(370px - 56px);
|
|
174
163
|
.config-item-wrap {
|
|
175
164
|
width: 100%;
|
|
176
165
|
height: 34px;
|
|
@@ -8,8 +8,11 @@
|
|
|
8
8
|
:label="`开启斑马条纹:`"
|
|
9
9
|
>
|
|
10
10
|
<template slot="lineInforSlot">
|
|
11
|
-
<base-toggle
|
|
12
|
-
|
|
11
|
+
<base-toggle
|
|
12
|
+
v-model="stripe"
|
|
13
|
+
:toggleList="toggleList"
|
|
14
|
+
:size="`min`"
|
|
15
|
+
></base-toggle>
|
|
13
16
|
</template>
|
|
14
17
|
</base-line-info-item>
|
|
15
18
|
<base-line-info-item
|
|
@@ -24,8 +27,7 @@
|
|
|
24
27
|
v-model="borderColu"
|
|
25
28
|
:toggleList="toggleList"
|
|
26
29
|
:size="`min`"
|
|
27
|
-
>
|
|
28
|
-
</base-toggle>
|
|
30
|
+
></base-toggle>
|
|
29
31
|
</template>
|
|
30
32
|
</base-line-info-item>
|
|
31
33
|
<base-line-info-item
|
|
@@ -36,100 +38,105 @@
|
|
|
36
38
|
:label="`开启横向条纹:`"
|
|
37
39
|
>
|
|
38
40
|
<template slot="lineInforSlot">
|
|
39
|
-
<base-toggle
|
|
40
|
-
|
|
41
|
+
<base-toggle
|
|
42
|
+
v-model="borderRow"
|
|
43
|
+
:toggleList="toggleList"
|
|
44
|
+
:size="`min`"
|
|
45
|
+
></base-toggle>
|
|
41
46
|
</template>
|
|
42
47
|
</base-line-info-item>
|
|
43
48
|
</div>
|
|
44
49
|
</template>
|
|
45
50
|
|
|
46
51
|
<script>
|
|
47
|
-
import componentConfig from
|
|
52
|
+
import componentConfig from '../../config/componentConfig'
|
|
48
53
|
export default {
|
|
49
54
|
data() {
|
|
50
55
|
return {
|
|
51
56
|
tableBorderConfig: null,
|
|
52
57
|
toggleList: [
|
|
53
|
-
{ label:
|
|
54
|
-
{ label:
|
|
58
|
+
{ label: '开启', value: true },
|
|
59
|
+
{ label: '关闭', value: false },
|
|
55
60
|
],
|
|
56
|
-
}
|
|
61
|
+
}
|
|
57
62
|
},
|
|
58
63
|
created() {
|
|
59
|
-
this.init()
|
|
64
|
+
this.init()
|
|
60
65
|
},
|
|
61
66
|
computed: {
|
|
62
67
|
stripe: {
|
|
63
68
|
set(val) {
|
|
64
|
-
this.tableBorderConfig.stripe = val
|
|
65
|
-
componentConfig.eventBus.$emit(
|
|
66
|
-
key:
|
|
69
|
+
this.tableBorderConfig.stripe = val
|
|
70
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
71
|
+
key: 'stripe',
|
|
67
72
|
value: val,
|
|
68
|
-
})
|
|
69
|
-
this.setLocalStorage()
|
|
73
|
+
})
|
|
74
|
+
this.setLocalStorage()
|
|
70
75
|
},
|
|
71
76
|
get() {
|
|
72
|
-
return this.tableBorderConfig.stripe
|
|
77
|
+
return this.tableBorderConfig.stripe
|
|
73
78
|
},
|
|
74
79
|
},
|
|
75
80
|
borderColu: {
|
|
76
81
|
set(val) {
|
|
77
|
-
this.tableBorderConfig.borderColu = val
|
|
78
|
-
componentConfig.eventBus.$emit(
|
|
79
|
-
key:
|
|
82
|
+
this.tableBorderConfig.borderColu = val
|
|
83
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
84
|
+
key: 'borderColu',
|
|
80
85
|
value: val,
|
|
81
|
-
})
|
|
82
|
-
this.setLocalStorage()
|
|
86
|
+
})
|
|
87
|
+
this.setLocalStorage()
|
|
83
88
|
},
|
|
84
89
|
get() {
|
|
85
|
-
return this.tableBorderConfig.borderColu
|
|
90
|
+
return this.tableBorderConfig.borderColu
|
|
86
91
|
},
|
|
87
92
|
},
|
|
88
93
|
borderRow: {
|
|
89
94
|
set(val) {
|
|
90
|
-
this.tableBorderConfig.borderRow = val
|
|
91
|
-
componentConfig.eventBus.$emit(
|
|
92
|
-
key:
|
|
95
|
+
this.tableBorderConfig.borderRow = val
|
|
96
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
97
|
+
key: 'borderRow',
|
|
93
98
|
value: val,
|
|
94
|
-
})
|
|
95
|
-
this.setLocalStorage()
|
|
99
|
+
})
|
|
100
|
+
this.setLocalStorage()
|
|
96
101
|
},
|
|
97
102
|
get() {
|
|
98
|
-
return this.tableBorderConfig.borderRow
|
|
103
|
+
return this.tableBorderConfig.borderRow
|
|
99
104
|
},
|
|
100
105
|
},
|
|
101
106
|
},
|
|
102
107
|
methods: {
|
|
103
108
|
init() {
|
|
104
|
-
let tableBorderConfig = window.localStorage.getItem(
|
|
109
|
+
let tableBorderConfig = window.localStorage.getItem('tableBorderConfig')
|
|
105
110
|
if (tableBorderConfig) {
|
|
106
|
-
this.tableBorderConfig = JSON.parse(tableBorderConfig)
|
|
111
|
+
this.tableBorderConfig = JSON.parse(tableBorderConfig)
|
|
107
112
|
for (const key in this.tableBorderConfig) {
|
|
108
|
-
componentConfig.eventBus.$emit(
|
|
113
|
+
componentConfig.eventBus.$emit('handleTableBorder', {
|
|
109
114
|
key: `${key}`,
|
|
110
115
|
value: this.tableBorderConfig[`${key}`],
|
|
111
|
-
})
|
|
116
|
+
})
|
|
112
117
|
}
|
|
113
118
|
} else {
|
|
114
119
|
this.tableBorderConfig = {
|
|
115
120
|
stripe: true,
|
|
116
121
|
borderColu: true,
|
|
117
122
|
borderRow: true,
|
|
118
|
-
}
|
|
123
|
+
}
|
|
119
124
|
}
|
|
120
125
|
},
|
|
121
126
|
|
|
122
127
|
setLocalStorage() {
|
|
123
128
|
window.localStorage.setItem(
|
|
124
|
-
|
|
125
|
-
JSON.stringify(this.tableBorderConfig)
|
|
126
|
-
)
|
|
129
|
+
'tableBorderConfig',
|
|
130
|
+
JSON.stringify(this.tableBorderConfig),
|
|
131
|
+
)
|
|
127
132
|
},
|
|
128
133
|
},
|
|
129
|
-
}
|
|
134
|
+
}
|
|
130
135
|
</script>
|
|
131
136
|
|
|
132
137
|
<style lang="less" scoped>
|
|
133
138
|
.handle-table-border-wrap {
|
|
139
|
+
box-sizing: border-box;
|
|
140
|
+
padding: var(--padding-2) var(--padding-4);
|
|
134
141
|
}
|
|
135
142
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="table-header" v-show="config.key != 'noData'">
|
|
3
3
|
<div class="table-header-left">
|
|
4
|
-
<span class="cell-text">{{ scope.column.label }}
|
|
4
|
+
<span class="cell-text">{{ scope.column.label }}</span>
|
|
5
5
|
<span class="caret-wrapper defind">
|
|
6
6
|
<i class="sort-caret ascending"></i>
|
|
7
7
|
<i class="sort-caret descending"></i>
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
:plain="true"
|
|
16
16
|
:name="lockClass"
|
|
17
17
|
class="lock-icons"
|
|
18
|
-
:active="config.lock ? true : false"
|
|
19
|
-
v-if="!isAverageWidth"
|
|
20
18
|
@iconClick="handleClick('lock')"
|
|
19
|
+
:active="config.lock ? true : false"
|
|
20
|
+
v-if="!isAverageWidth && config.lock != 'right'"
|
|
21
21
|
></base-icon>
|
|
22
22
|
|
|
23
23
|
<base-icon
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
@iconClick="handleClick('screen')"
|
|
31
31
|
v-if="config.screen"
|
|
32
32
|
></base-icon>
|
|
33
|
+
|
|
34
|
+
<slot name="flex-slot" v-if="config.lock == 'right'"></slot>
|
|
33
35
|
</div>
|
|
34
36
|
</div>
|
|
35
37
|
</template>
|
|
@@ -39,19 +41,19 @@ export default {
|
|
|
39
41
|
data() {
|
|
40
42
|
return {
|
|
41
43
|
// preIndex: null,
|
|
42
|
-
}
|
|
44
|
+
}
|
|
43
45
|
},
|
|
44
46
|
created() {},
|
|
45
47
|
mounted() {},
|
|
46
48
|
computed: {
|
|
47
49
|
preIndex() {
|
|
48
|
-
return this.$props.config.preIndex
|
|
50
|
+
return this.$props.config.preIndex
|
|
49
51
|
},
|
|
50
52
|
lockClass() {
|
|
51
53
|
if (!this.$props.config.lock) {
|
|
52
|
-
return
|
|
54
|
+
return 'meixicomponenticon-suoding'
|
|
53
55
|
}
|
|
54
|
-
return
|
|
56
|
+
return 'meixicomponenticon-jiesuo'
|
|
55
57
|
},
|
|
56
58
|
},
|
|
57
59
|
props: {
|
|
@@ -69,37 +71,37 @@ export default {
|
|
|
69
71
|
methods: {
|
|
70
72
|
handleClick(type) {
|
|
71
73
|
switch (type) {
|
|
72
|
-
case
|
|
73
|
-
this.handleLock()
|
|
74
|
-
break
|
|
75
|
-
case
|
|
76
|
-
this.handleScreen()
|
|
77
|
-
break
|
|
74
|
+
case 'lock':
|
|
75
|
+
this.handleLock()
|
|
76
|
+
break
|
|
77
|
+
case 'screen':
|
|
78
|
+
this.handleScreen()
|
|
79
|
+
break
|
|
78
80
|
|
|
79
81
|
default:
|
|
80
|
-
break
|
|
82
|
+
break
|
|
81
83
|
}
|
|
82
84
|
},
|
|
83
85
|
|
|
84
86
|
handleLock() {
|
|
85
87
|
if (!this.$props.config.lock) {
|
|
86
|
-
this.$emit(
|
|
88
|
+
this.$emit('headerItemLock', {
|
|
87
89
|
preIndex: this.preIndex,
|
|
88
90
|
index: this.$props.index,
|
|
89
|
-
})
|
|
91
|
+
})
|
|
90
92
|
} else {
|
|
91
|
-
this.$emit(
|
|
93
|
+
this.$emit('headerItemUnlock', {
|
|
92
94
|
preIndex: this.preIndex,
|
|
93
95
|
index: this.$props.index,
|
|
94
|
-
})
|
|
96
|
+
})
|
|
95
97
|
}
|
|
96
98
|
},
|
|
97
99
|
|
|
98
100
|
handleScreen() {
|
|
99
|
-
this.$emit(
|
|
101
|
+
this.$emit('handleScreenItem', this.$props.config)
|
|
100
102
|
},
|
|
101
103
|
},
|
|
102
|
-
}
|
|
104
|
+
}
|
|
103
105
|
</script>
|
|
104
106
|
|
|
105
107
|
<style lang="less">
|
|
@@ -133,7 +135,7 @@ export default {
|
|
|
133
135
|
overflow: hidden;
|
|
134
136
|
white-space: nowrap;
|
|
135
137
|
text-overflow: ellipsis;
|
|
136
|
-
color: var(--font-color-
|
|
138
|
+
color: var(--font-color-s);
|
|
137
139
|
font-size: var(--font-size-base);
|
|
138
140
|
font-weight: var(--font-weight-g);
|
|
139
141
|
}
|