meixioacomponent 0.3.41 → 0.3.45
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 +798 -750
- package/lib/meixioacomponent.umd.js +798 -750
- package/lib/meixioacomponent.umd.min.js +28 -28
- package/lib/style/element/index.css +7 -22
- package/lib/style/index.less +5 -1
- package/package.json +1 -1
- package/packages/components/base/baseArea/baseArea.vue +109 -108
- package/packages/components/base/baseIcon/index.vue +49 -45
- package/packages/components/base/baseLineInfoGroup/baseLineInfoGroup.vue +17 -14
- package/packages/components/base/baseLineInfoItem/baseLineInfoItem.vue +54 -31
- package/packages/components/base/basePopoverButton/index.vue +15 -19
- package/packages/components/base/baseUpload/baseUpload.vue +15 -12
- package/packages/components/base/baseUpload/baseUploadItem.vue +73 -70
- package/packages/components/base/baseUpload/mixins.js +10 -3
- package/packages/components/proForm/proForm/pro_form_item.vue +5 -1
- 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 +120 -98
- package/packages/components/style/element/index.css +7 -22
- package/packages/components/style/index.less +5 -1
- package/src/App.vue +34 -13
- package/src/component/test.vue +46 -190
- package/src/config/CompanyInfoConfig.js +26 -0
- package/src/config/linkViewClass.js +71 -0
- package/src/main.js +1 -1
- package/src/test.js +3 -3
|
@@ -8923,16 +8923,7 @@
|
|
|
8923
8923
|
outline-width: 0;
|
|
8924
8924
|
}
|
|
8925
8925
|
|
|
8926
|
-
|
|
8927
|
-
position: absolute;
|
|
8928
|
-
border-radius: 4px;
|
|
8929
|
-
padding: 10px;
|
|
8930
|
-
z-index: 2000;
|
|
8931
|
-
font-size: 12px;
|
|
8932
|
-
line-height: 1.2;
|
|
8933
|
-
min-width: 10px;
|
|
8934
|
-
word-wrap: break-word;
|
|
8935
|
-
}
|
|
8926
|
+
|
|
8936
8927
|
|
|
8937
8928
|
.el-tooltip__popper .popper__arrow,
|
|
8938
8929
|
.el-tooltip__popper .popper__arrow::after {
|
|
@@ -11522,7 +11513,7 @@
|
|
|
11522
11513
|
resize: vertical;
|
|
11523
11514
|
padding: var(--padding-2) var(--padding-3);
|
|
11524
11515
|
line-height: 1.5;
|
|
11525
|
-
border:
|
|
11516
|
+
border: 2px solid var(--color-gray-d) !important;
|
|
11526
11517
|
-webkit-box-sizing: border-box;
|
|
11527
11518
|
box-sizing: border-box;
|
|
11528
11519
|
width: 100%;
|
|
@@ -11536,6 +11527,10 @@
|
|
|
11536
11527
|
transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
|
|
11537
11528
|
}
|
|
11538
11529
|
|
|
11530
|
+
.el-textarea__inner:hover {
|
|
11531
|
+
border-color: var(--color-primary) !important;
|
|
11532
|
+
}
|
|
11533
|
+
|
|
11539
11534
|
.el-textarea__inner::-webkit-input-placeholder {
|
|
11540
11535
|
color: #8f959e;
|
|
11541
11536
|
}
|
|
@@ -14276,16 +14271,6 @@
|
|
|
14276
14271
|
outline-width: 0;
|
|
14277
14272
|
}
|
|
14278
14273
|
|
|
14279
|
-
.el-tooltip__popper {
|
|
14280
|
-
position: absolute;
|
|
14281
|
-
border-radius: 4px;
|
|
14282
|
-
padding: 10px;
|
|
14283
|
-
z-index: 2000;
|
|
14284
|
-
font-size: 12px;
|
|
14285
|
-
line-height: 1.2;
|
|
14286
|
-
min-width: 10px;
|
|
14287
|
-
word-wrap: break-word;
|
|
14288
|
-
}
|
|
14289
14274
|
|
|
14290
14275
|
.el-tooltip__popper .popper__arrow,
|
|
14291
14276
|
.el-tooltip__popper .popper__arrow::after {
|
|
@@ -18390,7 +18375,7 @@
|
|
|
18390
18375
|
.el-tooltip__popper {
|
|
18391
18376
|
position: absolute;
|
|
18392
18377
|
border-radius: 4px;
|
|
18393
|
-
padding:
|
|
18378
|
+
padding: 4px;
|
|
18394
18379
|
z-index: 2000;
|
|
18395
18380
|
font-size: 12px;
|
|
18396
18381
|
line-height: 1.2;
|
package/lib/style/index.less
CHANGED
|
@@ -13,6 +13,10 @@ body {
|
|
|
13
13
|
margin: 0px;
|
|
14
14
|
--footer-height: 40px;
|
|
15
15
|
--header-height: 63px;
|
|
16
|
+
|
|
17
|
+
.popper__arrow {
|
|
18
|
+
display: none !important;
|
|
19
|
+
}
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
html {
|
|
@@ -109,4 +113,4 @@ h6 {
|
|
|
109
113
|
|
|
110
114
|
#nprogress .bar {
|
|
111
115
|
background: var(--color-primary) !important;
|
|
112
|
-
}
|
|
116
|
+
}
|
package/package.json
CHANGED
|
@@ -84,21 +84,20 @@
|
|
|
84
84
|
v-model="showModule"
|
|
85
85
|
placeholder="请选择地区"
|
|
86
86
|
:suffix-icon="suffixIcon"
|
|
87
|
-
>
|
|
88
|
-
</el-input>
|
|
87
|
+
></el-input>
|
|
89
88
|
</div>
|
|
90
89
|
</el-popover>
|
|
91
90
|
</div>
|
|
92
91
|
</template>
|
|
93
92
|
|
|
94
93
|
<script>
|
|
95
|
-
import { json } from
|
|
96
|
-
import baseButtonHandleVue from
|
|
94
|
+
import { json } from 'body-parser'
|
|
95
|
+
import baseButtonHandleVue from '../baseButtonHandle/baseButtonHandle.vue'
|
|
97
96
|
//
|
|
98
|
-
import areaJson from
|
|
99
|
-
import areaConfig from
|
|
97
|
+
import areaJson from './area'
|
|
98
|
+
import areaConfig from './areaConfig'
|
|
100
99
|
export default {
|
|
101
|
-
name:
|
|
100
|
+
name: 'baseArea',
|
|
102
101
|
data() {
|
|
103
102
|
return {
|
|
104
103
|
// 是否打开了选择器
|
|
@@ -113,10 +112,10 @@ export default {
|
|
|
113
112
|
activeIndex: 0,
|
|
114
113
|
// 是否回显过数据
|
|
115
114
|
isReview: false,
|
|
116
|
-
}
|
|
115
|
+
}
|
|
117
116
|
},
|
|
118
117
|
created() {
|
|
119
|
-
this.init()
|
|
118
|
+
this.init()
|
|
120
119
|
},
|
|
121
120
|
|
|
122
121
|
props: {
|
|
@@ -135,103 +134,103 @@ export default {
|
|
|
135
134
|
computed: {
|
|
136
135
|
module: {
|
|
137
136
|
set(val) {
|
|
138
|
-
this.$emit(
|
|
137
|
+
this.$emit('input', val)
|
|
139
138
|
},
|
|
140
139
|
get() {
|
|
141
|
-
return this.$props.value
|
|
140
|
+
return this.$props.value
|
|
142
141
|
},
|
|
143
142
|
},
|
|
144
143
|
|
|
145
144
|
suffixIcon() {
|
|
146
145
|
if (this.isOpen) {
|
|
147
|
-
return
|
|
146
|
+
return 'el-icon-arrow-up'
|
|
148
147
|
} else {
|
|
149
|
-
return
|
|
148
|
+
return 'el-icon-arrow-down'
|
|
150
149
|
}
|
|
151
150
|
},
|
|
152
151
|
baseTimeTypeConfig() {
|
|
153
|
-
return baseTimeTypeConfig
|
|
152
|
+
return baseTimeTypeConfig
|
|
154
153
|
},
|
|
155
154
|
showModule() {
|
|
156
155
|
if (this.areaValue.length > 0) {
|
|
157
|
-
let text =
|
|
156
|
+
let text = ''
|
|
158
157
|
this.areaValue.forEach((item) => {
|
|
159
158
|
if (item.label) {
|
|
160
|
-
let value = text ? ` / ${item.label}` : item.label
|
|
161
|
-
text += `${value}
|
|
159
|
+
let value = text ? ` / ${item.label}` : item.label
|
|
160
|
+
text += `${value}`
|
|
162
161
|
}
|
|
163
|
-
})
|
|
164
|
-
return text
|
|
162
|
+
})
|
|
163
|
+
return text
|
|
165
164
|
}
|
|
166
|
-
return null
|
|
165
|
+
return null
|
|
167
166
|
},
|
|
168
167
|
areaJson() {
|
|
169
|
-
return areaJson
|
|
168
|
+
return areaJson
|
|
170
169
|
},
|
|
171
170
|
activeProvince() {
|
|
172
171
|
if (this.areaValue.length > 0) {
|
|
173
|
-
return this.areaValue[0].label
|
|
172
|
+
return this.areaValue[0].label
|
|
174
173
|
}
|
|
175
|
-
return null
|
|
174
|
+
return null
|
|
176
175
|
},
|
|
177
176
|
activeArea() {
|
|
178
177
|
if (this.areaValue.length > 1) {
|
|
179
|
-
return this.areaValue[this.activeIndex]?.label
|
|
178
|
+
return this.areaValue[this.activeIndex]?.label
|
|
180
179
|
}
|
|
181
|
-
return null
|
|
180
|
+
return null
|
|
182
181
|
},
|
|
183
182
|
areaList() {
|
|
184
183
|
if (this.activeObj && this.activeObj.children.length > 0) {
|
|
185
|
-
return this.activeObj.children
|
|
184
|
+
return this.activeObj.children
|
|
186
185
|
}
|
|
187
|
-
return []
|
|
186
|
+
return []
|
|
188
187
|
},
|
|
189
188
|
},
|
|
190
189
|
methods: {
|
|
191
190
|
init() {
|
|
192
191
|
if (this.module && this.module instanceof Object) {
|
|
193
192
|
for (let i = 0; i < areaConfig.length; i++) {
|
|
194
|
-
let item = areaConfig[i]
|
|
195
|
-
let value = this.module[`${item.value}`]
|
|
193
|
+
let item = areaConfig[i]
|
|
194
|
+
let value = this.module[`${item.value}`]
|
|
196
195
|
this.$set(this.areaValue, i, {
|
|
197
196
|
label: value,
|
|
198
197
|
pre: null,
|
|
199
|
-
})
|
|
198
|
+
})
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
},
|
|
203
202
|
eventShow() {
|
|
204
|
-
this.isOpen = true
|
|
203
|
+
this.isOpen = true
|
|
205
204
|
if (!this.isReview) {
|
|
206
|
-
this.review()
|
|
205
|
+
this.review()
|
|
207
206
|
}
|
|
208
|
-
this.setHandleConfig()
|
|
209
|
-
this.scrollToProvince()
|
|
207
|
+
this.setHandleConfig()
|
|
208
|
+
this.scrollToProvince()
|
|
210
209
|
},
|
|
211
210
|
setHandleConfig() {
|
|
212
|
-
console.log(this.$props.value)
|
|
211
|
+
console.log(this.$props.value)
|
|
213
212
|
this.handleConfig = [
|
|
214
213
|
{
|
|
215
|
-
type:
|
|
216
|
-
text: this.module ?
|
|
214
|
+
type: 'info',
|
|
215
|
+
text: this.module ? '清空' : '取消',
|
|
217
216
|
plain: false,
|
|
218
217
|
click: () => {
|
|
219
218
|
if (!this.module) {
|
|
220
|
-
this.cancelValue()
|
|
219
|
+
this.cancelValue()
|
|
221
220
|
} else {
|
|
222
|
-
this.cancelValue()
|
|
223
|
-
this.module = null
|
|
221
|
+
this.cancelValue()
|
|
222
|
+
this.module = null
|
|
224
223
|
}
|
|
225
224
|
},
|
|
226
225
|
},
|
|
227
226
|
{
|
|
228
|
-
type:
|
|
229
|
-
text:
|
|
227
|
+
type: 'primary',
|
|
228
|
+
text: '确定',
|
|
230
229
|
click: () => {
|
|
231
|
-
this.confirmValue()
|
|
230
|
+
this.confirmValue()
|
|
232
231
|
},
|
|
233
232
|
},
|
|
234
|
-
]
|
|
233
|
+
]
|
|
235
234
|
},
|
|
236
235
|
|
|
237
236
|
review() {
|
|
@@ -240,165 +239,165 @@ export default {
|
|
|
240
239
|
this.areaValue.forEach((item, index) => {
|
|
241
240
|
if (index == 0) {
|
|
242
241
|
let cindex = areaJson.findIndex((citem) => {
|
|
243
|
-
return citem.label == item.label
|
|
244
|
-
})
|
|
242
|
+
return citem.label == item.label
|
|
243
|
+
})
|
|
245
244
|
|
|
246
|
-
this.checkProvince(areaJson[cindex])
|
|
245
|
+
this.checkProvince(areaJson[cindex])
|
|
247
246
|
} else {
|
|
248
247
|
//console.log("else");
|
|
249
248
|
//console.log(this.activeObj);
|
|
250
249
|
if (this.activeObj && this.activeObj.children.length > 0) {
|
|
251
250
|
let cindex = this.activeObj.children.findIndex((citem) => {
|
|
252
|
-
return item.label == citem.label
|
|
253
|
-
})
|
|
251
|
+
return item.label == citem.label
|
|
252
|
+
})
|
|
254
253
|
|
|
255
|
-
this.checkArea(this.activeObj.children[cindex])
|
|
254
|
+
this.checkArea(this.activeObj.children[cindex])
|
|
256
255
|
}
|
|
257
256
|
}
|
|
258
|
-
})
|
|
257
|
+
})
|
|
259
258
|
|
|
260
|
-
this.isReview = true
|
|
259
|
+
this.isReview = true
|
|
261
260
|
},
|
|
262
261
|
|
|
263
262
|
eventHide() {
|
|
264
|
-
this.isOpen = false
|
|
265
|
-
this.cancelValue()
|
|
263
|
+
this.isOpen = false
|
|
264
|
+
this.cancelValue()
|
|
266
265
|
},
|
|
267
266
|
|
|
268
267
|
openSelectWrap() {
|
|
269
|
-
if (this.$props.disable) return
|
|
270
|
-
this.isOpen = !this.isOpen
|
|
268
|
+
if (this.$props.disable) return
|
|
269
|
+
this.isOpen = !this.isOpen
|
|
271
270
|
},
|
|
272
271
|
// 选择省份
|
|
273
272
|
checkProvince(province) {
|
|
274
|
-
this.activeIndex = 0
|
|
275
|
-
this.areaValue = []
|
|
273
|
+
this.activeIndex = 0
|
|
274
|
+
this.areaValue = []
|
|
276
275
|
this.$set(this.areaValue, 0, {
|
|
277
276
|
label: province.label,
|
|
278
277
|
pre: null,
|
|
279
278
|
value: province.value,
|
|
280
|
-
})
|
|
279
|
+
})
|
|
281
280
|
|
|
282
281
|
if (province.children.length > 0) {
|
|
283
|
-
this.activeObj = province
|
|
284
|
-
this.activeIndex += 1
|
|
282
|
+
this.activeObj = province
|
|
283
|
+
this.activeIndex += 1
|
|
285
284
|
}
|
|
286
|
-
this.isReview = true
|
|
285
|
+
this.isReview = true
|
|
287
286
|
},
|
|
288
287
|
// 选择地区
|
|
289
288
|
checkArea(area) {
|
|
290
289
|
if (!area) {
|
|
291
|
-
this.isReview = true
|
|
292
|
-
return
|
|
290
|
+
this.isReview = true
|
|
291
|
+
return
|
|
293
292
|
}
|
|
294
293
|
|
|
295
|
-
let pre = this.areaValue[this.activeIndex]
|
|
294
|
+
let pre = this.areaValue[this.activeIndex]
|
|
296
295
|
if (!pre) {
|
|
297
296
|
this.$set(this.areaValue, this.activeIndex, {
|
|
298
297
|
label: area.label,
|
|
299
298
|
pre: this.activeObj,
|
|
300
299
|
value: area.value,
|
|
301
|
-
})
|
|
300
|
+
})
|
|
302
301
|
} else {
|
|
303
|
-
pre.label = area.label
|
|
302
|
+
pre.label = area.label
|
|
304
303
|
}
|
|
305
304
|
|
|
306
305
|
if (area.children) {
|
|
307
|
-
this.activeObj = area
|
|
308
|
-
this.activeIndex += 1
|
|
306
|
+
this.activeObj = area
|
|
307
|
+
this.activeIndex += 1
|
|
309
308
|
}
|
|
310
|
-
this.isReview = true
|
|
309
|
+
this.isReview = true
|
|
311
310
|
},
|
|
312
311
|
|
|
313
312
|
// 返回
|
|
314
313
|
backArea() {
|
|
315
314
|
//console.log(this.activeIndex);
|
|
316
315
|
//console.log(this.areaValue);
|
|
317
|
-
let currentArea = this.areaValue[this.activeIndex - 1]
|
|
318
|
-
this.areaValue.splice(this.activeIndex, 1)
|
|
319
|
-
this.activeIndex -= 1
|
|
316
|
+
let currentArea = this.areaValue[this.activeIndex - 1]
|
|
317
|
+
this.areaValue.splice(this.activeIndex, 1)
|
|
318
|
+
this.activeIndex -= 1
|
|
320
319
|
if (currentArea.pre) {
|
|
321
|
-
this.activeObj = currentArea.pre
|
|
320
|
+
this.activeObj = currentArea.pre
|
|
322
321
|
}
|
|
323
322
|
},
|
|
324
323
|
|
|
325
324
|
deleteCheck() {
|
|
326
325
|
if (this.activeIndex == 1) {
|
|
327
|
-
this.areaValue.splice(this.activeIndex, 1)
|
|
326
|
+
this.areaValue.splice(this.activeIndex, 1)
|
|
328
327
|
} else {
|
|
329
|
-
this.backArea()
|
|
328
|
+
this.backArea()
|
|
330
329
|
}
|
|
331
330
|
},
|
|
332
331
|
|
|
333
332
|
cancelValue() {
|
|
334
333
|
if (!this.module) {
|
|
335
|
-
this.areaValue = []
|
|
334
|
+
this.areaValue = []
|
|
336
335
|
} else {
|
|
337
|
-
this.init()
|
|
336
|
+
this.init()
|
|
338
337
|
// this.module = null;
|
|
339
|
-
this.isReview = false
|
|
338
|
+
this.isReview = false
|
|
340
339
|
}
|
|
341
|
-
this.doClose()
|
|
340
|
+
this.doClose()
|
|
342
341
|
},
|
|
343
342
|
|
|
344
343
|
confirmValue() {
|
|
345
|
-
let value = {}
|
|
346
|
-
let valueId = []
|
|
344
|
+
let value = {}
|
|
345
|
+
let valueId = []
|
|
347
346
|
for (let i = 0; i < this.areaValue.length; i++) {
|
|
348
|
-
const item = this.areaValue[i]
|
|
349
|
-
const flag = i == this.areaValue.length - 1
|
|
350
|
-
value[`${areaConfig[i].value}`] = item.label
|
|
351
|
-
valueId.push(item.value)
|
|
347
|
+
const item = this.areaValue[i]
|
|
348
|
+
const flag = i == this.areaValue.length - 1
|
|
349
|
+
value[`${areaConfig[i].value}`] = item.label
|
|
350
|
+
valueId.push(item.value)
|
|
352
351
|
}
|
|
353
|
-
value.idList = valueId
|
|
354
|
-
if (JSON.stringify(value) !=
|
|
355
|
-
this.module = value
|
|
352
|
+
value.idList = valueId
|
|
353
|
+
if (JSON.stringify(value) != '{}') {
|
|
354
|
+
this.module = value
|
|
356
355
|
}
|
|
357
356
|
this.$nextTick(() => {
|
|
358
|
-
if (this.$parent.$options._componentTag ==
|
|
359
|
-
this.$emit(
|
|
357
|
+
if (this.$parent.$options._componentTag == 'el-form-item') {
|
|
358
|
+
this.$emit('confirmAreaValue')
|
|
360
359
|
} else {
|
|
361
|
-
this.$emit(
|
|
362
|
-
this.doClose()
|
|
360
|
+
this.$emit('confirmAreaValue', value)
|
|
361
|
+
this.doClose()
|
|
363
362
|
}
|
|
364
|
-
})
|
|
363
|
+
})
|
|
365
364
|
},
|
|
366
365
|
|
|
367
366
|
doClose() {
|
|
368
|
-
this.$refs.popover.doClose()
|
|
367
|
+
this.$refs.popover.doClose()
|
|
369
368
|
},
|
|
370
369
|
|
|
371
370
|
// 滚动到指定位置
|
|
372
371
|
scrollToProvince() {
|
|
373
372
|
if (this.areaValue.length > 0) {
|
|
374
|
-
let index = 0
|
|
375
|
-
let label = this.areaValue[0].label
|
|
373
|
+
let index = 0
|
|
374
|
+
let label = this.areaValue[0].label
|
|
376
375
|
for (let i = 0; i < areaJson.length; i++) {
|
|
377
|
-
let item = areaJson[i]
|
|
376
|
+
let item = areaJson[i]
|
|
378
377
|
if (item.label == label) {
|
|
379
|
-
index = i
|
|
380
|
-
break
|
|
378
|
+
index = i
|
|
379
|
+
break
|
|
381
380
|
}
|
|
382
381
|
}
|
|
383
|
-
let refs = this.$refs.middleLeft
|
|
382
|
+
let refs = this.$refs.middleLeft
|
|
384
383
|
this.$nextTick(() => {
|
|
385
|
-
refs.scrollTop = refs.childNodes[index].offsetTop - refs.clientHeight
|
|
386
|
-
})
|
|
384
|
+
refs.scrollTop = refs.childNodes[index].offsetTop - refs.clientHeight
|
|
385
|
+
})
|
|
387
386
|
}
|
|
388
387
|
},
|
|
389
388
|
},
|
|
390
389
|
watch: {
|
|
391
390
|
module(newVal, oldVal) {
|
|
392
391
|
if (!newVal) {
|
|
393
|
-
this.areaValue = []
|
|
394
|
-
return
|
|
392
|
+
this.areaValue = []
|
|
393
|
+
return
|
|
395
394
|
}
|
|
396
|
-
if (this.$parent.$options._componentTag ==
|
|
397
|
-
this.init()
|
|
395
|
+
if (this.$parent.$options._componentTag == 'el-form-item') {
|
|
396
|
+
this.init()
|
|
398
397
|
}
|
|
399
398
|
},
|
|
400
399
|
},
|
|
401
|
-
}
|
|
400
|
+
}
|
|
402
401
|
</script>
|
|
403
402
|
|
|
404
403
|
<style lang="less" scoped>
|
|
@@ -429,7 +428,9 @@ export default {
|
|
|
429
428
|
.area-select-content {
|
|
430
429
|
width: 400px;
|
|
431
430
|
height: 300px;
|
|
431
|
+
box-sizing: border-box;
|
|
432
432
|
background: var(--bg-white);
|
|
433
|
+
padding: 0px var(--padding-4);
|
|
433
434
|
.content-title {
|
|
434
435
|
width: 100%;
|
|
435
436
|
height: 40px;
|
|
@@ -2,24 +2,27 @@
|
|
|
2
2
|
<div
|
|
3
3
|
class="base-icon-wrap"
|
|
4
4
|
:title="title"
|
|
5
|
-
@click.stop="iconClick"
|
|
6
5
|
:class="{ event: event && !disable, plain: plain, disable: disable }"
|
|
7
6
|
>
|
|
8
|
-
<i
|
|
7
|
+
<i
|
|
8
|
+
@click.stop="iconClick"
|
|
9
|
+
:class="iconName"
|
|
10
|
+
:style="{ color: _color, fontSize: _size }"
|
|
11
|
+
></i>
|
|
9
12
|
</div>
|
|
10
13
|
</template>
|
|
11
14
|
|
|
12
15
|
<script>
|
|
13
16
|
export default {
|
|
14
|
-
name:
|
|
17
|
+
name: 'baseIcon',
|
|
15
18
|
data() {
|
|
16
|
-
return {}
|
|
19
|
+
return {}
|
|
17
20
|
},
|
|
18
21
|
|
|
19
22
|
props: {
|
|
20
23
|
iconClass: {
|
|
21
24
|
type: String,
|
|
22
|
-
default:
|
|
25
|
+
default: 'meixi',
|
|
23
26
|
},
|
|
24
27
|
event: {
|
|
25
28
|
type: Boolean,
|
|
@@ -30,11 +33,11 @@ export default {
|
|
|
30
33
|
require: true,
|
|
31
34
|
},
|
|
32
35
|
color: {
|
|
33
|
-
default:
|
|
36
|
+
default: 'd',
|
|
34
37
|
type: String,
|
|
35
38
|
},
|
|
36
39
|
size: {
|
|
37
|
-
default:
|
|
40
|
+
default: 'd',
|
|
38
41
|
type: String,
|
|
39
42
|
},
|
|
40
43
|
active: {
|
|
@@ -55,65 +58,66 @@ export default {
|
|
|
55
58
|
},
|
|
56
59
|
computed: {
|
|
57
60
|
_color() {
|
|
58
|
-
let color = null
|
|
61
|
+
let color = null
|
|
59
62
|
if (this.$props.active) {
|
|
60
|
-
color = `var(--color-primary)
|
|
61
|
-
return color
|
|
63
|
+
color = `var(--color-primary)`
|
|
64
|
+
return color
|
|
62
65
|
}
|
|
63
|
-
let propsColor = this.$props.color
|
|
66
|
+
let propsColor = this.$props.color
|
|
64
67
|
switch (propsColor) {
|
|
65
|
-
case
|
|
66
|
-
color = `var(--icon-color-d)
|
|
67
|
-
break
|
|
68
|
-
case
|
|
69
|
-
color = `var(--icon-color-m)
|
|
70
|
-
break
|
|
71
|
-
case
|
|
72
|
-
color = `var(--icon-color-s)
|
|
73
|
-
break
|
|
68
|
+
case 'd':
|
|
69
|
+
color = `var(--icon-color-d)`
|
|
70
|
+
break
|
|
71
|
+
case 'm':
|
|
72
|
+
color = `var(--icon-color-m)`
|
|
73
|
+
break
|
|
74
|
+
case 's':
|
|
75
|
+
color = `var(--icon-color-s)`
|
|
76
|
+
break
|
|
74
77
|
default:
|
|
75
|
-
color = `var(--${propsColor})
|
|
76
|
-
break
|
|
78
|
+
color = `var(--${propsColor})`
|
|
79
|
+
break
|
|
77
80
|
}
|
|
78
|
-
return color
|
|
81
|
+
return color
|
|
79
82
|
},
|
|
80
83
|
_size() {
|
|
81
|
-
let size = null
|
|
84
|
+
let size = null
|
|
82
85
|
switch (this.$props.size) {
|
|
83
|
-
case
|
|
84
|
-
size = `var(--icon-size-s)
|
|
85
|
-
break
|
|
86
|
-
case
|
|
87
|
-
size = `var(--icon-size-base)
|
|
88
|
-
break
|
|
89
|
-
case
|
|
90
|
-
size = `var(--icon-size-l)
|
|
91
|
-
break
|
|
86
|
+
case 's':
|
|
87
|
+
size = `var(--icon-size-s)`
|
|
88
|
+
break
|
|
89
|
+
case 'd':
|
|
90
|
+
size = `var(--icon-size-base)`
|
|
91
|
+
break
|
|
92
|
+
case 'l':
|
|
93
|
+
size = `var(--icon-size-l)`
|
|
94
|
+
break
|
|
92
95
|
|
|
93
96
|
default:
|
|
94
|
-
break
|
|
97
|
+
break
|
|
95
98
|
}
|
|
96
|
-
return size
|
|
99
|
+
return size
|
|
97
100
|
},
|
|
98
101
|
iconName() {
|
|
99
|
-
let _iconClass = this.$props.iconClass
|
|
100
|
-
if (_iconClass ==
|
|
101
|
-
return `meixicomponenticonfont ${this.$props.name}
|
|
102
|
-
} else if (_iconClass ==
|
|
103
|
-
return `${this.$props.name}
|
|
104
|
-
} else if (_iconClass ==
|
|
105
|
-
return `${this.$props.name}
|
|
102
|
+
let _iconClass = this.$props.iconClass
|
|
103
|
+
if (_iconClass == 'meixi') {
|
|
104
|
+
return `meixicomponenticonfont ${this.$props.name}`
|
|
105
|
+
} else if (_iconClass == 'element') {
|
|
106
|
+
return `${this.$props.name}`
|
|
107
|
+
} else if (_iconClass == 'other') {
|
|
108
|
+
return `${this.$props.name}`
|
|
106
109
|
}
|
|
107
110
|
},
|
|
108
111
|
},
|
|
109
112
|
methods: {
|
|
110
113
|
iconClick() {
|
|
111
114
|
if (this.$props.event) {
|
|
112
|
-
|
|
115
|
+
console.log('das')
|
|
116
|
+
this.$emit('iconClick')
|
|
113
117
|
}
|
|
114
118
|
},
|
|
115
119
|
},
|
|
116
|
-
}
|
|
120
|
+
}
|
|
117
121
|
</script>
|
|
118
122
|
|
|
119
123
|
<style lang="less" scoped>
|
|
@@ -139,7 +143,7 @@ export default {
|
|
|
139
143
|
&:hover {
|
|
140
144
|
// background: var(--hover-gray);
|
|
141
145
|
i {
|
|
142
|
-
color: var(--color-primary)
|
|
146
|
+
color: var(--color-primary);
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
}
|