lw-cdp-ui 1.0.19 → 1.0.21

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.
Files changed (44) hide show
  1. package/README.md +5 -5
  2. package/dist/components/lwForm/index.vue +312 -312
  3. package/dist/components/lwIconSelect/iconSelect.js +288 -288
  4. package/dist/components/lwIconSelect/index.vue +142 -142
  5. package/dist/components/lwLayout/components/NavMenu.vue +36 -36
  6. package/dist/components/lwLayout/components/aside.vue +291 -295
  7. package/dist/components/lwLayout/components/bu.vue +72 -70
  8. package/dist/components/lwLayout/components/iframeView.vue +57 -57
  9. package/dist/components/lwLayout/components/lang.vue +76 -76
  10. package/dist/components/lwLayout/components/setting.vue +80 -80
  11. package/dist/components/lwLayout/components/sideM.vue +137 -136
  12. package/dist/components/lwLayout/components/tags.vue +329 -329
  13. package/dist/components/lwLayout/components/topbar.vue +70 -70
  14. package/dist/components/lwLayout/components/userbar.vue +210 -209
  15. package/dist/components/lwLayout/index.vue +399 -398
  16. package/dist/components/lwLogin/index.vue +446 -383
  17. package/dist/components/lwSearch/date/date.vue +110 -110
  18. package/dist/components/lwSearch/dateRange/dateRange.vue +110 -110
  19. package/dist/components/lwSearch/dates/dates.vue +366 -366
  20. package/dist/components/lwSearch/index.vue +636 -636
  21. package/dist/components/lwSearch/input/input.vue +54 -54
  22. package/dist/components/lwSearch/locale/en-us.js +10 -10
  23. package/dist/components/lwSearch/locale/zh-cn.js +10 -10
  24. package/dist/components/lwSearch/select/select.vue +57 -57
  25. package/dist/components/lwSvgIcon/index.vue +28 -28
  26. package/dist/components/lwTable/index.js +425 -425
  27. package/dist/components/lwTable/index.scss +229 -229
  28. package/dist/components/lwTable/index.vue +225 -226
  29. package/dist/components/lwTable/locale/en-US.js +26 -26
  30. package/dist/components/lwTable/locale/zh-CN.js +26 -26
  31. package/dist/components/lwTable/useFullscreen.js +73 -73
  32. package/dist/components/lwTableSelect/index.vue +254 -254
  33. package/dist/components/lwTableSelect/tableSelect.js +23 -23
  34. package/dist/components/lwUpload/index.vue +365 -365
  35. package/dist/en-US-YCjgxjEt.js.map +1 -1
  36. package/dist/en-us-CziFtIQi.js.map +1 -1
  37. package/dist/lw-cdp-ui.esm.js +1484 -1459
  38. package/dist/lw-cdp-ui.esm.js.map +1 -1
  39. package/dist/lw-cdp-ui.umd.js +9 -9
  40. package/dist/lw-cdp-ui.umd.js.map +1 -1
  41. package/dist/style.css +1 -1
  42. package/dist/zh-CN-BdDNsX4e.js.map +1 -1
  43. package/dist/zh-cn-DJpQp_O7.js.map +1 -1
  44. package/package.json +45 -45
