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.
- package/README.md +5 -5
- package/dist/components/lwForm/index.vue +312 -312
- package/dist/components/lwIconSelect/iconSelect.js +288 -288
- package/dist/components/lwIconSelect/index.vue +142 -142
- package/dist/components/lwLayout/components/NavMenu.vue +36 -36
- package/dist/components/lwLayout/components/aside.vue +291 -295
- package/dist/components/lwLayout/components/bu.vue +72 -70
- package/dist/components/lwLayout/components/iframeView.vue +57 -57
- package/dist/components/lwLayout/components/lang.vue +76 -76
- package/dist/components/lwLayout/components/setting.vue +80 -80
- package/dist/components/lwLayout/components/sideM.vue +137 -136
- package/dist/components/lwLayout/components/tags.vue +329 -329
- package/dist/components/lwLayout/components/topbar.vue +70 -70
- package/dist/components/lwLayout/components/userbar.vue +210 -209
- package/dist/components/lwLayout/index.vue +399 -398
- package/dist/components/lwLogin/index.vue +446 -383
- package/dist/components/lwSearch/date/date.vue +110 -110
- package/dist/components/lwSearch/dateRange/dateRange.vue +110 -110
- package/dist/components/lwSearch/dates/dates.vue +366 -366
- package/dist/components/lwSearch/index.vue +636 -636
- package/dist/components/lwSearch/input/input.vue +54 -54
- package/dist/components/lwSearch/locale/en-us.js +10 -10
- package/dist/components/lwSearch/locale/zh-cn.js +10 -10
- package/dist/components/lwSearch/select/select.vue +57 -57
- package/dist/components/lwSvgIcon/index.vue +28 -28
- package/dist/components/lwTable/index.js +425 -425
- package/dist/components/lwTable/index.scss +229 -229
- package/dist/components/lwTable/index.vue +225 -226
- package/dist/components/lwTable/locale/en-US.js +26 -26
- package/dist/components/lwTable/locale/zh-CN.js +26 -26
- package/dist/components/lwTable/useFullscreen.js +73 -73
- package/dist/components/lwTableSelect/index.vue +254 -254
- package/dist/components/lwTableSelect/tableSelect.js +23 -23
- package/dist/components/lwUpload/index.vue +365 -365
- package/dist/en-US-YCjgxjEt.js.map +1 -1
- package/dist/en-us-CziFtIQi.js.map +1 -1
- package/dist/lw-cdp-ui.esm.js +1484 -1459
- package/dist/lw-cdp-ui.esm.js.map +1 -1
- package/dist/lw-cdp-ui.umd.js +9 -9
- package/dist/lw-cdp-ui.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/zh-CN-BdDNsX4e.js.map +1 -1
- package/dist/zh-cn-DJpQp_O7.js.map +1 -1
- package/package.json +45 -45
|
@@ -1,136 +1,137 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div ref="" class="mobile-nav-button" @click="showMobileNav($event)" v-drag draggable="false"><el-icon><el-icon-menu /></el-icon></div>
|
|
3
|
-
|
|
4
|
-
<el-drawer ref="mobileNavBox" title="移动端菜单" :size="240" v-model="nav" direction="ltr" :with-header="false" destroy-on-close>
|
|
5
|
-
<el-container class="mobile-nav">
|
|
6
|
-
<el-header>
|
|
7
|
-
<div class="logo-bar"><img class="logo" src="
|
|
8
|
-
</el-header>
|
|
9
|
-
<el-main>
|
|
10
|
-
<el-scrollbar>
|
|
11
|
-
<el-menu :default-active="$route.meta.active || $route.fullPath" @select="select" router background-color="#212d3d" text-color="#fff" active-text-color="#409EFF">
|
|
12
|
-
<NavMenu :navMenus="menu"></NavMenu>
|
|
13
|
-
</el-menu>
|
|
14
|
-
</el-scrollbar>
|
|
15
|
-
</el-main>
|
|
16
|
-
</el-container>
|
|
17
|
-
</el-drawer>
|
|
18
|
-
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<script>
|
|
22
|
-
import NavMenu from './NavMenu.vue';
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
components: {
|
|
26
|
-
NavMenu
|
|
27
|
-
},
|
|
28
|
-
data() {
|
|
29
|
-
return {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
//
|
|
87
|
-
//
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
let
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
document.
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
return false
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
.mobile-nav-button
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
.mobile-nav
|
|
132
|
-
.mobile-nav .el-
|
|
133
|
-
.mobile-nav .
|
|
134
|
-
.mobile-nav .logo-bar
|
|
135
|
-
.mobile-nav .
|
|
136
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="" class="mobile-nav-button" @click="showMobileNav($event)" v-drag draggable="false"><el-icon><el-icon-menu /></el-icon></div>
|
|
3
|
+
|
|
4
|
+
<el-drawer ref="mobileNavBox" title="移动端菜单" :size="240" v-model="nav" direction="ltr" :with-header="false" destroy-on-close>
|
|
5
|
+
<el-container class="mobile-nav">
|
|
6
|
+
<el-header>
|
|
7
|
+
<div class="logo-bar"><img class="logo" :src="logo"><span>{{ $config.APP_NAME }}</span></div>
|
|
8
|
+
</el-header>
|
|
9
|
+
<el-main>
|
|
10
|
+
<el-scrollbar>
|
|
11
|
+
<el-menu :default-active="$route.meta.active || $route.fullPath" @select="select" router background-color="#212d3d" text-color="#fff" active-text-color="#409EFF">
|
|
12
|
+
<NavMenu :navMenus="menu"></NavMenu>
|
|
13
|
+
</el-menu>
|
|
14
|
+
</el-scrollbar>
|
|
15
|
+
</el-main>
|
|
16
|
+
</el-container>
|
|
17
|
+
</el-drawer>
|
|
18
|
+
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
import NavMenu from './NavMenu.vue';
|
|
23
|
+
import logo from '/images/logo.jpg';
|
|
24
|
+
export default {
|
|
25
|
+
components: {
|
|
26
|
+
NavMenu
|
|
27
|
+
},
|
|
28
|
+
data() {
|
|
29
|
+
return {
|
|
30
|
+
logo,
|
|
31
|
+
nav: false,
|
|
32
|
+
menu: []
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
computed:{
|
|
36
|
+
|
|
37
|
+
},
|
|
38
|
+
created() {
|
|
39
|
+
var menu = this.$router.sc_getMenu()
|
|
40
|
+
this.menu = this.filterUrl(menu)
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
watch: {
|
|
44
|
+
|
|
45
|
+
},
|
|
46
|
+
methods: {
|
|
47
|
+
showMobileNav(e){
|
|
48
|
+
var isdrag = e.currentTarget.getAttribute('drag-flag')
|
|
49
|
+
if (isdrag == 'true') {
|
|
50
|
+
return false;
|
|
51
|
+
}else{
|
|
52
|
+
this.nav = true;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
},
|
|
56
|
+
select(){
|
|
57
|
+
this.$refs.mobileNavBox.handleClose()
|
|
58
|
+
},
|
|
59
|
+
//转换外部链接的路由
|
|
60
|
+
filterUrl(map){
|
|
61
|
+
var newMap = []
|
|
62
|
+
map && map.forEach(item => {
|
|
63
|
+
item.meta = item.meta?item.meta:{};
|
|
64
|
+
//处理隐藏
|
|
65
|
+
if(item.meta.hidden || item.meta.type=="button"){
|
|
66
|
+
return false
|
|
67
|
+
}
|
|
68
|
+
//处理http
|
|
69
|
+
if(item.meta.type=='iframe'){
|
|
70
|
+
item.path = `/i/${item.name}`;
|
|
71
|
+
}
|
|
72
|
+
//递归循环
|
|
73
|
+
if(item.children&&item.children.length > 0){
|
|
74
|
+
item.children = this.filterUrl(item.children);
|
|
75
|
+
}
|
|
76
|
+
newMap.push(item)
|
|
77
|
+
})
|
|
78
|
+
return newMap;
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
directives: {
|
|
82
|
+
drag(el){
|
|
83
|
+
let oDiv = el; //当前元素
|
|
84
|
+
let firstTime='',lastTime='';
|
|
85
|
+
//禁止选择网页上的文字
|
|
86
|
+
// document.onselectstart = function() {
|
|
87
|
+
// return false;
|
|
88
|
+
// };
|
|
89
|
+
oDiv.onmousedown = function(e){
|
|
90
|
+
//鼠标按下,计算当前元素距离可视区的距离
|
|
91
|
+
let disX = e.clientX - oDiv.offsetLeft;
|
|
92
|
+
let disY = e.clientY - oDiv.offsetTop;
|
|
93
|
+
document.onmousemove = function(e){
|
|
94
|
+
oDiv.setAttribute('drag-flag', true);
|
|
95
|
+
firstTime = new Date().getTime();
|
|
96
|
+
//通过事件委托,计算移动的距离
|
|
97
|
+
let l = e.clientX - disX;
|
|
98
|
+
let t = e.clientY - disY;
|
|
99
|
+
|
|
100
|
+
//移动当前元素
|
|
101
|
+
|
|
102
|
+
if(t > 0 && t < document.body.clientHeight - 50){
|
|
103
|
+
oDiv.style.top = t + "px";
|
|
104
|
+
}
|
|
105
|
+
if(l > 0 && l < document.body.clientWidth - 50){
|
|
106
|
+
oDiv.style.left = l + "px";
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
document.onmouseup = function(){
|
|
112
|
+
lastTime = new Date().getTime();
|
|
113
|
+
if( (lastTime - firstTime)>200 ){
|
|
114
|
+
oDiv.setAttribute('drag-flag', false);
|
|
115
|
+
}
|
|
116
|
+
document.onmousemove = null;
|
|
117
|
+
document.onmouseup = null;
|
|
118
|
+
};
|
|
119
|
+
//return false不加的话可能导致黏连,就是拖到一个地方时div粘在鼠标上不下来,相当于onmouseup失效
|
|
120
|
+
return false;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
</script>
|
|
126
|
+
|
|
127
|
+
<style scoped>
|
|
128
|
+
.mobile-nav-button {position: fixed;bottom:10px;left:10px;z-index: 10;width: 50px;height: 50px;background: #409EFF;box-shadow: 0 2px 12px 0 rgba(64, 158, 255, 1);border-radius: 50%;display: flex;align-items: center;justify-content: center;}
|
|
129
|
+
.mobile-nav-button i {color: #fff;font-size: 20px;}
|
|
130
|
+
|
|
131
|
+
.mobile-nav {background: #212d3d;}
|
|
132
|
+
.mobile-nav .el-header {background: transparent;border: 0;}
|
|
133
|
+
.mobile-nav .el-main {padding:0;}
|
|
134
|
+
.mobile-nav .logo-bar {display: flex;align-items: center;font-weight: bold;font-size: 20px;color: #fff;}
|
|
135
|
+
.mobile-nav .logo-bar img {width: 30px;margin-right: 10px;}
|
|
136
|
+
.mobile-nav .el-submenu__title:hover {background: #fff!important;}
|
|
137
|
+
</style>
|