meixioacomponent 0.4.2 → 0.4.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/lib/meixioacomponent.common.js +16241 -19856
- package/lib/meixioacomponent.umd.js +16353 -19968
- package/lib/meixioacomponent.umd.min.js +33 -34
- package/lib/style/element/index.css +1182 -1153
- package/lib/style/theme/light.less +5 -4
- package/package.json +2 -2
- package/packages/components/base/baseCropper/index.vue +2 -1
- package/packages/components/base/baseDialog/index.vue +13 -7
- package/packages/components/base/baseDrawer/index.vue +5 -2
- package/packages/components/base/baseIcon/index.vue +1 -2
- package/packages/components/base/baseList/index.js +6 -0
- package/packages/components/base/baseList/index.vue +48 -0
- package/packages/components/base/baseList/scrollbar/index.js +8 -0
- package/packages/components/base/baseList/scrollbar/src/bar.js +92 -0
- package/packages/components/base/baseList/scrollbar/src/main.js +150 -0
- package/packages/components/base/baseList/scrollbar/src/util.js +34 -0
- package/packages/components/base/baseNumberInput/index.js +6 -0
- package/packages/components/base/baseNumberInput/index.vue +191 -0
- package/packages/components/base/basePlainTable/basePlainTable.vue +78 -12
- package/packages/components/base/basePopoverButton/index.vue +1 -1
- package/packages/components/base/baseSection/baseSection.vue +24 -11
- package/packages/components/base/baseSingleImgUpload/index.js +6 -0
- package/packages/components/base/baseSingleImgUpload/index.vue +147 -0
- package/packages/components/base/baseStoreSelect/index.js +6 -0
- package/packages/components/base/baseStoreSelect/index.vue +159 -0
- package/packages/components/base/baseToggle/toggle.vue +22 -3
- package/packages/components/base/baseTreeSelect/index.vue +7 -1
- package/packages/components/base/baseUpload/baseUpload.vue +23 -0
- package/packages/components/base/baseUpload/baseUploadItem.vue +2 -3
- package/packages/components/base/baseUpload/mixins.js +12 -2
- package/packages/components/base/baseUploadTemplate/index.vue +19 -3
- package/packages/components/base/upload/upload.vue +36 -13
- package/packages/components/base/upload/uploadItem.vue +40 -17
- package/packages/components/dynamicmount/index.js +30 -29
- package/packages/components/index.js +19 -2
- package/packages/components/proForm/dialogForm/baseDialogForm.vue +29 -19
- package/packages/components/proForm/proForm/proFormItem/index.js +6 -0
- package/packages/components/proForm/proForm/{pro_form_item.vue → proFormItem/pro_form_item.vue} +161 -99
- package/packages/components/proForm/proForm/pro_form.vue +70 -16
- package/packages/components/proForm/proFormWrap/pro_form_wrap.vue +70 -28
- package/packages/components/proPageTable/oa_pro_colum_config.vue +24 -28
- package/packages/components/proPageTable/oa_pro_footer.vue +12 -10
- package/packages/components/proPageTable/oa_pro_screen.vue +1 -0
- package/packages/components/proPageTable/oa_pro_screen_item.vue +6 -6
- package/packages/components/proPageTable/oa_pro_table.vue +44 -20
- package/packages/components/style/element/index.css +1182 -1153
- package/packages/components/style/theme/light.less +5 -4
- package/packages/config/selectStore/SelectStore.js +26 -17
- package/packages/config/uploadRequest.js +1 -0
- package/packages/utils/upload.js +22 -21
- package/packages/utils/utils.js +110 -111
- package/src/App.vue +9 -14
- package/src/component/test.vue +333 -233
- package/src/component/testSelectStore.js +25 -13
- package/src/config/CompanyInfoConfig.js +4 -2
- package/packages/components/base/brieflyItem.vue +0 -198
|
@@ -17,8 +17,9 @@
|
|
|
17
17
|
:align="`left`"
|
|
18
18
|
:prop="item.value"
|
|
19
19
|
:label="item.label"
|
|
20
|
-
:width="item.width"
|
|
20
|
+
:width="isAverageWidth ? '' : item.width"
|
|
21
21
|
v-for="(item, index) in tableConfig"
|
|
22
|
+
:fixed="item.fixed ? item.fixed : false"
|
|
22
23
|
>
|
|
23
24
|
<template slot="header" slot-scope="scope">
|
|
24
25
|
<span class="plain-table-header-text">
|
|
@@ -27,12 +28,26 @@
|
|
|
27
28
|
</template>
|
|
28
29
|
|
|
29
30
|
<template slot-scope="scope">
|
|
30
|
-
<slot
|
|
31
|
-
|
|
31
|
+
<slot
|
|
32
|
+
:name="item.value"
|
|
33
|
+
:scope="scope.row"
|
|
34
|
+
v-if="item.template"
|
|
35
|
+
></slot>
|
|
32
36
|
|
|
33
|
-
<span
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
<span
|
|
38
|
+
v-else
|
|
39
|
+
class="cell-content-text"
|
|
40
|
+
:style="{
|
|
41
|
+
color: item.color,
|
|
42
|
+
}"
|
|
43
|
+
:class="[
|
|
44
|
+
item.fn ? 'handle-primary' : '',
|
|
45
|
+
item.type ? item.type : '',
|
|
46
|
+
]"
|
|
47
|
+
@click="rowClick(item, scope.row)"
|
|
48
|
+
>
|
|
49
|
+
{{ nomalRowValue(scope.row, item) }}
|
|
50
|
+
</span>
|
|
36
51
|
</template>
|
|
37
52
|
</el-table-column>
|
|
38
53
|
</el-table>
|
|
@@ -40,17 +55,18 @@
|
|
|
40
55
|
</template>
|
|
41
56
|
|
|
42
57
|
<script>
|
|
43
|
-
import
|
|
58
|
+
import { FilterTime } from '../../../utils/utils'
|
|
59
|
+
import baseDefaultSvgVue from '../baseDefaultSvg/baseDefaultSvg.vue'
|
|
44
60
|
export default {
|
|
45
|
-
name:
|
|
61
|
+
name: 'basePlainTable',
|
|
46
62
|
data() {
|
|
47
63
|
return {
|
|
48
64
|
id: null,
|
|
49
|
-
}
|
|
65
|
+
}
|
|
50
66
|
},
|
|
51
67
|
created() {
|
|
52
68
|
if (this.$props.tableId) {
|
|
53
|
-
this.id = this.$props.tableId
|
|
69
|
+
this.id = this.$props.tableId
|
|
54
70
|
}
|
|
55
71
|
},
|
|
56
72
|
components: {
|
|
@@ -71,10 +87,31 @@ export default {
|
|
|
71
87
|
type: String,
|
|
72
88
|
},
|
|
73
89
|
height: {
|
|
74
|
-
default:
|
|
90
|
+
default: 'auto',
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
isAverageWidth: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: false,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
methods: {
|
|
99
|
+
rowClick(item, row) {
|
|
100
|
+
if (!item.fn) return
|
|
101
|
+
item.fn(row)
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
// 返回普通格式的字段
|
|
105
|
+
nomalRowValue(row, item) {
|
|
106
|
+
const value = row[item.value]
|
|
107
|
+
if (item.type == 'time') {
|
|
108
|
+
return FilterTime(value, 'YYYY-MM-DD HH:mm:ss')
|
|
109
|
+
} else {
|
|
110
|
+
return value
|
|
111
|
+
}
|
|
75
112
|
},
|
|
76
113
|
},
|
|
77
|
-
}
|
|
114
|
+
}
|
|
78
115
|
</script>
|
|
79
116
|
|
|
80
117
|
<style lang="less" scoped>
|
|
@@ -101,4 +138,33 @@ export default {
|
|
|
101
138
|
}
|
|
102
139
|
// background: var(--color-gray-d);
|
|
103
140
|
}
|
|
141
|
+
|
|
142
|
+
.handle-primary {
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
text-decoration: underline !important;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.primary,
|
|
148
|
+
.handle-primary {
|
|
149
|
+
color: var(--color-primary) !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.success {
|
|
153
|
+
color: var(--color-success) !important;
|
|
154
|
+
}
|
|
155
|
+
.error {
|
|
156
|
+
color: var(--color-error) !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.warn {
|
|
160
|
+
color: var(--color-warn) !important;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.primary,
|
|
164
|
+
.handle-primary,
|
|
165
|
+
.success,
|
|
166
|
+
.error,
|
|
167
|
+
.warn {
|
|
168
|
+
font-weight: var(--font-weight-g);
|
|
169
|
+
}
|
|
104
170
|
</style>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
class="button-icon"
|
|
31
31
|
:iconClass="iconClass"
|
|
32
32
|
@iconClick="iconClick"
|
|
33
|
-
:color="module ? 'text-white' : 'd'"
|
|
33
|
+
:color="module ? 'var(--text-white)' : 'd'"
|
|
34
34
|
></base-icon>
|
|
35
35
|
<span class="inner-span" v-if="buttonText">{{ buttonText }}</span>
|
|
36
36
|
</el-button>
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
|
|
23
23
|
<script>
|
|
24
24
|
export default {
|
|
25
|
-
name:
|
|
25
|
+
name: 'baseSection',
|
|
26
26
|
data() {
|
|
27
|
-
return {}
|
|
27
|
+
return {}
|
|
28
28
|
},
|
|
29
29
|
mounted() {
|
|
30
30
|
this.$nextTick(() => {
|
|
31
|
-
this.init()
|
|
32
|
-
})
|
|
31
|
+
this.init()
|
|
32
|
+
})
|
|
33
33
|
},
|
|
34
34
|
beforeDestroy() {},
|
|
35
35
|
props: {
|
|
@@ -55,24 +55,24 @@ export default {
|
|
|
55
55
|
computed: {
|
|
56
56
|
module: {
|
|
57
57
|
set(val) {
|
|
58
|
-
this.$emit(
|
|
58
|
+
this.$emit('input', val)
|
|
59
59
|
},
|
|
60
60
|
get() {
|
|
61
|
-
return this.$props.value
|
|
61
|
+
return this.$props.value
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
64
|
},
|
|
65
65
|
methods: {
|
|
66
66
|
init() {
|
|
67
|
-
if (!this.$props.event) return
|
|
67
|
+
if (!this.$props.event) return
|
|
68
68
|
},
|
|
69
69
|
handleOpen() {
|
|
70
|
-
if (this.$props.disable) return
|
|
71
|
-
this.module = !this.module
|
|
72
|
-
this.$emit(
|
|
70
|
+
if (this.$props.disable) return
|
|
71
|
+
this.module = !this.module
|
|
72
|
+
this.$emit('visibleContent', this.module)
|
|
73
73
|
},
|
|
74
74
|
},
|
|
75
|
-
}
|
|
75
|
+
}
|
|
76
76
|
</script>
|
|
77
77
|
|
|
78
78
|
<style lang="less" scoped>
|
|
@@ -106,9 +106,22 @@ export default {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
.header-text {
|
|
109
|
+
position: relative;
|
|
110
|
+
display: inline-block;
|
|
109
111
|
color: var(--font-color-d);
|
|
110
112
|
font-size: var(--font-size-base);
|
|
111
113
|
font-weight: var(--font-weight-kg);
|
|
114
|
+
margin-left: var(--margin-4);
|
|
115
|
+
&::before {
|
|
116
|
+
top: 0px;
|
|
117
|
+
left: -10px;
|
|
118
|
+
width: 4px;
|
|
119
|
+
height: 100%;
|
|
120
|
+
content: '';
|
|
121
|
+
position: absolute;
|
|
122
|
+
border-radius: var(--radius);
|
|
123
|
+
background: var(--color-primary);
|
|
124
|
+
}
|
|
112
125
|
}
|
|
113
126
|
.section-content {
|
|
114
127
|
padding: calc(var(--padding-4) * 2) 0px;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="upload-avatar-wrap">
|
|
3
|
+
<BaseAvatar
|
|
4
|
+
:size="`l`"
|
|
5
|
+
:shape="shape"
|
|
6
|
+
:type="avatartType"
|
|
7
|
+
v-if="type == 'avatar'"
|
|
8
|
+
:view="avatartType == 'img' ? true : false"
|
|
9
|
+
:source="avatartType == 'img' ? url : iconSource"
|
|
10
|
+
></BaseAvatar>
|
|
11
|
+
|
|
12
|
+
<div class="img-wrap" :style="imgStyle" v-else>
|
|
13
|
+
<BaseImg
|
|
14
|
+
fit="cover"
|
|
15
|
+
:src="url"
|
|
16
|
+
:shape="shape"
|
|
17
|
+
:event="url ? true : false"
|
|
18
|
+
></BaseImg>
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
<el-button
|
|
22
|
+
type="primary"
|
|
23
|
+
size="mini"
|
|
24
|
+
@click="handleCheckImg"
|
|
25
|
+
:disabled="disabled"
|
|
26
|
+
>
|
|
27
|
+
选择图片
|
|
28
|
+
</el-button>
|
|
29
|
+
<BaseUploadItem
|
|
30
|
+
:fileType="`img`"
|
|
31
|
+
:cropper="cropper"
|
|
32
|
+
ref="baseUploadItem"
|
|
33
|
+
:uploadType="`single`"
|
|
34
|
+
style="display: none;"
|
|
35
|
+
:cropperConfig="cropperConfig"
|
|
36
|
+
@uploadEd="uploadEd($event)"
|
|
37
|
+
></BaseUploadItem>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<script>
|
|
42
|
+
import BaseImg from '../baseImg/baseImg.vue'
|
|
43
|
+
import BaseAvatar from '../baseAvatar/baseAvatar.vue'
|
|
44
|
+
import BaseUploadItem from '../baseUpload/baseUploadItem.vue'
|
|
45
|
+
export default {
|
|
46
|
+
name: 'baseSingleImgUpload',
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
value: [],
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
created() {
|
|
53
|
+
this.init()
|
|
54
|
+
},
|
|
55
|
+
components: { BaseAvatar, BaseImg, BaseUploadItem },
|
|
56
|
+
props: {
|
|
57
|
+
url: {},
|
|
58
|
+
shape: { default: 'cir' },
|
|
59
|
+
type: {
|
|
60
|
+
default: 'avatar',
|
|
61
|
+
},
|
|
62
|
+
imgSize: {
|
|
63
|
+
type: Array,
|
|
64
|
+
default: () => [300, 200],
|
|
65
|
+
},
|
|
66
|
+
cropper: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false,
|
|
69
|
+
},
|
|
70
|
+
disabled: {
|
|
71
|
+
type: Boolean,
|
|
72
|
+
default: false,
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
computed: {
|
|
76
|
+
avatartType() {
|
|
77
|
+
const { url } = this.$props
|
|
78
|
+
return url ? 'img' : 'icon'
|
|
79
|
+
},
|
|
80
|
+
iconSource() {
|
|
81
|
+
if (this.type == 'avatar') {
|
|
82
|
+
return 'meixicomponenticon-user'
|
|
83
|
+
} else {
|
|
84
|
+
return 'meixicomponenticon-tupian_huaban'
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
imgStyle() {
|
|
88
|
+
const { imgSize } = this.$props
|
|
89
|
+
return {
|
|
90
|
+
width: `${imgSize[0]}px`,
|
|
91
|
+
height: `${imgSize[1]}px`,
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
cropperConfig() {
|
|
95
|
+
const { type } = this.$props
|
|
96
|
+
if (type == 'avatar') {
|
|
97
|
+
return {
|
|
98
|
+
croppetShape: 'circ',
|
|
99
|
+
cropperOutline: [80, 80],
|
|
100
|
+
}
|
|
101
|
+
} else {
|
|
102
|
+
return {
|
|
103
|
+
croppetShape: 'rect',
|
|
104
|
+
cropperOutline: [100, 100],
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
methods: {
|
|
110
|
+
init() {
|
|
111
|
+
const { url } = this.$props
|
|
112
|
+
if (url) {
|
|
113
|
+
this.value.push({ url })
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
handleCheckImg() {
|
|
117
|
+
this.$refs.baseUploadItem.clickFile()
|
|
118
|
+
},
|
|
119
|
+
uploadEd(value) {
|
|
120
|
+
if (value.length >= 0) {
|
|
121
|
+
this.$emit('uploadEd', value[0].url)
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
watch: {
|
|
126
|
+
url(newVal, oldVal) {
|
|
127
|
+
this.$nextTick(() => {
|
|
128
|
+
this.init()
|
|
129
|
+
})
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<style lang="less" scoped>
|
|
136
|
+
.upload-avatar-wrap {
|
|
137
|
+
width: 100%;
|
|
138
|
+
display: flex;
|
|
139
|
+
min-height: 160px;
|
|
140
|
+
background: inherit;
|
|
141
|
+
align-items: center;
|
|
142
|
+
flex-flow: row nowrap;
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
justify-content: space-between;
|
|
145
|
+
padding: var(--padding-5) calc(var(--padding-5) * 4);
|
|
146
|
+
}
|
|
147
|
+
</style>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-select
|
|
3
|
+
:size="size"
|
|
4
|
+
ref="target"
|
|
5
|
+
v-if="selectStore"
|
|
6
|
+
v-model="module"
|
|
7
|
+
:filterable="true"
|
|
8
|
+
:placeholder="placeholder"
|
|
9
|
+
:disabled="disabled"
|
|
10
|
+
:multiple="multiple"
|
|
11
|
+
:loading="selectLoading"
|
|
12
|
+
:multipleLimit="multipleLimit"
|
|
13
|
+
@visible-change="visibleChange"
|
|
14
|
+
style="width: 100%; height: 100%;"
|
|
15
|
+
>
|
|
16
|
+
<div class="select-empty" slot="empty">
|
|
17
|
+
<el-button
|
|
18
|
+
type="primary"
|
|
19
|
+
size="mini"
|
|
20
|
+
icon="el-icon-refresh"
|
|
21
|
+
:loading="selectLoading"
|
|
22
|
+
@click="loadSelectData"
|
|
23
|
+
>
|
|
24
|
+
尝试刷新数据
|
|
25
|
+
</el-button>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="option-wrap">
|
|
28
|
+
<div class="option-wrap-header">
|
|
29
|
+
<el-button
|
|
30
|
+
size="mini"
|
|
31
|
+
type="info"
|
|
32
|
+
title="重新刷新数据"
|
|
33
|
+
:disabled="selectLoading"
|
|
34
|
+
icon="el-icon-refresh"
|
|
35
|
+
@click="loadSelectData"
|
|
36
|
+
></el-button>
|
|
37
|
+
</div>
|
|
38
|
+
<el-option
|
|
39
|
+
:key="item.value"
|
|
40
|
+
:disabled="item.disabled"
|
|
41
|
+
v-for="item in selectData"
|
|
42
|
+
:label="item[`${selectConfig.label}`]"
|
|
43
|
+
:value="item[`${selectConfig.value}`]"
|
|
44
|
+
></el-option>
|
|
45
|
+
</div>
|
|
46
|
+
</el-select>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script>
|
|
50
|
+
import componentConfig from '../../../config/componentConfig'
|
|
51
|
+
export default {
|
|
52
|
+
name: 'baseStoreSelect',
|
|
53
|
+
data() {
|
|
54
|
+
return {}
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
props: {
|
|
58
|
+
size: {},
|
|
59
|
+
value: {},
|
|
60
|
+
multiple: {},
|
|
61
|
+
disabled: {},
|
|
62
|
+
useStore: {},
|
|
63
|
+
useSlot: {
|
|
64
|
+
default: false,
|
|
65
|
+
},
|
|
66
|
+
multipleLimit: {},
|
|
67
|
+
params: {},
|
|
68
|
+
placeholder: {
|
|
69
|
+
default: '请选择',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
created() {},
|
|
73
|
+
mounted() {
|
|
74
|
+
this.loadSelectData()
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
module: {
|
|
78
|
+
set(val) {
|
|
79
|
+
this.$emit('input', val)
|
|
80
|
+
},
|
|
81
|
+
get() {
|
|
82
|
+
return this.$props.value
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
selectLoading() {
|
|
87
|
+
return this.selectStore?.getLoading()
|
|
88
|
+
},
|
|
89
|
+
selectStore() {
|
|
90
|
+
const { useStore } = this.$props
|
|
91
|
+
return componentConfig.selectStore.getStore(useStore)
|
|
92
|
+
},
|
|
93
|
+
selectData() {
|
|
94
|
+
return this.selectStore.getData()
|
|
95
|
+
},
|
|
96
|
+
selectConfig() {
|
|
97
|
+
return this.selectStore.getConfig()
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
methods: {
|
|
102
|
+
focus() {
|
|
103
|
+
this.$refs.target.focus()
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
getSelectData() {
|
|
107
|
+
return this.selectData
|
|
108
|
+
},
|
|
109
|
+
|
|
110
|
+
getSelectConfig() {
|
|
111
|
+
return this.selectConfig
|
|
112
|
+
},
|
|
113
|
+
|
|
114
|
+
loadSelectData() {
|
|
115
|
+
const { params } = this.$props
|
|
116
|
+
this.selectStore?.loadData(params)
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
visibleChange(visible) {
|
|
120
|
+
if (!visible) return
|
|
121
|
+
if (this.selectData) return
|
|
122
|
+
this.loadSelectData()
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
watch: {
|
|
127
|
+
'$props.params': {
|
|
128
|
+
deep: true,
|
|
129
|
+
handler(newVal, oldVal) {
|
|
130
|
+
this.module = null
|
|
131
|
+
this.selectStore.cancelLoad()
|
|
132
|
+
this.loadSelectData()
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
</script>
|
|
138
|
+
|
|
139
|
+
<style lang="less" scoped>
|
|
140
|
+
.option-wrap {
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: auto;
|
|
143
|
+
.option-wrap-header {
|
|
144
|
+
width: 100%;
|
|
145
|
+
display: flex;
|
|
146
|
+
box-sizing: border-box;
|
|
147
|
+
justify-content: flex-end;
|
|
148
|
+
padding: 0px var(--padding-4);
|
|
149
|
+
margin-bottom: var(--margin-4);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
.select-empty {
|
|
153
|
+
width: 100%;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
padding: calc(var(--padding-4) * 2);
|
|
158
|
+
}
|
|
159
|
+
</style>
|
|
@@ -8,17 +8,28 @@
|
|
|
8
8
|
disabled: disabled,
|
|
9
9
|
selected: item.value == module,
|
|
10
10
|
}"
|
|
11
|
+
:style="{
|
|
12
|
+
background: item.value == module ? toggleColor[index] : '',
|
|
13
|
+
}"
|
|
11
14
|
v-for="(item, index) in toggleList"
|
|
12
15
|
>
|
|
13
16
|
<base-icon
|
|
14
17
|
:size="`l`"
|
|
15
|
-
:color="`s
|
|
18
|
+
:color="item.value == module ? `${toggleTextColor[index]}` : 's'"
|
|
16
19
|
v-if="item.icon"
|
|
17
20
|
:name="item.icon"
|
|
18
21
|
:event="disabled ? false : true"
|
|
19
22
|
@iconClick="handletoggle(item)"
|
|
20
23
|
></base-icon>
|
|
21
|
-
<span
|
|
24
|
+
<span
|
|
25
|
+
:style="{
|
|
26
|
+
color:
|
|
27
|
+
item.value == module ? `${toggleTextColor[index]} !important` : '',
|
|
28
|
+
}"
|
|
29
|
+
v-else
|
|
30
|
+
>
|
|
31
|
+
{{ item.label }}
|
|
32
|
+
</span>
|
|
22
33
|
</div>
|
|
23
34
|
</div>
|
|
24
35
|
</template>
|
|
@@ -49,6 +60,14 @@ export default {
|
|
|
49
60
|
type: Boolean,
|
|
50
61
|
default: false,
|
|
51
62
|
},
|
|
63
|
+
toggleColor: {
|
|
64
|
+
type: Array,
|
|
65
|
+
default: () => ['var(--color-primary)', 'var(--color-error)'],
|
|
66
|
+
},
|
|
67
|
+
toggleTextColor: {
|
|
68
|
+
type: Array,
|
|
69
|
+
default: () => ['var(--text-white)', 'var(--text-white)'],
|
|
70
|
+
},
|
|
52
71
|
},
|
|
53
72
|
computed: {
|
|
54
73
|
module: {
|
|
@@ -63,7 +82,7 @@ export default {
|
|
|
63
82
|
methods: {
|
|
64
83
|
handletoggle(item) {
|
|
65
84
|
const { disabled } = this.$props
|
|
66
|
-
if (disabled) return
|
|
85
|
+
if (disabled || item.value == this.module) return
|
|
67
86
|
const { beforeHandle } = this.$props
|
|
68
87
|
if (beforeHandle) {
|
|
69
88
|
beforeHandle(() => {
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
placeholder="请选择"
|
|
6
6
|
size="mini"
|
|
7
7
|
@visible-change="visibleChange"
|
|
8
|
-
clearable
|
|
8
|
+
:clearable="clearable"
|
|
9
9
|
:disabled="disabled"
|
|
10
10
|
:multiple="multiple"
|
|
11
11
|
style="width: 100%;"
|
|
@@ -84,6 +84,11 @@ export default {
|
|
|
84
84
|
},
|
|
85
85
|
},
|
|
86
86
|
|
|
87
|
+
clearable: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
default: true,
|
|
90
|
+
},
|
|
91
|
+
|
|
87
92
|
multiple: {
|
|
88
93
|
type: Boolean,
|
|
89
94
|
default: false,
|
|
@@ -208,6 +213,7 @@ export default {
|
|
|
208
213
|
let node = this.$refs.tree.getNode(val)
|
|
209
214
|
this.optionData[0][`${this.$props.nodeKey}`] = val
|
|
210
215
|
this.optionData[0][`${this.label}`] = node[`${this.label}`]
|
|
216
|
+
this.$emit('onSingleValueChange', node)
|
|
211
217
|
})
|
|
212
218
|
} else {
|
|
213
219
|
this.$refs.tree.setCurrentKey(null)
|
|
@@ -7,15 +7,20 @@
|
|
|
7
7
|
:size="outline"
|
|
8
8
|
:isGroup="true"
|
|
9
9
|
:uploadItem="item"
|
|
10
|
+
:disabled="disabled"
|
|
10
11
|
v-for="(item, index) in module"
|
|
12
|
+
v-dragging="{ item: item, list: module }"
|
|
11
13
|
@handleDeleteUploadItem="handleDeleteUploadItem(index)"
|
|
12
14
|
></baseUploadItemVue>
|
|
15
|
+
|
|
13
16
|
<baseUploadItemVue
|
|
14
17
|
:type="`upload`"
|
|
15
18
|
v-show="!isMax"
|
|
16
19
|
ref="itemUpload"
|
|
17
20
|
:isGroup="true"
|
|
18
21
|
:size="outline"
|
|
22
|
+
v-if="!disabled"
|
|
23
|
+
:disabled="disabled"
|
|
19
24
|
:fileSize="fileSize"
|
|
20
25
|
:fileType="fileType"
|
|
21
26
|
:uploadType="`multiple`"
|
|
@@ -43,6 +48,11 @@ export default {
|
|
|
43
48
|
uploadLoading: false,
|
|
44
49
|
}
|
|
45
50
|
},
|
|
51
|
+
mounted() {
|
|
52
|
+
this.$dragging.$on('dragged', ({ value }) => {
|
|
53
|
+
this.onDragEnd(value)
|
|
54
|
+
})
|
|
55
|
+
},
|
|
46
56
|
beforeDestroy() {
|
|
47
57
|
if (this.dynamicmount) {
|
|
48
58
|
this.uploadEd()
|
|
@@ -76,6 +86,10 @@ export default {
|
|
|
76
86
|
fileSize: {
|
|
77
87
|
default: 99,
|
|
78
88
|
},
|
|
89
|
+
disabled: {
|
|
90
|
+
type: Boolean,
|
|
91
|
+
default: false,
|
|
92
|
+
},
|
|
79
93
|
},
|
|
80
94
|
computed: {
|
|
81
95
|
module: {
|
|
@@ -89,7 +103,13 @@ export default {
|
|
|
89
103
|
},
|
|
90
104
|
methods: {
|
|
91
105
|
handleDeleteUploadItem(index) {
|
|
106
|
+
const { disabled } = this.$props
|
|
107
|
+
if (disabled) return
|
|
92
108
|
this.module.splice(index, 1)
|
|
109
|
+
this.$emit('onDelUploadItem', index)
|
|
110
|
+
},
|
|
111
|
+
onDragEnd() {
|
|
112
|
+
this.$emit('onDragEnd')
|
|
93
113
|
},
|
|
94
114
|
},
|
|
95
115
|
}
|
|
@@ -117,6 +137,9 @@ export default {
|
|
|
117
137
|
font-size: var(--font-size-s);
|
|
118
138
|
}
|
|
119
139
|
}
|
|
140
|
+
.drag-content {
|
|
141
|
+
display: flex;
|
|
142
|
+
}
|
|
120
143
|
|
|
121
144
|
/deep/ .el-loading-mask {
|
|
122
145
|
z-index: 1 !important;
|