lw-cdp-ui 1.4.18 → 1.4.20
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/dist/components/lwFormMini/ViewItem.vue +123 -103
- package/dist/components/lwLayout/components/aside.vue +6 -1
- package/dist/components/lwLayout/components/tags.vue +4 -3
- package/dist/components/lwLayout/components/userbar.vue +36 -24
- package/dist/components/lwLayout/index.vue +19 -54
- package/dist/components/lwTour/index.vue +16 -5
- package/dist/components/lwUpload/index.vue +143 -147
- package/dist/lw-cdp-ui.esm.js +4231 -4131
- package/dist/lw-cdp-ui.umd.js +17 -13
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<!-- 间隔标题 -->
|
|
3
|
-
<div
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
<div
|
|
4
|
+
v-if="item.component == 'divider'"
|
|
5
|
+
class="title-name title-name-divider"
|
|
6
|
+
:id="'divider-' + item.label"
|
|
7
|
+
:data-index="item.label">
|
|
7
8
|
<span>
|
|
8
9
|
{{ item.label }}
|
|
9
10
|
<el-tooltip v-if="item.tips">
|
|
10
11
|
<template #content>
|
|
11
|
-
<span style="max-width: 300px; display: inline-block
|
|
12
|
+
<span style="max-width: 300px; display: inline-block">
|
|
12
13
|
{{ item.tips }}
|
|
13
14
|
</span>
|
|
14
15
|
</template>
|
|
@@ -16,61 +17,54 @@
|
|
|
16
17
|
</el-tooltip>
|
|
17
18
|
</span>
|
|
18
19
|
<slot :name="item?.options?.component"></slot>
|
|
19
|
-
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
22
|
<!-- 表单内容 -->
|
|
23
|
-
<el-form-item
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
<el-form-item
|
|
24
|
+
v-else
|
|
25
|
+
:class="{ 'form-item-name-null': !item?.label }"
|
|
26
|
+
:prop="getPropName(item)"
|
|
27
|
+
:rules="rulesHandle(item)">
|
|
27
28
|
<template #label>
|
|
28
29
|
{{ item.label }}
|
|
29
|
-
<el-tooltip v-if="item.tips"
|
|
30
|
-
:raw-content="item?.rawContent"
|
|
31
|
-
:content="item.tips">
|
|
30
|
+
<el-tooltip v-if="item.tips" :raw-content="item?.rawContent" :content="item.tips">
|
|
32
31
|
<el-icon><el-icon-question-filled /></el-icon>
|
|
33
32
|
</el-tooltip>
|
|
34
33
|
</template>
|
|
35
34
|
|
|
36
35
|
<!-- input -->
|
|
37
36
|
<template v-if="item.component == 'input'">
|
|
38
|
-
<template
|
|
39
|
-
|
|
40
|
-
<
|
|
41
|
-
:password="item?.options?.password" />
|
|
42
|
-
<template
|
|
43
|
-
v-if="item?.options?.append">{{ item?.options.append }}</template>
|
|
44
|
-
|
|
37
|
+
<template v-if="item?.options?.prepend">{{ item?.options.prepend }}</template>
|
|
38
|
+
<textToPassword v-model="objItem.value" :password="item?.options?.password" />
|
|
39
|
+
<template v-if="item?.options?.append">{{ item?.options.append }}</template>
|
|
45
40
|
</template>
|
|
46
41
|
<!-- upload -->
|
|
47
42
|
<template v-else-if="item.component == 'upload'">
|
|
48
|
-
<template v-for="(_item, _index) in objItem?.options.items"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
43
|
+
<template v-for="(_item, _index) in objItem?.options.items" :key="_index">
|
|
44
|
+
<lw-upload
|
|
45
|
+
v-model="_item.value"
|
|
46
|
+
:height="item.height"
|
|
47
|
+
:width="item.width"
|
|
48
|
+
:maxSize="_item.maxSize"
|
|
49
|
+
:accept="_item.accept"
|
|
50
|
+
:title="_item.label"
|
|
51
|
+
:parseData="item.parseData"
|
|
52
|
+
:disabled="true"
|
|
53
|
+
:multiple="_item?.multiple"
|
|
54
|
+
:limit="_item?.limit"
|
|
55
|
+
:returnFile="_item?.returnFile"
|
|
56
|
+
:tip="_item?.tip"
|
|
57
|
+
:apiObj="item.apiObj"></lw-upload>
|
|
64
58
|
</template>
|
|
65
59
|
</template>
|
|
66
60
|
<!-- checkbox -->
|
|
67
61
|
<template v-else-if="item.component == 'checkbox'">
|
|
68
|
-
<template v-for="(_item, _index) in objItem?.options.items"
|
|
69
|
-
|
|
62
|
+
<template v-for="(_item, _index) in objItem?.options.items" :key="_index">
|
|
63
|
+
{{ getKeyToLabel(_item.value, objItem?.options.items) }}
|
|
64
|
+
</template>
|
|
70
65
|
</template>
|
|
71
66
|
<!-- checkboxGroup 、select、radio -->
|
|
72
|
-
<template
|
|
73
|
-
v-else-if="item.component == 'checkboxGroup' || item.component == 'select' || item.component == 'radio'">
|
|
67
|
+
<template v-else-if="item.component == 'checkboxGroup' || item.component == 'select' || item.component == 'radio'">
|
|
74
68
|
{{ getKeyToLabel(objItem.value, item?.options) }}
|
|
75
69
|
</template>
|
|
76
70
|
|
|
@@ -80,24 +74,11 @@
|
|
|
80
74
|
</template>
|
|
81
75
|
<!-- treeSelect -->
|
|
82
76
|
<template v-else-if="item.component == 'treeSelect'">
|
|
83
|
-
|
|
84
|
-
:props="item?.options?.props"
|
|
85
|
-
disabled
|
|
86
|
-
:node-Key="item?.options?.nodeKey"
|
|
87
|
-
:multiple="item?.options?.multiple"
|
|
88
|
-
:check-Strictly="item?.options?.checkStrictly"
|
|
89
|
-
:data="item?.options?.items"></el-tree-select>
|
|
90
|
-
|
|
77
|
+
{{ getLabelByValue(item.options.items, objItem.value, item.options.props) }}
|
|
91
78
|
</template>
|
|
92
79
|
<!-- cascader -->
|
|
93
80
|
<template v-else-if="item.component == 'cascader'">
|
|
94
|
-
|
|
95
|
-
style="width: 100%;"
|
|
96
|
-
:props="item?.options?.props"
|
|
97
|
-
:separator="item?.options?.separator"
|
|
98
|
-
disabled
|
|
99
|
-
:options="item?.options.items"
|
|
100
|
-
clearable></el-cascader>
|
|
81
|
+
{{ getCascaderLabel(item.options.items, objItem.value, item.options.props) }}
|
|
101
82
|
</template>
|
|
102
83
|
<!-- date -->
|
|
103
84
|
<template v-else-if="item.component == 'date'">
|
|
@@ -105,7 +86,13 @@
|
|
|
105
86
|
{{ dayjs(objItem.value).format(item?.options?.valueFormat || 'YYYY-MM-DD HH:mm:ss') }}
|
|
106
87
|
</template>
|
|
107
88
|
<template v-if="typeof objItem.value == 'object'">
|
|
108
|
-
{{
|
|
89
|
+
{{
|
|
90
|
+
objItem.value.length > 0
|
|
91
|
+
? dayjs(objItem.value[0]).format(item?.options?.valueFormat || 'YYYY-MM-DD HH:mm:ss') +
|
|
92
|
+
' - ' +
|
|
93
|
+
dayjs(objItem.value[1]).format(item?.options?.valueFormat || 'YYYY-MM-DD HH:mm:ss')
|
|
94
|
+
: '--'
|
|
95
|
+
}}
|
|
109
96
|
</template>
|
|
110
97
|
</template>
|
|
111
98
|
<!-- number -->
|
|
@@ -117,27 +104,21 @@
|
|
|
117
104
|
</template>
|
|
118
105
|
<!-- color -->
|
|
119
106
|
<template v-else-if="item.component == 'color'">
|
|
120
|
-
<el-color-picker v-model="objItem.value"
|
|
121
|
-
disabled />
|
|
107
|
+
<el-color-picker v-model="objItem.value" disabled />
|
|
122
108
|
</template>
|
|
123
109
|
<!-- rate -->
|
|
124
110
|
<template v-else-if="item.component == 'rate'">
|
|
125
|
-
<el-rate style="margin-top: 6px
|
|
126
|
-
v-model="objItem.value"
|
|
127
|
-
disabled></el-rate>
|
|
111
|
+
<el-rate style="margin-top: 6px" v-model="objItem.value" disabled></el-rate>
|
|
128
112
|
</template>
|
|
129
113
|
<!-- slider -->
|
|
130
114
|
<template v-else-if="item.component == 'slider'">
|
|
131
|
-
<el-slider v-model="objItem.value"
|
|
132
|
-
:marks="item?.options.marks"
|
|
133
|
-
disabled></el-slider>
|
|
115
|
+
<el-slider v-model="objItem.value" :marks="item?.options.marks" disabled></el-slider>
|
|
134
116
|
</template>
|
|
135
117
|
|
|
136
118
|
<!-- tags -->
|
|
137
119
|
<template v-else-if="item.component == 'tags'">
|
|
138
120
|
<div class="tags-list">
|
|
139
|
-
<el-tag v-for="tag in objItem.value"
|
|
140
|
-
:key="tag">
|
|
121
|
+
<el-tag v-for="tag in objItem.value" :key="tag">
|
|
141
122
|
{{ tag }}
|
|
142
123
|
</el-tag>
|
|
143
124
|
</div>
|
|
@@ -145,15 +126,11 @@
|
|
|
145
126
|
|
|
146
127
|
<!-- 没有组件是component值 就是插槽名称 -->
|
|
147
128
|
<template v-else>
|
|
148
|
-
<slot :name="item.component"
|
|
149
|
-
|
|
150
|
-
:formCur="form">
|
|
151
|
-
<el-tag type="danger">[{{ item.component }}]
|
|
152
|
-
没有这个默认组件也未自定义插槽内容</el-tag>
|
|
129
|
+
<slot :name="item.component" :itemCur="item" :formCur="form">
|
|
130
|
+
<el-tag type="danger">[{{ item.component }}] 没有这个默认组件也未自定义插槽内容</el-tag>
|
|
153
131
|
</slot>
|
|
154
132
|
</template>
|
|
155
|
-
<div v-if="item.message"
|
|
156
|
-
class="el-form-item-msg">{{ item.message }}</div>
|
|
133
|
+
<div v-if="item.message" class="el-form-item-msg">{{ item.message }}</div>
|
|
157
134
|
</el-form-item>
|
|
158
135
|
</template>
|
|
159
136
|
|
|
@@ -178,7 +155,7 @@ export default {
|
|
|
178
155
|
props: {
|
|
179
156
|
item: {
|
|
180
157
|
type: Object,
|
|
181
|
-
default: () => {
|
|
158
|
+
default: () => {}
|
|
182
159
|
},
|
|
183
160
|
index: {
|
|
184
161
|
type: Number,
|
|
@@ -186,7 +163,7 @@ export default {
|
|
|
186
163
|
},
|
|
187
164
|
form: {
|
|
188
165
|
type: Object,
|
|
189
|
-
default: () => {
|
|
166
|
+
default: () => {}
|
|
190
167
|
}
|
|
191
168
|
},
|
|
192
169
|
watch: {
|
|
@@ -202,11 +179,10 @@ export default {
|
|
|
202
179
|
if (this.item.component === 'checkbox' || this.item.component === 'upload') {
|
|
203
180
|
this.objItem.options?.items?.forEach((option) => {
|
|
204
181
|
option.value = this.flattenObject(this.form, option.name, option.value)
|
|
205
|
-
})
|
|
182
|
+
})
|
|
206
183
|
} else {
|
|
207
184
|
this.objItem.value = this.flattenObject(this.form, this.item.name, this.objItem.value)
|
|
208
185
|
}
|
|
209
|
-
|
|
210
186
|
},
|
|
211
187
|
immediate: true,
|
|
212
188
|
deep: true
|
|
@@ -216,48 +192,52 @@ export default {
|
|
|
216
192
|
if (val.component === 'checkbox' || val.component === 'upload') {
|
|
217
193
|
val.options?.items?.forEach((option) => {
|
|
218
194
|
this.unflattenObject(this.form, option.name, option.value)
|
|
219
|
-
})
|
|
195
|
+
})
|
|
220
196
|
} else {
|
|
221
197
|
this.unflattenObject(this.form, val.name, val.value)
|
|
222
198
|
}
|
|
223
199
|
},
|
|
224
200
|
deep: true
|
|
225
|
-
}
|
|
201
|
+
}
|
|
226
202
|
},
|
|
227
203
|
methods: {
|
|
204
|
+
dayjs: dayjs,
|
|
228
205
|
flattenObject(obj, key, defaultValue = '') {
|
|
229
|
-
if (!key || !obj) {
|
|
230
|
-
|
|
206
|
+
if (!key || !obj) {
|
|
207
|
+
return false
|
|
208
|
+
}
|
|
209
|
+
const keys = key.split('.') // 将路径拆分成数组
|
|
231
210
|
|
|
232
|
-
let current = obj
|
|
211
|
+
let current = obj
|
|
233
212
|
// 遍历路径并逐层查找
|
|
234
213
|
for (let i = 0; i < keys.length; i++) {
|
|
235
214
|
// 如果当前层级不存在,则创建该层级对象
|
|
236
215
|
if (current[keys[i]] === undefined) {
|
|
237
|
-
current[keys[i]] =
|
|
216
|
+
current[keys[i]] = i === keys.length - 1 ? defaultValue : {} // 如果是最后一个层级,设为默认值,否则创建空对象
|
|
238
217
|
}
|
|
239
218
|
// 否则,继续向下查找
|
|
240
|
-
current = current[keys[i]]
|
|
219
|
+
current = current[keys[i]]
|
|
241
220
|
}
|
|
242
|
-
return current
|
|
221
|
+
return current
|
|
243
222
|
},
|
|
244
223
|
unflattenObject(obj, path, value) {
|
|
245
|
-
if (!path || !obj) {
|
|
246
|
-
|
|
224
|
+
if (!path || !obj) {
|
|
225
|
+
return false
|
|
226
|
+
}
|
|
227
|
+
const keys = path.split('.') // 按点分隔路径
|
|
247
228
|
|
|
248
229
|
keys.forEach((key, index) => {
|
|
249
230
|
if (index === keys.length - 1) {
|
|
250
231
|
// 最后一级,直接赋值
|
|
251
|
-
obj[key] = value
|
|
232
|
+
obj[key] = value
|
|
252
233
|
} else {
|
|
253
234
|
// 如果不存在该层级,创建空对象
|
|
254
235
|
if (!obj[key] || typeof obj[key] !== 'object') {
|
|
255
|
-
obj[key] = {}
|
|
236
|
+
obj[key] = {}
|
|
256
237
|
}
|
|
257
|
-
obj = obj[key]
|
|
238
|
+
obj = obj[key] // 进入下一层
|
|
258
239
|
}
|
|
259
|
-
})
|
|
260
|
-
|
|
240
|
+
})
|
|
261
241
|
},
|
|
262
242
|
// prop NAME
|
|
263
243
|
getPropName(item) {
|
|
@@ -271,33 +251,72 @@ export default {
|
|
|
271
251
|
rulesHandle(item) {
|
|
272
252
|
if (item.requiredHandle) {
|
|
273
253
|
try {
|
|
274
|
-
const requiredHandleFunc = new Function(
|
|
275
|
-
const exp = requiredHandleFunc(this.form)
|
|
254
|
+
const requiredHandleFunc = new Function('form', `return ${item.requiredHandle.replace(/\$/g, 'form')}`)
|
|
255
|
+
const exp = requiredHandleFunc(this.form)
|
|
276
256
|
|
|
277
|
-
const requiredRule = item.rules.find(t => 'required' in t)
|
|
257
|
+
const requiredRule = item.rules.find((t) => 'required' in t)
|
|
278
258
|
if (requiredRule) {
|
|
279
|
-
requiredRule.required = exp
|
|
259
|
+
requiredRule.required = exp
|
|
280
260
|
}
|
|
281
261
|
} catch (error) {
|
|
282
|
-
console.error(
|
|
262
|
+
console.error('Error requiredHandle function:', error)
|
|
283
263
|
}
|
|
284
264
|
}
|
|
285
|
-
return item.rules
|
|
265
|
+
return item.rules
|
|
286
266
|
},
|
|
287
267
|
// key to label
|
|
288
268
|
getKeyToLabel(val, options = {}) {
|
|
289
269
|
if (!options?.multiple) {
|
|
290
270
|
val = [val]
|
|
291
271
|
}
|
|
292
|
-
let items = options.items.filter(item => {
|
|
293
|
-
|
|
272
|
+
let items = options.items.filter((item) => {
|
|
273
|
+
return val.includes(item.value)
|
|
274
|
+
})
|
|
275
|
+
return items?.map((item) => item.label).join('、') || val || '--'
|
|
294
276
|
},
|
|
295
|
-
|
|
277
|
+
// 根据 value 从树形数据中查找 label(支持自定义 props)
|
|
278
|
+
getLabelByValue(data, value, props = {}) {
|
|
279
|
+
const {
|
|
280
|
+
value: valueKey = 'value', // 默认字段名:value
|
|
281
|
+
label: labelKey = 'label', // 默认字段名:label
|
|
282
|
+
children: childrenKey = 'children' // 默认字段名:children
|
|
283
|
+
} = props
|
|
284
|
+
|
|
285
|
+
const findNode = (nodes) => {
|
|
286
|
+
for (const node of nodes) {
|
|
287
|
+
if (node[valueKey] === value) return node[labelKey]
|
|
288
|
+
if (node[childrenKey]) {
|
|
289
|
+
const result = findNode(node[childrenKey])
|
|
290
|
+
if (result) return result
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return '--' // 未匹配时显示占位符
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
return findNode(data)
|
|
297
|
+
},
|
|
298
|
+
// 获取级联数据的完整路径标签(如 "浙江 / 杭州 / 西湖")
|
|
299
|
+
getCascaderLabel(data, value, props = {}) {
|
|
300
|
+
const { value: valueKey = 'value', label: labelKey = 'label', children: childrenKey = 'children' } = props
|
|
301
|
+
|
|
302
|
+
const findPath = (nodes, target, path = []) => {
|
|
303
|
+
for (const node of nodes) {
|
|
304
|
+
if (node[valueKey] === target) return [...path, node[labelKey]]
|
|
305
|
+
if (node[childrenKey]) {
|
|
306
|
+
const result = findPath(node[childrenKey], target, [...path, node[labelKey]])
|
|
307
|
+
if (result) return result
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
return []
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
const labels = findPath(data, value)
|
|
314
|
+
return labels.join(' / ') || '--'
|
|
315
|
+
}
|
|
296
316
|
}
|
|
297
317
|
}
|
|
298
318
|
</script>
|
|
299
319
|
|
|
300
|
-
|
|
301
320
|
<style lang="scss" scoped>
|
|
302
321
|
.w-20 {
|
|
303
322
|
width: 100px;
|
|
@@ -313,8 +332,9 @@ export default {
|
|
|
313
332
|
& + .button-new-tag {
|
|
314
333
|
margin-left: 10px;
|
|
315
334
|
}
|
|
335
|
+
|
|
316
336
|
& + .w-20 {
|
|
317
337
|
margin-left: 10px;
|
|
318
338
|
}
|
|
319
339
|
}
|
|
320
|
-
</style>
|
|
340
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="layout-aside">
|
|
3
3
|
|
|
4
|
-
<slot name="logo">
|
|
4
|
+
<slot name="logo" v-if="unPassport">
|
|
5
5
|
<img class="logo" src="../../../assets/images/logo.svg" alt="" @click="openMneu">
|
|
6
6
|
</slot>
|
|
7
7
|
|
|
@@ -38,6 +38,11 @@
|
|
|
38
38
|
export default {
|
|
39
39
|
name: 'layoutAside',
|
|
40
40
|
props: {
|
|
41
|
+
// 不是passport
|
|
42
|
+
unPassport: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: true
|
|
45
|
+
},
|
|
41
46
|
},
|
|
42
47
|
data() {
|
|
43
48
|
return {
|
|
@@ -116,15 +116,16 @@ export default {
|
|
|
116
116
|
window.addEventListener('resize', () => {
|
|
117
117
|
this.changeLeftRight()
|
|
118
118
|
})
|
|
119
|
-
|
|
120
|
-
mounted() {
|
|
121
|
-
this.scrollInit()
|
|
119
|
+
|
|
122
120
|
|
|
123
121
|
// 判断是否有指引组件
|
|
124
122
|
this.$bus.$on(`lwTourOpen`, (val) => {
|
|
125
123
|
this.isOpenTour = val
|
|
126
124
|
})
|
|
127
125
|
},
|
|
126
|
+
mounted() {
|
|
127
|
+
this.scrollInit()
|
|
128
|
+
},
|
|
128
129
|
methods: {
|
|
129
130
|
// 初始化
|
|
130
131
|
init() {
|
|
@@ -1,48 +1,39 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="user-bar">
|
|
3
|
-
<
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
<template v-if="unPassport">
|
|
4
|
+
<slot name="userbarActionBox"></slot>
|
|
5
|
+
<!-- 任务中心 -->
|
|
6
|
+
<task v-if="isShowTask" />
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
<!-- 下拉BU -->
|
|
9
|
+
<bu v-if="isShowBu" :isInitialized="isInitialized" />
|
|
10
|
+
</template>
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@command="handleUser">
|
|
12
|
+
|
|
13
|
+
<el-dropdown class="user panel-item" trigger="click" @command="handleUser">
|
|
14
14
|
<div class="user-avatar">
|
|
15
|
-
<el-avatar :size="30"
|
|
16
|
-
:src="$store.state.user.img || empty"></el-avatar>
|
|
15
|
+
<el-avatar :size="30" :src="$store.state.user.img || empty"></el-avatar>
|
|
17
16
|
</div>
|
|
18
17
|
<template #dropdown>
|
|
19
18
|
<el-dropdown-menu>
|
|
20
19
|
<el-dropdown-item command="uc">
|
|
21
20
|
<div class="user-body">
|
|
22
|
-
<el-avatar :size="30"
|
|
23
|
-
:src="$store.state.user.img || empty"></el-avatar>
|
|
21
|
+
<el-avatar :size="30" :src="$store.state.user.img || empty"></el-avatar>
|
|
24
22
|
<div class="user-name">
|
|
25
23
|
<label>{{ $store.state.user.realName }}</label>
|
|
26
24
|
<label>{{ $store.state.user.username }}</label>
|
|
27
25
|
</div>
|
|
28
26
|
</div>
|
|
29
27
|
</el-dropdown-item>
|
|
30
|
-
<el-dropdown-item divided
|
|
31
|
-
|
|
32
|
-
<el-dropdown-item
|
|
33
|
-
command="clearCache">{{$t('lwLayout.layout.clearCache')}}</el-dropdown-item>
|
|
34
|
-
<el-dropdown-item divided
|
|
35
|
-
command="outLogin">{{$t('lwLayout.layout.outLogin')}}</el-dropdown-item>
|
|
28
|
+
<el-dropdown-item divided command="setting">{{ $t('lwLayout.layout.layoutConfiguration') }}</el-dropdown-item>
|
|
29
|
+
<el-dropdown-item command="clearCache">{{ $t('lwLayout.layout.clearCache') }}</el-dropdown-item>
|
|
30
|
+
<el-dropdown-item divided command="outLogin">{{ $t('lwLayout.layout.outLogin') }}</el-dropdown-item>
|
|
36
31
|
</el-dropdown-menu>
|
|
37
32
|
</template>
|
|
38
33
|
</el-dropdown>
|
|
39
34
|
</div>
|
|
40
35
|
|
|
41
|
-
<el-drawer title="布局实时演示"
|
|
42
|
-
v-model="settingDialog"
|
|
43
|
-
:size="400"
|
|
44
|
-
append-to-body
|
|
45
|
-
destroy-on-close>
|
|
36
|
+
<el-drawer title="布局实时演示" v-model="settingDialog" :size="400" append-to-body destroy-on-close>
|
|
46
37
|
<setting></setting>
|
|
47
38
|
</el-drawer>
|
|
48
39
|
</template>
|
|
@@ -66,6 +57,11 @@ export default {
|
|
|
66
57
|
type: Boolean,
|
|
67
58
|
default: true
|
|
68
59
|
},
|
|
60
|
+
// 不是passport
|
|
61
|
+
unPassport: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: true
|
|
64
|
+
},
|
|
69
65
|
},
|
|
70
66
|
components: {
|
|
71
67
|
bu,
|
|
@@ -149,6 +145,7 @@ export default {
|
|
|
149
145
|
align-items: center;
|
|
150
146
|
height: 100%;
|
|
151
147
|
}
|
|
148
|
+
|
|
152
149
|
.user-bar .panel-item {
|
|
153
150
|
padding: 0 10px;
|
|
154
151
|
cursor: pointer;
|
|
@@ -156,17 +153,21 @@ export default {
|
|
|
156
153
|
display: flex;
|
|
157
154
|
align-items: center;
|
|
158
155
|
}
|
|
156
|
+
|
|
159
157
|
.user-bar .panel-item i {
|
|
160
158
|
font-size: 16px;
|
|
161
159
|
}
|
|
160
|
+
|
|
162
161
|
.user-bar .panel-item:hover {
|
|
163
162
|
background: rgba(0, 0, 0, 0.1);
|
|
164
163
|
}
|
|
164
|
+
|
|
165
165
|
.user-bar .user-avatar {
|
|
166
166
|
height: 49px;
|
|
167
167
|
display: flex;
|
|
168
168
|
align-items: center;
|
|
169
169
|
}
|
|
170
|
+
|
|
170
171
|
.user-bar .user-avatar label {
|
|
171
172
|
display: inline-block;
|
|
172
173
|
margin-left: 5px;
|
|
@@ -177,31 +178,38 @@ export default {
|
|
|
177
178
|
.msg-list li {
|
|
178
179
|
border-top: 1px solid #eee;
|
|
179
180
|
}
|
|
181
|
+
|
|
180
182
|
.msg-list li a {
|
|
181
183
|
display: flex;
|
|
182
184
|
padding: 20px;
|
|
183
185
|
}
|
|
186
|
+
|
|
184
187
|
.msg-list li a:hover {
|
|
185
188
|
background: #ecf5ff;
|
|
186
189
|
}
|
|
190
|
+
|
|
187
191
|
.msg-list__icon {
|
|
188
192
|
width: 40px;
|
|
189
193
|
margin-right: 15px;
|
|
190
194
|
}
|
|
195
|
+
|
|
191
196
|
.msg-list__main {
|
|
192
197
|
flex: 1;
|
|
193
198
|
}
|
|
199
|
+
|
|
194
200
|
.msg-list__main h2 {
|
|
195
201
|
font-size: 15px;
|
|
196
202
|
font-weight: normal;
|
|
197
203
|
color: #333;
|
|
198
204
|
}
|
|
205
|
+
|
|
199
206
|
.msg-list__main p {
|
|
200
207
|
font-size: 12px;
|
|
201
208
|
color: #999;
|
|
202
209
|
line-height: 1.8;
|
|
203
210
|
margin-top: 5px;
|
|
204
211
|
}
|
|
212
|
+
|
|
205
213
|
.msg-list__time {
|
|
206
214
|
width: 100px;
|
|
207
215
|
text-align: right;
|
|
@@ -211,9 +219,11 @@ export default {
|
|
|
211
219
|
.dark .msg-list__main h2 {
|
|
212
220
|
color: #d0d0d0;
|
|
213
221
|
}
|
|
222
|
+
|
|
214
223
|
.dark .msg-list li {
|
|
215
224
|
border-top: 1px solid #363636;
|
|
216
225
|
}
|
|
226
|
+
|
|
217
227
|
.dark .msg-list li a:hover {
|
|
218
228
|
background: #383838;
|
|
219
229
|
}
|
|
@@ -223,9 +233,11 @@ export default {
|
|
|
223
233
|
align-items: center;
|
|
224
234
|
gap: 20px;
|
|
225
235
|
min-width: 100px;
|
|
236
|
+
|
|
226
237
|
:deep(.el-avatar) {
|
|
227
238
|
min-width: 30px;
|
|
228
239
|
}
|
|
240
|
+
|
|
229
241
|
.user-name {
|
|
230
242
|
display: flex;
|
|
231
243
|
flex-direction: column;
|