@@ -1,71 +1,73 @@
1
- <template>
2
- <div class="screen panel-item hidden-sm-and-down"
3
- @click="screen">
4
-
5
- <el-dropdown @command="changeBusinessUnit">
6
- <div class="bu-list">
7
- <el-icon><el-icon-help /></el-icon>{{buName}}
8
- </div>
9
- <template #dropdown>
10
- <el-dropdown-menu>
11
- <el-dropdown-item v-for="item in buList"
12
- :key="item.id"
13
- :command="item.code">{{item.name}}</el-dropdown-item>
14
- </el-dropdown-menu>
15
- </template>
16
- </el-dropdown>
17
- </div>
18
- </template>
19
-
20
- <script>
21
- export default {
22
- data() {
23
- return {
24
- buName: '',
25
- buList: [],
26
- }
27
- },
28
- props: {
29
- isInitialized: {
30
- type: Boolean,
31
- default: true
32
- },
33
- },
34
- methods: {
35
- async changeBusinessUnit(command) {
36
- this.buName = command
37
- let item = this.buList.find(item => item.code === command)
38
- this.$tool.data.set('buCode', command)
39
- this.$tool.data.set('tenantId', item.tenantId)
40
-
41
- // 检验是否初始化
42
- if (this.isInitialized) {
43
- let initialized = await this.$api.auth.initialized()
44
- this.$tool.data.set('zoneInitialized', initialized)
45
- if (!initialized) {
46
- this.$router.push(this.$config.INIT_URL);
47
- }
48
- }
49
- }
50
- },
51
- created() {
52
- this.buList = this.$tool.data.get('buList')
53
-
54
- let buCode = this.$tool.data.get('buCode')
55
- let item = this.buList.find(item => item.code === buCode)
56
- this.buName = item ? item.name : ''
57
- this.changeBusinessUnit(buCode)
58
- }
59
- }
60
- </script>
61
- <style lang="scss" scoped>
62
- :deep(.el-dropdown) {
63
- height: 100%;
64
- }
65
- .bu-list {
66
- display: flex;
67
- align-items: center;
68
- gap: 5px;
69
- height: 100%;
70
- }
1
+ <template>
2
+ <div class="screen panel-item hidden-sm-and-down"
3
+ @click="screen">
4
+
5
+ <el-dropdown @command="changeBusinessUnit">
6
+ <div class="bu-list">
7
+ <el-icon><el-icon-help /></el-icon>{{buName}}
8
+ </div>
9
+ <template #dropdown>
10
+ <el-dropdown-menu>
11
+ <el-dropdown-item v-for="item in buList"
12
+ :key="item.id"
13
+ :command="item.code">{{item.name}}</el-dropdown-item>
14
+ </el-dropdown-menu>
15
+ </template>
16
+ </el-dropdown>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ export default {
22
+ data() {
23
+ return {
24
+ buName: '',
25
+ buList: [],
26
+ }
27
+ },
28
+ props: {
29
+ isInitialized: {
30
+ type: Boolean,
31
+ default: true
32
+ },
33
+ },
34
+ methods: {
35
+ async changeBusinessUnit(command) {
36
+ this.buName = command
37
+ let item = this.buList.find(item => item.code === command)
38
+ this.$store.commit('setRouteShow', true)
39
+ this.$tool.data.set('buCode', command)
40
+ this.$tool.data.set('tenantId', item.tenantId)
41
+ // 检验是否初始化
42
+ if (this.isInitialized) {
43
+ let initialized = await this.$api.auth.initialized()
44
+ this.$tool.data.set('zoneInitialized', initialized)
45
+ if (!initialized) {
46
+ this.$router.push(this.$config.INIT_URL);
47
+ }
48
+
49
+ this.$store.commit('setRouteShow', false)
50
+ }
51
+ }
52
+ },
53
+ created() {
54
+ this.buList = this.$tool.data.get('buList')
55
+
56
+ let buCode = this.$tool.data.get('buCode')
57
+ let item = this.buList.find(item => item.code === buCode)
58
+ this.buName = item ? item.name : ''
59
+ this.changeBusinessUnit(buCode)
60
+ }
61
+ }
62
+ </script>
63
+ <style lang="scss" scoped>
64
+ :deep(.el-dropdown) {
65
+ height: 100%;
66
+ }
67
+ .bu-list {
68
+ display: flex;
69
+ align-items: center;
70
+ gap: 5px;
71
+ height: 100%;
72
+ }
71
73
  </style>
