lw-cdp-ui 1.3.6 → 1.3.8
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/lwLayout/components/setting.vue +6 -6
- package/dist/components/lwLayout/components/tags.vue +7 -3
- package/dist/components/lwLayout/components/userbar.vue +18 -8
- package/dist/components/lwLayout/index.vue +1 -20
- package/dist/components/lwLayout/locale/en-us.js +20 -17
- package/dist/components/lwLayout/locale/zh-cn.js +21 -17
- package/dist/components/lwTable/index.js +10 -3
- package/dist/components/lwTable/index.scss +1 -0
- package/dist/lw-cdp-ui.esm.js +1915 -1874
- package/dist/lw-cdp-ui.umd.js +9 -9
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -5,18 +5,18 @@
|
|
|
5
5
|
style="padding:0 20px;">
|
|
6
6
|
<!-- <el-alert title="以下配置可实时预览,开发者可在 config/index.js 中配置默认值,非常不建议在生产环境下开放布局设置" type="error" :closable="false"></el-alert> -->
|
|
7
7
|
<el-divider></el-divider>
|
|
8
|
-
<el-form-item :label="$t('user.nightmode')">
|
|
8
|
+
<el-form-item :label="$t('lwLayout.user.nightmode')">
|
|
9
9
|
<el-switch v-model="dark"
|
|
10
10
|
active-value="dark"
|
|
11
11
|
inactive-value="default"></el-switch>
|
|
12
12
|
</el-form-item>
|
|
13
13
|
<el-divider></el-divider>
|
|
14
|
-
<el-form-item :label="$t('user.color')">
|
|
14
|
+
<el-form-item :label="$t('lwLayout.user.color')">
|
|
15
15
|
<el-color-picker v-model="colorPrimary"
|
|
16
16
|
:predefine="colorList">></el-color-picker>
|
|
17
17
|
</el-form-item>
|
|
18
18
|
<el-divider></el-divider>
|
|
19
|
-
<el-form-item :label="$t('user.layout')">
|
|
19
|
+
<el-form-item :label="$t('lwLayout.user.layout')">
|
|
20
20
|
<el-select v-model="layout"
|
|
21
21
|
placeholder="请选择">
|
|
22
22
|
<el-option label="默认"
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
value="dock"></el-option>
|
|
30
30
|
</el-select>
|
|
31
31
|
</el-form-item>
|
|
32
|
-
<el-form-item :label="$t('user.menu')">
|
|
32
|
+
<el-form-item :label="$t('lwLayout.user.menu')">
|
|
33
33
|
<el-switch v-model="menuIsCollapse"></el-switch>
|
|
34
34
|
</el-form-item>
|
|
35
|
-
<el-form-item :label="$t('user.tag')">
|
|
35
|
+
<el-form-item :label="$t('lwLayout.user.tag')">
|
|
36
36
|
<el-switch v-model="layoutTags"></el-switch>
|
|
37
37
|
</el-form-item>
|
|
38
38
|
<el-divider></el-divider>
|
|
39
|
-
<el-form-item :label="$t('user.lang')">
|
|
39
|
+
<el-form-item :label="$t('lwLayout.user.lang')">
|
|
40
40
|
<Lang />
|
|
41
41
|
</el-form-item>
|
|
42
42
|
|
|
@@ -179,14 +179,18 @@ export default {
|
|
|
179
179
|
closeSelectedTag(tag, autoPushLatestView = true) {
|
|
180
180
|
let item = this.menu[0]
|
|
181
181
|
if (item.children) {
|
|
182
|
-
item =
|
|
182
|
+
item = item.children[0]
|
|
183
183
|
}
|
|
184
|
-
|
|
184
|
+
|
|
185
185
|
// 兼容合并菜单
|
|
186
|
-
if (item.meta?.code) {
|
|
186
|
+
if (item.meta?.code && item.meta?.code != this.$config.APP_NAME.toLowerCase()) {
|
|
187
187
|
item.path = `/i/${item.name}`
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
+
if (this.tagList.length == 1 && item.path == this.$route.path) {
|
|
191
|
+
return false
|
|
192
|
+
}
|
|
193
|
+
|
|
190
194
|
this.$store.commit("removeViewTags", tag)
|
|
191
195
|
this.$store.commit("removeIframeList", tag)
|
|
192
196
|
this.$store.commit("removeKeepLive", tag.name)
|
|
@@ -27,23 +27,31 @@
|
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
</el-dropdown-item>
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
<el-dropdown-item divided
|
|
31
|
+
command="setting">{{$t('lwLayout.layout.layoutConfiguration')}}</el-dropdown-item>
|
|
32
32
|
<el-dropdown-item
|
|
33
|
-
command="clearCache">{{$t('layout.clearCache')}}</el-dropdown-item>
|
|
33
|
+
command="clearCache">{{$t('lwLayout.layout.clearCache')}}</el-dropdown-item>
|
|
34
34
|
<el-dropdown-item divided
|
|
35
|
-
command="outLogin">{{$t('layout.outLogin')}}</el-dropdown-item>
|
|
35
|
+
command="outLogin">{{$t('lwLayout.layout.outLogin')}}</el-dropdown-item>
|
|
36
36
|
</el-dropdown-menu>
|
|
37
37
|
</template>
|
|
38
38
|
</el-dropdown>
|
|
39
39
|
</div>
|
|
40
40
|
|
|
41
|
+
<el-drawer title="布局实时演示"
|
|
42
|
+
v-model="settingDialog"
|
|
43
|
+
:size="400"
|
|
44
|
+
append-to-body
|
|
45
|
+
destroy-on-close>
|
|
46
|
+
<setting></setting>
|
|
47
|
+
</el-drawer>
|
|
41
48
|
</template>
|
|
42
49
|
|
|
43
50
|
<script>
|
|
44
51
|
import bu from './bu.vue'
|
|
45
52
|
import task from './task.vue'
|
|
46
53
|
import empty from '@/assets/images/empty.jpg'
|
|
54
|
+
import setting from './setting.vue';
|
|
47
55
|
export default {
|
|
48
56
|
props: {
|
|
49
57
|
isShowBu: {
|
|
@@ -61,11 +69,13 @@ export default {
|
|
|
61
69
|
},
|
|
62
70
|
components: {
|
|
63
71
|
bu,
|
|
64
|
-
task
|
|
72
|
+
task,
|
|
73
|
+
setting
|
|
65
74
|
},
|
|
66
75
|
data() {
|
|
67
76
|
return {
|
|
68
77
|
empty,
|
|
78
|
+
settingDialog: false,
|
|
69
79
|
userName: "",
|
|
70
80
|
userNameF: "",
|
|
71
81
|
searchVisible: false,
|
|
@@ -80,8 +90,8 @@ export default {
|
|
|
80
90
|
methods: {
|
|
81
91
|
//个人信息
|
|
82
92
|
handleUser(command) {
|
|
83
|
-
if (command == "
|
|
84
|
-
this
|
|
93
|
+
if (command == "setting") {
|
|
94
|
+
this.settingDialog = true;
|
|
85
95
|
}
|
|
86
96
|
if (command == "cmd") {
|
|
87
97
|
this.$router.push({ path: '/cmd' });
|
|
@@ -212,7 +222,7 @@ export default {
|
|
|
212
222
|
display: flex;
|
|
213
223
|
align-items: center;
|
|
214
224
|
gap: 20px;
|
|
215
|
-
width:
|
|
225
|
+
min-width: 100px;
|
|
216
226
|
:deep(.el-avatar) {
|
|
217
227
|
min-width: 30px;
|
|
218
228
|
}
|
|
@@ -120,17 +120,7 @@
|
|
|
120
120
|
</div>
|
|
121
121
|
</div>
|
|
122
122
|
</template>
|
|
123
|
-
|
|
124
|
-
<div class="layout-setting"
|
|
125
|
-
@click="openSetting"><el-icon><el-icon-brush-filled /></el-icon></div>
|
|
126
|
-
|
|
127
|
-
<el-drawer title="布局实时演示"
|
|
128
|
-
v-model="settingDialog"
|
|
129
|
-
:size="400"
|
|
130
|
-
append-to-body
|
|
131
|
-
destroy-on-close>
|
|
132
|
-
<setting></setting>
|
|
133
|
-
</el-drawer>
|
|
123
|
+
|
|
134
124
|
</template>
|
|
135
125
|
|
|
136
126
|
<script>
|
|
@@ -140,7 +130,6 @@ import Topbar from './components/topbar.vue';
|
|
|
140
130
|
import Tags from './components/tags.vue';
|
|
141
131
|
import NavMenu from './components/NavMenu.vue';
|
|
142
132
|
import userbar from './components/userbar.vue';
|
|
143
|
-
import setting from './components/setting.vue';
|
|
144
133
|
import iframeView from './components/iframeView.vue';
|
|
145
134
|
export default {
|
|
146
135
|
name: 'lwLayout',
|
|
@@ -171,12 +160,10 @@ export default {
|
|
|
171
160
|
Tags,
|
|
172
161
|
NavMenu,
|
|
173
162
|
userbar,
|
|
174
|
-
setting,
|
|
175
163
|
iframeView
|
|
176
164
|
},
|
|
177
165
|
data() {
|
|
178
166
|
return {
|
|
179
|
-
settingDialog: false,
|
|
180
167
|
changeMenu: false,
|
|
181
168
|
menu: [],
|
|
182
169
|
nextMenu: [],
|
|
@@ -265,12 +252,6 @@ export default {
|
|
|
265
252
|
this.$tool.data.set('userAuthInfo', userAuthInfo)
|
|
266
253
|
this.$store.state.user = userAuthInfo
|
|
267
254
|
},
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
openSetting() {
|
|
272
|
-
this.settingDialog = true;
|
|
273
|
-
},
|
|
274
255
|
onLayoutResize() {
|
|
275
256
|
this.$store.commit("SET_ismobile", document.body.clientWidth < 992)
|
|
276
257
|
},
|
|
@@ -1,20 +1,23 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
lwLayout: {
|
|
3
|
+
user: {
|
|
4
|
+
settings: 'Settings',
|
|
5
|
+
nightmode: 'Night Mode',
|
|
6
|
+
color: 'Theme Color',
|
|
7
|
+
layout: 'Layout',
|
|
8
|
+
menu: 'Collapse Menu',
|
|
9
|
+
tag: 'Tag Bar',
|
|
10
|
+
lang: 'Internationalization',
|
|
11
|
+
nightmode_msg: 'Suitable for low-light environments; the current dark mode is in beta.',
|
|
12
|
+
language: 'Language',
|
|
13
|
+
language_msg: 'Translation in progress; only the text of this view has been translated.'
|
|
14
|
+
},
|
|
15
|
+
layout: {
|
|
16
|
+
layoutConfiguration: 'Layout Configuration',
|
|
17
|
+
topbar: 'Location',
|
|
18
|
+
userData: 'User Center',
|
|
19
|
+
outLogin: 'Logout',
|
|
20
|
+
clearCache: 'Clear Cache'
|
|
21
|
+
}
|
|
19
22
|
}
|
|
20
23
|
}
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
lwLayout: {
|
|
3
|
+
user: {
|
|
4
|
+
settings: '设置',
|
|
5
|
+
nightmode: '黑夜模式',
|
|
6
|
+
color: '主题颜色',
|
|
7
|
+
layout: '框架布局',
|
|
8
|
+
menu: '折叠菜单',
|
|
9
|
+
tag: '标签栏',
|
|
10
|
+
lang: '国际化',
|
|
11
|
+
|
|
12
|
+
nightmode_msg: '适合光线较弱的环境,当前黑暗模式为beta版本',
|
|
13
|
+
language: '语言',
|
|
14
|
+
language_msg: '翻译进行中,暂翻译了本视图的文本'
|
|
15
|
+
},
|
|
16
|
+
layout: {
|
|
17
|
+
layoutConfiguration: '布局配置',
|
|
18
|
+
topbar: '所在位置',
|
|
19
|
+
userData: '个人中心',
|
|
20
|
+
outLogin: '退出登录',
|
|
21
|
+
clearCache: '清除缓存'
|
|
22
|
+
}
|
|
19
23
|
}
|
|
20
24
|
}
|
|
@@ -41,7 +41,7 @@ export default {
|
|
|
41
41
|
defaultExpandAll: { type: Boolean, default: false }, // 是否默认展开所有行
|
|
42
42
|
virtualListProps: { type: Object, default: undefined }, // 虚拟滚动配置
|
|
43
43
|
summaryMethod: { type: Function, default: () => [] }, // 自定义合计方法
|
|
44
|
-
hideTool: { type: Boolean, default:
|
|
44
|
+
hideTool: { type: Boolean, default: false }, // 是否隐藏工具栏
|
|
45
45
|
hideCard: { type: Boolean, default: true }, // 是否显示卡片
|
|
46
46
|
isSetting: { type: Boolean, default: false }, // 是否显示列设置
|
|
47
47
|
saveKey: { type: String, default: '' }, // 本地存储 key,用于保存表格配置
|
|
@@ -252,16 +252,23 @@ export default {
|
|
|
252
252
|
// 自动计算稿表格高度
|
|
253
253
|
const container = document.querySelector('.adminui-main > .el-container') || { clientHeight: 0 }
|
|
254
254
|
const btnContainer = document.querySelector('.table-block > .btn-container')
|
|
255
|
+
const formTabele = document.querySelector('.el-form-item__content > .lw-table-page')
|
|
255
256
|
const searchCard = document.querySelector('.lw-search-card')
|
|
256
257
|
this.tableHeight = container.clientHeight
|
|
257
|
-
|
|
258
|
+
|
|
258
259
|
if (searchCard) {
|
|
259
260
|
this.tableHeight = this.tableHeight - searchCard.clientHeight
|
|
260
261
|
}
|
|
261
262
|
if (btnContainer) {
|
|
262
263
|
this.tableHeight = this.tableHeight - btnContainer.clientHeight - 10
|
|
263
264
|
}
|
|
264
|
-
|
|
265
|
+
|
|
266
|
+
if (!formTabele) {
|
|
267
|
+
this.tableHeight = this.tableHeight - 110
|
|
268
|
+
} else {
|
|
269
|
+
this.tableHeight = ''
|
|
270
|
+
}
|
|
271
|
+
|
|
265
272
|
},
|
|
266
273
|
// 拖动选中
|
|
267
274
|
onSelect({ selected }) {
|