@@ -1,57 +1,57 @@
1
- <template>
2
- <div v-show="$route.meta.type=='iframe'" class="iframe-pages">
3
- <iframe v-for="item in iframeList" :key="item.meta.url" v-show="$route.meta.url==item.meta.url" :src="item.meta.url" frameborder='0'></iframe>
4
- </div>
5
- </template>
6
-
7
- <script>
8
- export default {
9
- data() {
10
- return {
11
-
12
- }
13
- },
14
- watch: {
15
- $route(e) {
16
- this.push(e)
17
- },
18
- },
19
- created() {
20
- this.push(this.$route);
21
- },
22
- computed:{
23
- iframeList(){
24
- return this.$store.state.iframe.iframeList
25
- },
26
- ismobile(){
27
- return this.$store.state.global.ismobile
28
- },
29
- layoutTags(){
30
- return this.$store.state.global.layoutTags
31
- }
32
- },
33
- mounted() {
34
-
35
- },
36
- methods: {
37
- push(route){
38
- if(route.meta.type == 'iframe'){
39
- if(this.ismobile || !this.layoutTags){
40
- this.$store.commit("setIframeList", route)
41
- }else{
42
- this.$store.commit("pushIframeList", route)
43
- }
44
- }else{
45
- if(this.ismobile || !this.layoutTags){
46
- this.$store.commit("clearIframeList")
47
- }
48
- }
49
- }
50
- }
51
- }
52
- </script>
53
-
54
- <style scoped>
55
- .iframe-pages {width:100%;height:100%;background: #fff;}
56
- iframe {border:0;width:100%;height:100%;display: block;}
57
- </style>
1
+ <template>
2
+ <div v-show="$route.meta.type=='iframe'" class="iframe-pages">
3
+ <iframe v-for="item in iframeList" :key="item.meta.url" v-show="$route.meta.url==item.meta.url" :src="item.meta.url" frameborder='0'></iframe>
4
+ </div>
5
+ </template>
6
+
7
+ <script>
8
+ export default {
9
+ data() {
10
+ return {
11
+
12
+ }
13
+ },
14
+ watch: {
15
+ $route(e) {
16
+ this.push(e)
17
+ },
18
+ },
19
+ created() {
20
+ this.push(this.$route);
21
+ },
22
+ computed:{
23
+ iframeList(){
24
+ return this.$store.state.iframe.iframeList
25
+ },
26
+ ismobile(){
27
+ return this.$store.state.global.ismobile
28
+ },
29
+ layoutTags(){
30
+ return this.$store.state.global.layoutTags
31
+ }
32
+ },
33
+ mounted() {
34
+
35
+ },
36
+ methods: {
37
+ push(route){
38
+ if(route.meta.type == 'iframe'){
39
+ if(this.ismobile || !this.layoutTags){
40
+ this.$store.commit("setIframeList", route)
41
+ }else{
42
+ this.$store.commit("pushIframeList", route)
43
+ }
44
+ }else{
45
+ if(this.ismobile || !this.layoutTags){
46
+ this.$store.commit("clearIframeList")
47
+ }
48
+ }
49
+ }
50
+ }
51
+ }
52
+ </script>
53
+
54
+ <style scoped>
55
+ .iframe-pages {width:100%;height:100%;background: #fff;}
56
+ iframe {border:0;width:100%;height:100%;display: block;}
57
+ </style>
@@ -1,77 +1,77 @@
1
- <template>
2
- <el-dropdown trigger="click"
3
- placement="bottom-end"
4
- @command="configLang">
5
- <el-button link>
6
- <template #icon>
7
- <svg xmlns="http://www.w3.org/2000/svg"
8
- xmlns:xlink="http://www.w3.org/1999/xlink"
9
- role="img"
10
- width="1em"
11
- height="1em"
12
- preserveAspectRatio="xMidYMid meet"
13
- viewBox="0 0 512 512">
14
- <path d="M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z"
15
- fill="currentColor"></path>
16
- <path d="M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"
17
- fill="currentColor"></path>
18
- </svg>
19
- </template>
20
- {{ curLang }}
21
- </el-button>
22
- <template #dropdown>
23
- <el-dropdown-menu >
24
- <el-dropdown-item v-for="item in lang"
25
- :key="item.value"
26
- :command="item"
27
- :class="{'selected':config.lang==item.value}">{{item.name}}</el-dropdown-item>
28
- </el-dropdown-menu>
29
- </template>
30
- </el-dropdown>
31
- </template>
32
-
33
- <script>
34
- import { computed } from 'vue';
35
- export default {
36
- data() {
37
- return {
38
- config: {
39
- lang: this.$tool.data.get("APP_LANG") || this.$config.LANG,
40
- },
41
- curLang: '',
42
- lang: [
43
- {
44
- name: "简体中文",
45
- value: "zh-cn",
46
- },
47
- {
48
- name: "English",
49
- value: "en-us",
50
- }
51
- ],
52
- }
53
- },
54
- watch: {
55
- "config.lang"(val) {
56
- this.$i18n.locale = val;
57
- this.$i18n.fallbackLocale = val;
58
- this.$tool.data.set("APP_LANG", val);
59
- location.reload()
60
- },
61
- },
62
- methods: {
63
- configLang(command) {
64
- this.config.lang = command.value;
65
- }
66
- },
67
- computed: {
68
- curLang() {
69
- let l = this.lang.find(lang => lang.value === this.config.lang)
70
- return l.name
71
- }
72
- }
73
- }
74
- </script>
75
-
76
- <style>
1
+ <template>
2
+ <el-dropdown trigger="click"
3
+ placement="bottom-end"
4
+ @command="configLang">
5
+ <el-button link>
6
+ <template #icon>
7
+ <svg xmlns="http://www.w3.org/2000/svg"
8
+ xmlns:xlink="http://www.w3.org/1999/xlink"
9
+ role="img"
10
+ width="1em"
11
+ height="1em"
12
+ preserveAspectRatio="xMidYMid meet"
13
+ viewBox="0 0 512 512">
14
+ <path d="M478.33 433.6l-90-218a22 22 0 0 0-40.67 0l-90 218a22 22 0 1 0 40.67 16.79L316.66 406h102.67l18.33 44.39A22 22 0 0 0 458 464a22 22 0 0 0 20.32-30.4zM334.83 362L368 281.65L401.17 362z"
15
+ fill="currentColor"></path>
16
+ <path d="M267.84 342.92a22 22 0 0 0-4.89-30.7c-.2-.15-15-11.13-36.49-34.73c39.65-53.68 62.11-114.75 71.27-143.49H330a22 22 0 0 0 0-44H214V70a22 22 0 0 0-44 0v20H54a22 22 0 0 0 0 44h197.25c-9.52 26.95-27.05 69.5-53.79 108.36c-31.41-41.68-43.08-68.65-43.17-68.87a22 22 0 0 0-40.58 17c.58 1.38 14.55 34.23 52.86 83.93c.92 1.19 1.83 2.35 2.74 3.51c-39.24 44.35-77.74 71.86-93.85 80.74a22 22 0 1 0 21.07 38.63c2.16-1.18 48.6-26.89 101.63-85.59c22.52 24.08 38 35.44 38.93 36.1a22 22 0 0 0 30.75-4.9z"
17
+ fill="currentColor"></path>
18
+ </svg>
19
+ </template>
20
+ {{ curLang }}
21
+ </el-button>
22
+ <template #dropdown>
23
+ <el-dropdown-menu >
24
+ <el-dropdown-item v-for="item in lang"
25
+ :key="item.value"
26
+ :command="item"
27
+ :class="{'selected':config.lang==item.value}">{{item.name}}</el-dropdown-item>
28
+ </el-dropdown-menu>
29
+ </template>
30
+ </el-dropdown>
31
+ </template>
32
+
33
+ <script>
34
+ import { computed } from 'vue';
35
+ export default {
36
+ data() {
37
+ return {
38
+ config: {
39
+ lang: this.$tool.data.get("APP_LANG") || this.$config.LANG,
40
+ },
41
+ curLang: '',
42
+ lang: [
43
+ {
44
+ name: "简体中文",
45
+ value: "zh-cn",
46
+ },
47
+ {
48
+ name: "English",
49
+ value: "en-us",
50
+ }
51
+ ],
52
+ }
53
+ },
54
+ watch: {
55
+ "config.lang"(val) {
56
+ this.$i18n.locale = val;
57
+ this.$i18n.fallbackLocale = val;
58
+ this.$tool.data.set("APP_LANG", val);
59
+ location.reload()
60
+ },
61
+ },
62
+ methods: {
63
+ configLang(command) {
64
+ this.config.lang = command.value;
65
+ }
66
+ },
67
+ computed: {
68
+ curLang() {
69
+ let l = this.lang.find(lang => lang.value === this.config.lang)
70
+ return l.name
71
+ }
72
+ }
73
+ }
74
+ </script>
75
+
76
+ <style>
77
77
  </style>
@@ -1,80 +1,80 @@
1
- <template>
2
- <el-form ref="form" label-width="120px" label-position="left" style="padding:0 20px;">
3
- <!-- <el-alert title="以下配置可实时预览,开发者可在 config/index.js 中配置默认值,非常不建议在生产环境下开放布局设置" type="error" :closable="false"></el-alert> -->
4
- <el-divider></el-divider>
5
- <el-form-item :label="$t('user.nightmode')">
6
- <el-switch v-model="dark" active-value="dark" inactive-value="default"></el-switch>
7
- </el-form-item>
8
- <el-divider></el-divider>
9
- <el-form-item :label="$t('user.color')">
10
- <el-color-picker v-model="colorPrimary" :predefine="colorList">></el-color-picker>
11
- </el-form-item>
12
- <el-divider></el-divider>
13
- <el-form-item :label="$t('user.layout')">
14
- <el-select v-model="layout" placeholder="请选择">
15
- <el-option label="默认" value="default"></el-option>
16
- <el-option label="通栏" value="header"></el-option>
17
- <el-option label="经典" value="menu"></el-option>
18
- <el-option label="功能坞" value="dock"></el-option>
19
- </el-select>
20
- </el-form-item>
21
- <el-form-item :label="$t('user.menu')">
22
- <el-switch v-model="menuIsCollapse"></el-switch>
23
- </el-form-item>
24
- <el-form-item :label="$t('user.tag')">
25
- <el-switch v-model="layoutTags"></el-switch>
26
- </el-form-item>
27
- <el-divider></el-divider>
28
- <el-form-item :label="$t('user.lang')">
29
- <Lang />
30
- </el-form-item>
31
-
32
- </el-form>
33
- </template>
34
-
35
- <script>
36
- import colorTool from '@/utils/color'
37
- import Lang from './lang.vue'
38
-
39
- export default {
40
- components: { Lang },
41
- data(){
42
- return {
43
- layout: this.$store.state.global.layout,
44
- menuIsCollapse: this.$store.state.global.menuIsCollapse,
45
- layoutTags: this.$store.state.global.layoutTags,
46
- dark: this.$tool.data.get('APP_THEME'),
47
- colorList: ['#409EFF', '#009688', '#536dfe', '#ff5c93', '#c62f2f', '#fd726d'],
48
- colorPrimary: this.$tool.data.get('APP_COLOR') || this.$config.COLOR || '#409EFF'
49
- }
50
- },
51
- watch: {
52
- layout(val) {
53
- this.$store.commit("SET_layout", val)
54
- },
55
- menuIsCollapse(){
56
- this.$store.commit("TOGGLE_menuIsCollapse")
57
- },
58
- layoutTags(){
59
- this.$store.commit("TOGGLE_layoutTags")
60
- },
61
- dark(val){
62
- document.body.setAttribute('data-theme', val)
63
- this.$tool.data.set("APP_THEME", val);
64
- },
65
- colorPrimary(val){
66
- document.documentElement.style.setProperty('--el-color-primary', val);
67
- for (let i = 1; i <= 9; i++) {
68
- document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(val,i/10));
69
- }
70
- for (let i = 1; i <= 9; i++) {
71
- document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, colorTool.darken(val,i/10));
72
- }
73
- this.$tool.data.set("APP_COLOR", val);
74
- }
75
- }
76
- }
77
- </script>
78
-
79
- <style>
80
- </style>
1
+ <template>
2
+ <el-form ref="form" label-width="120px" label-position="left" style="padding:0 20px;">
3
+ <!-- <el-alert title="以下配置可实时预览,开发者可在 config/index.js 中配置默认值,非常不建议在生产环境下开放布局设置" type="error" :closable="false"></el-alert> -->
4
+ <el-divider></el-divider>
5
+ <el-form-item :label="$t('user.nightmode')">
6
+ <el-switch v-model="dark" active-value="dark" inactive-value="default"></el-switch>
7
+ </el-form-item>
8
+ <el-divider></el-divider>
9
+ <el-form-item :label="$t('user.color')">
10
+ <el-color-picker v-model="colorPrimary" :predefine="colorList">></el-color-picker>
11
+ </el-form-item>
12
+ <el-divider></el-divider>
13
+ <el-form-item :label="$t('user.layout')">
14
+ <el-select v-model="layout" placeholder="请选择">
15
+ <el-option label="默认" value="default"></el-option>
16
+ <el-option label="通栏" value="header"></el-option>
17
+ <el-option label="经典" value="menu"></el-option>
18
+ <el-option label="功能坞" value="dock"></el-option>
19
+ </el-select>
20
+ </el-form-item>
21
+ <el-form-item :label="$t('user.menu')">
22
+ <el-switch v-model="menuIsCollapse"></el-switch>
23
+ </el-form-item>
24
+ <el-form-item :label="$t('user.tag')">
25
+ <el-switch v-model="layoutTags"></el-switch>
26
+ </el-form-item>
27
+ <el-divider></el-divider>
28
+ <el-form-item :label="$t('user.lang')">
29
+ <Lang />
30
+ </el-form-item>
31
+
32
+ </el-form>
33
+ </template>
34
+
35
+ <script>
36
+ import colorTool from '@/utils/color'
37
+ import Lang from './lang.vue'
38
+
39
+ export default {
40
+ components: { Lang },
41
+ data(){
42
+ return {
43
+ layout: this.$store.state.global.layout,
44
+ menuIsCollapse: this.$store.state.global.menuIsCollapse,
45
+ layoutTags: this.$store.state.global.layoutTags,
46
+ dark: this.$tool.data.get('APP_THEME'),
47
+ colorList: ['#409EFF', '#009688', '#536dfe', '#ff5c93', '#c62f2f', '#fd726d'],
48
+ colorPrimary: this.$tool.data.get('APP_COLOR') || this.$config.COLOR || '#409EFF'
49
+ }
50
+ },
51
+ watch: {
52
+ layout(val) {
53
+ this.$store.commit("SET_layout", val)
54
+ },
55
+ menuIsCollapse(){
56
+ this.$store.commit("TOGGLE_menuIsCollapse")
57
+ },
58
+ layoutTags(){
59
+ this.$store.commit("TOGGLE_layoutTags")
60
+ },
61
+ dark(val){
62
+ document.body.setAttribute('data-theme', val)
63
+ this.$tool.data.set("APP_THEME", val);
64
+ },
65
+ colorPrimary(val){
66
+ document.documentElement.style.setProperty('--el-color-primary', val);
67
+ for (let i = 1; i <= 9; i++) {
68
+ document.documentElement.style.setProperty(`--el-color-primary-light-${i}`, colorTool.lighten(val,i/10));
69
+ }
70
+ for (let i = 1; i <= 9; i++) {
71
+ document.documentElement.style.setProperty(`--el-color-primary-dark-${i}`, colorTool.darken(val,i/10));
72
+ }
73
+ this.$tool.data.set("APP_COLOR", val);
74
+ }
75
+ }
76
+ }
77
+ </script>
78
+
79
+ <style>
80
+ </style>