kui-vue 3.2.10 → 3.2.11
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/components/_tool/number.js +177 -0
- package/components/_tool/utils.js +9 -3
- package/components/base/input.jsx +82 -54
- package/components/base/pop.jsx +22 -8
- package/components/button/button.jsx +1 -1
- package/components/button/styles/index.less +6 -2
- package/components/checkbox/checkbox.jsx +6 -11
- package/components/checkbox/demo/check-all.md +6 -6
- package/components/checkbox/group.jsx +0 -1
- package/components/checkbox/styles/index.less +17 -11
- package/components/divider/styles/index.less +1 -1
- package/components/dropdown/demo/rightmenu.md +2 -2
- package/components/dropdown/styles/index.less +23 -34
- package/components/form/demo/base.md +7 -1
- package/components/form/demo/valid.md +13 -4
- package/components/form/styles/index.less +1 -5
- package/components/icon/demo/base.md +2 -2
- package/components/icon/demo/search.vue +31 -14
- package/components/icon/icon.jsx +3 -1
- package/components/icon/styles/index.less +1 -1
- package/components/index.js +2 -0
- package/components/input/demo/icon.md +2 -2
- package/components/input/demo/size.md +3 -3
- package/components/input/demo/suffix.md +13 -6
- package/components/input/demo/theme.md +11 -6
- package/components/input/index.md +2 -1
- package/components/input/input.jsx +5 -0
- package/components/input/styles/index.less +52 -63
- package/components/inputNumber/demo/base.md +34 -0
- package/components/inputNumber/demo/ffix.md +27 -0
- package/components/inputNumber/demo/format.md +80 -0
- package/components/inputNumber/demo/index.vue +23 -0
- package/components/inputNumber/demo/info.md +7 -0
- package/components/inputNumber/demo/size.md +18 -0
- package/components/inputNumber/index.js +2 -0
- package/components/inputNumber/index.md +16 -0
- package/components/inputNumber/inputNumber.jsx +169 -0
- package/components/inputNumber/styles/index.less +172 -0
- package/components/menu/demo/collapsed.md +1 -1
- package/components/menu/styles/dropmenu.less +2 -2
- package/components/menu/styles/index.less +31 -14
- package/components/message/demo/icon.md +33 -0
- package/components/message/demo/index.vue +2 -0
- package/components/message/index.md +9 -7
- package/components/message/inner.jsx +5 -3
- package/components/modal/modal.jsx +31 -31
- package/components/notice/demo/icon.md +27 -11
- package/components/notice/demo/index.vue +2 -0
- package/components/notice/demo/types.md +28 -0
- package/components/notice/index.js +3 -0
- package/components/notice/index.md +8 -6
- package/components/popconfirm/styles/index.less +64 -83
- package/components/poptip/demo/base.md +7 -0
- package/components/poptip/demo/placement.md +12 -13
- package/components/poptip/styles/index.less +60 -79
- package/components/progress/demo/circle.md +2 -2
- package/components/radio/button.jsx +4 -2
- package/components/radio/demo/button.md +32 -28
- package/components/radio/group.jsx +4 -2
- package/components/radio/radio.jsx +7 -7
- package/components/radio/styles/index.less +61 -29
- package/components/rate/demo/base.md +7 -1
- package/components/rate/rate.jsx +8 -3
- package/components/rate/star.jsx +4 -3
- package/components/rate/styles/index.less +5 -3
- package/components/select/select.jsx +2 -0
- package/components/skeleton/demo/custom.md +62 -0
- package/components/skeleton/demo/index.vue +2 -0
- package/components/skeleton/demo/items.md +6 -2
- package/components/skeleton/index.md +32 -12
- package/components/skeleton/skeleton.jsx +1 -3
- package/components/skeleton/skeletonAvatar.jsx +33 -7
- package/components/skeleton/skeletonButton.jsx +29 -4
- package/components/skeleton/skeletonImage.jsx +43 -6
- package/components/skeleton/skeletonText.jsx +29 -4
- package/components/slider/demo/base.md +7 -15
- package/components/slider/demo/formatter.md +19 -0
- package/components/slider/demo/index.vue +10 -1
- package/components/slider/demo/marks.md +42 -0
- package/components/slider/demo/reverse.md +26 -0
- package/components/slider/demo/vertical.md +26 -3
- package/components/slider/demo/withNumber.md +43 -0
- package/components/slider/index.md +15 -6
- package/components/slider/slider.jsx +173 -41
- package/components/slider/styles/index.less +109 -44
- package/components/slider/thumb.jsx +165 -0
- package/components/space/demo/align.md +22 -21
- package/components/space/demo/base.md +0 -1
- package/components/space/demo/index.vue +2 -0
- package/components/space/demo/size.md +34 -22
- package/components/space/demo/vertical.md +1 -1
- package/components/space/demo/wrap.md +12 -0
- package/components/space/index.md +6 -5
- package/components/space/space.jsx +40 -35
- package/components/space/styles/index.less +15 -0
- package/components/spin/demo/mode.md +6 -4
- package/components/spin/spin.jsx +1 -1
- package/components/styles/index.less +1 -0
- package/components/switch/demo/loading.md +1 -1
- package/components/switch/demo/text.md +3 -1
- package/components/switch/styles/index.less +31 -20
- package/components/table/styles/index.less +9 -10
- package/components/tooltip/styles/index.less +103 -76
- package/components/tooltip/tooltip.jsx +3 -0
- package/components/upload/styles/index.less +7 -0
- package/components/upload/upload.jsx +22 -12
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.js +2 -2
- package/package.json +1 -1
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
<div>
|
|
9
9
|
<Switch true-text="Yes" false-text="No" />
|
|
10
10
|
<br />
|
|
11
|
-
<Switch true-text="
|
|
11
|
+
<Switch true-text="|" false-text="〇" />
|
|
12
|
+
<br />
|
|
13
|
+
<Switch true-text="|" false-text="〇" checked/>
|
|
12
14
|
<br />
|
|
13
15
|
<Switch true-text="On" false-text="Off" />
|
|
14
16
|
<br />
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
min-width: 44px;
|
|
4
4
|
height: 24px;
|
|
5
5
|
line-height: 22px;
|
|
6
|
-
border-radius:
|
|
6
|
+
border-radius: 12px;
|
|
7
7
|
vertical-align: middle;
|
|
8
|
-
border: 1px solid var(--kui-color-border);
|
|
8
|
+
border: none; // 1px solid var(--kui-color-border);
|
|
9
9
|
background-color: var(--kui-color-border);
|
|
10
10
|
font-size: 12px;
|
|
11
11
|
position: relative;
|
|
@@ -22,26 +22,27 @@
|
|
|
22
22
|
color: var(--kui-color-font);
|
|
23
23
|
&:focus {
|
|
24
24
|
// border: 1px solid var(--kui-color-main);
|
|
25
|
-
box-shadow: 0 0 5px var(--kui-color-main-30);
|
|
25
|
+
// box-shadow: 0 0 5px var(--kui-color-main-30);
|
|
26
26
|
}
|
|
27
27
|
.k-icon {
|
|
28
28
|
font-size: 16px;
|
|
29
29
|
}
|
|
30
30
|
&::before {
|
|
31
31
|
content: '';
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
34
|
-
border-radius:
|
|
35
|
-
background-color:
|
|
32
|
+
width: 18px;
|
|
33
|
+
height: 18px;
|
|
34
|
+
border-radius: 9px;
|
|
35
|
+
background-color: #fff;
|
|
36
36
|
position: absolute;
|
|
37
|
-
left:
|
|
37
|
+
left: 3px;
|
|
38
38
|
top: 50%;
|
|
39
|
-
cursor:
|
|
39
|
+
cursor: inherit;
|
|
40
40
|
transform: translate3d(0, -50%, 0);
|
|
41
41
|
transition: all .36s cubic-bezier(.78, .14, .15, .86);
|
|
42
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 0 1px rgba(0, 0, 0, 0.3);
|
|
42
43
|
}
|
|
43
44
|
.k-switch-inner {
|
|
44
|
-
color:
|
|
45
|
+
color: var(--kui-color-gray-70);
|
|
45
46
|
margin-left: 25px;
|
|
46
47
|
margin-right: 8px;
|
|
47
48
|
display: flex;
|
|
@@ -49,14 +50,15 @@
|
|
|
49
50
|
}
|
|
50
51
|
&:active:not(&:disabled) {
|
|
51
52
|
&::before {
|
|
52
|
-
width:
|
|
53
|
+
width: 22px;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
.k-switch-loading {
|
|
56
|
-
color: var(--kui-color-main);
|
|
57
|
+
color: #000; //var(--kui-color-main);
|
|
57
58
|
position: absolute;
|
|
58
|
-
left:
|
|
59
|
-
top:
|
|
59
|
+
left: 4px;
|
|
60
|
+
top: 50%;
|
|
61
|
+
margin-top: -8px;
|
|
60
62
|
}
|
|
61
63
|
}
|
|
62
64
|
|
|
@@ -67,6 +69,7 @@
|
|
|
67
69
|
width: 12px;
|
|
68
70
|
height: 12px;
|
|
69
71
|
border-radius: 12px;
|
|
72
|
+
left: 2px;
|
|
70
73
|
}
|
|
71
74
|
&:active {
|
|
72
75
|
&::before {
|
|
@@ -79,13 +82,18 @@
|
|
|
79
82
|
}
|
|
80
83
|
}
|
|
81
84
|
.k-switch-loading {
|
|
82
|
-
left:
|
|
85
|
+
left: 3px;
|
|
83
86
|
font-size: 10px;
|
|
84
|
-
top:
|
|
87
|
+
margin-top: -5px;
|
|
88
|
+
// top: 3px;
|
|
85
89
|
}
|
|
86
90
|
&.k-switch-checked {
|
|
91
|
+
&::before {
|
|
92
|
+
margin-left: -2px;
|
|
93
|
+
}
|
|
87
94
|
.k-switch-loading {
|
|
88
|
-
|
|
95
|
+
right: 3px;
|
|
96
|
+
left: auto;
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
99
|
}
|
|
@@ -96,14 +104,17 @@
|
|
|
96
104
|
&::before {
|
|
97
105
|
left: 100%;
|
|
98
106
|
transform: translate3d(-100%, -50%, 0);
|
|
99
|
-
margin-left: -
|
|
107
|
+
margin-left: -3px;
|
|
100
108
|
}
|
|
101
109
|
.k-switch-inner {
|
|
102
110
|
margin-left: 8px;
|
|
103
111
|
margin-right: 25px;
|
|
112
|
+
color: var(--kui-color-back);
|
|
104
113
|
}
|
|
105
114
|
.k-switch-loading {
|
|
106
|
-
left:
|
|
115
|
+
// margin-left: -3px;
|
|
116
|
+
left: auto;
|
|
117
|
+
right: 4px;
|
|
107
118
|
}
|
|
108
119
|
}
|
|
109
120
|
|
|
@@ -111,6 +122,6 @@
|
|
|
111
122
|
opacity: .6;
|
|
112
123
|
cursor: not-allowed;
|
|
113
124
|
.k-switch-loading {
|
|
114
|
-
color:
|
|
125
|
+
color: #000;
|
|
115
126
|
}
|
|
116
127
|
}
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
display: flex;
|
|
57
57
|
flex-direction: row;
|
|
58
58
|
align-items: center;
|
|
59
|
+
line-height: 1;
|
|
59
60
|
.k-table-header-title {
|
|
60
61
|
flex: 1;
|
|
61
62
|
}
|
|
@@ -67,14 +68,13 @@
|
|
|
67
68
|
display: inline-block;
|
|
68
69
|
margin-left: 8px;
|
|
69
70
|
vertical-align: middle;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
margin-bottom: -.6em;
|
|
71
|
+
.k-icon {
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
font-size: 10px;
|
|
75
|
+
line-height: 1;
|
|
76
|
+
color: #ccc;
|
|
77
|
+
height: 7px;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
.actived {
|
|
@@ -134,8 +134,7 @@
|
|
|
134
134
|
&-fixed-header {
|
|
135
135
|
word-break: break-all;
|
|
136
136
|
.k-table-fixed-main-thead {
|
|
137
|
-
&::-webkit-scrollbar {
|
|
138
|
-
}
|
|
137
|
+
&::-webkit-scrollbar {}
|
|
139
138
|
}
|
|
140
139
|
.k-table-fixed-main-thead, .k-table-fixed-right-thead, .k-table-fixed-left-thead {
|
|
141
140
|
overflow: scroll;
|
|
@@ -2,50 +2,39 @@
|
|
|
2
2
|
.k-tooltip {
|
|
3
3
|
display: inline-block;
|
|
4
4
|
position: relative;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.k-tooltip-content {
|
|
8
|
-
// min-width: 200px;
|
|
9
5
|
max-width: 256px;
|
|
10
6
|
font-size: 12px;
|
|
11
7
|
line-height: 1.5;
|
|
12
8
|
position: absolute;
|
|
13
9
|
z-index: 1001;
|
|
14
|
-
.k-tooltip-
|
|
15
|
-
|
|
10
|
+
.k-tooltip-content {
|
|
11
|
+
// min-width: 200px;
|
|
12
|
+
// .k-tooltip-inner {
|
|
13
|
+
background: @dark-back-color-10; // var(--kui-color-control-10);
|
|
16
14
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
|
|
17
|
-
color: var(--kui-color-font);
|
|
15
|
+
color: #fff; //var(--kui-color-font);
|
|
18
16
|
border-radius: var(--kui-border-radius);
|
|
17
|
+
position: relative;
|
|
18
|
+
// }
|
|
19
19
|
}
|
|
20
20
|
.k-tooltip-title {
|
|
21
|
-
padding:
|
|
21
|
+
padding: 8px 12px;
|
|
22
22
|
font-size: 14px;
|
|
23
23
|
}
|
|
24
24
|
.k-tooltip-arrow {
|
|
25
25
|
position: absolute;
|
|
26
26
|
box-sizing: border-box;
|
|
27
|
-
overflow: hidden;
|
|
28
27
|
display: flex;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.k-tooltip-arrow-content {
|
|
33
|
-
background-color: var(--kui-color-control-10);
|
|
34
|
-
transform: rotate(45deg);
|
|
35
|
-
width: 12px;
|
|
36
|
-
height: 12px;
|
|
37
|
-
}
|
|
28
|
+
width: 24px;
|
|
29
|
+
height: 7px;
|
|
30
|
+
color: @dark-back-color-10;
|
|
38
31
|
}
|
|
39
32
|
&[k-placement^=top] {
|
|
40
|
-
.k-tooltip-
|
|
41
|
-
bottom:
|
|
42
|
-
height: 9px;
|
|
43
|
-
.k-tooltip-arrow-content {
|
|
44
|
-
margin-top: -15px;
|
|
45
|
-
}
|
|
33
|
+
.k-tooltip-content {
|
|
34
|
+
margin-bottom: 6px;
|
|
46
35
|
}
|
|
47
|
-
.k-tooltip-
|
|
48
|
-
|
|
36
|
+
.k-tooltip-arrow {
|
|
37
|
+
bottom: -6px;
|
|
49
38
|
}
|
|
50
39
|
}
|
|
51
40
|
&[k-placement=top] {
|
|
@@ -56,197 +45,230 @@
|
|
|
56
45
|
}
|
|
57
46
|
&[k-placement=top-right] {
|
|
58
47
|
.k-tooltip-arrow {
|
|
59
|
-
right:
|
|
48
|
+
right: 12px;
|
|
60
49
|
}
|
|
61
50
|
}
|
|
62
51
|
&[k-placement=top-left] {
|
|
63
52
|
.k-tooltip-arrow {
|
|
64
|
-
left:
|
|
53
|
+
left: 12px;
|
|
65
54
|
}
|
|
66
55
|
}
|
|
67
56
|
&[k-placement^=bottom] {
|
|
57
|
+
.k-tooltip-content {
|
|
58
|
+
margin-top: 6px;
|
|
59
|
+
}
|
|
68
60
|
.k-tooltip-arrow {
|
|
69
|
-
top:
|
|
61
|
+
top: -7px;
|
|
70
62
|
height: 9px;
|
|
71
|
-
|
|
72
|
-
margin-bottom: -15px;
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
.k-tooltip-inner {
|
|
76
|
-
margin-top: 12px;
|
|
63
|
+
transform: rotate(180deg);
|
|
77
64
|
}
|
|
78
65
|
}
|
|
79
66
|
&[k-placement=bottom] {
|
|
80
67
|
.k-tooltip-arrow {
|
|
81
68
|
left: 50%;
|
|
82
|
-
transform: translateX(-50%);
|
|
69
|
+
transform: translateX(-50%) rotate(180deg);
|
|
83
70
|
}
|
|
84
71
|
}
|
|
85
72
|
&[k-placement=bottom-left] {
|
|
86
73
|
.k-tooltip-arrow {
|
|
87
|
-
left:
|
|
74
|
+
left: 12px;
|
|
88
75
|
}
|
|
89
76
|
}
|
|
90
77
|
&[k-placement=bottom-right] {
|
|
91
78
|
.k-tooltip-arrow {
|
|
92
|
-
right:
|
|
79
|
+
right: 12px;
|
|
93
80
|
}
|
|
94
81
|
}
|
|
95
82
|
&[k-placement^=left] {
|
|
96
|
-
.k-tooltip-
|
|
97
|
-
right:
|
|
98
|
-
width: 9px;
|
|
99
|
-
height: 19px;
|
|
100
|
-
.k-tooltip-arrow-content {
|
|
101
|
-
margin-left: -15px;
|
|
102
|
-
}
|
|
83
|
+
.k-tooltip-content {
|
|
84
|
+
margin-right: 6px;
|
|
103
85
|
}
|
|
104
|
-
.k-tooltip-
|
|
105
|
-
|
|
86
|
+
.k-tooltip-arrow {
|
|
87
|
+
right: -14px;
|
|
88
|
+
width: 24px;
|
|
89
|
+
height: 7px;
|
|
90
|
+
transform: rotate(-90deg);
|
|
106
91
|
}
|
|
107
92
|
}
|
|
108
93
|
&[k-placement=left] {
|
|
109
94
|
.k-tooltip-arrow {
|
|
110
95
|
top: 50%;
|
|
111
|
-
transform: translateY(-50%);
|
|
96
|
+
transform: translateY(-50%) rotate(-90deg);
|
|
112
97
|
}
|
|
113
98
|
}
|
|
114
99
|
&[k-placement=left-bottom] {
|
|
115
100
|
.k-tooltip-arrow {
|
|
116
|
-
bottom:
|
|
101
|
+
bottom: 12px;
|
|
117
102
|
}
|
|
118
103
|
}
|
|
119
104
|
&[k-placement=left-top] {
|
|
120
105
|
.k-tooltip-arrow {
|
|
121
|
-
top:
|
|
106
|
+
top: 12px;
|
|
122
107
|
}
|
|
123
108
|
}
|
|
124
109
|
&[k-placement^=right] {
|
|
125
|
-
.k-tooltip-
|
|
126
|
-
left:
|
|
127
|
-
width: 9px;
|
|
128
|
-
height: 19px;
|
|
129
|
-
.k-tooltip-arrow-content {
|
|
130
|
-
margin-right: -15px;
|
|
131
|
-
}
|
|
110
|
+
.k-tooltip-content {
|
|
111
|
+
margin-left: 6px;
|
|
132
112
|
}
|
|
133
|
-
.k-tooltip-
|
|
134
|
-
|
|
113
|
+
.k-tooltip-arrow {
|
|
114
|
+
left: -14px;
|
|
115
|
+
width: 24px;
|
|
116
|
+
height: 7px;
|
|
117
|
+
transform: rotate(90deg);
|
|
135
118
|
}
|
|
136
119
|
}
|
|
137
120
|
&[k-placement=right] {
|
|
138
121
|
.k-tooltip-arrow {
|
|
139
122
|
top: 50%;
|
|
140
|
-
transform: translateY(-50%);
|
|
123
|
+
transform: translateY(-50%) rotate(90deg);
|
|
141
124
|
}
|
|
142
125
|
}
|
|
143
126
|
&[k-placement=right-top] {
|
|
144
127
|
.k-tooltip-arrow {
|
|
145
|
-
top:
|
|
128
|
+
top: 12px;
|
|
146
129
|
}
|
|
147
130
|
}
|
|
148
131
|
&[k-placement=right-bottom] {
|
|
149
132
|
.k-tooltip-arrow {
|
|
150
|
-
bottom:
|
|
133
|
+
bottom: 12px;
|
|
151
134
|
}
|
|
152
135
|
}
|
|
153
136
|
}
|
|
154
137
|
|
|
155
138
|
.k-tooltip-has-color {
|
|
156
|
-
.k-tooltip-
|
|
139
|
+
.k-tooltip-content {
|
|
157
140
|
color: #fff;
|
|
158
141
|
}
|
|
159
142
|
}
|
|
160
143
|
|
|
161
144
|
.k-tooltip-pink {
|
|
162
|
-
.k-tooltip-
|
|
145
|
+
.k-tooltip-content {
|
|
163
146
|
color: #fff;
|
|
164
147
|
background-color: var(--kui-color-pink);
|
|
165
148
|
}
|
|
149
|
+
.k-tooltip-arrow {
|
|
150
|
+
color: var(--kui-color-pink);
|
|
151
|
+
}
|
|
166
152
|
}
|
|
167
153
|
|
|
168
154
|
.k-tooltip-red {
|
|
169
|
-
.k-tooltip-
|
|
155
|
+
.k-tooltip-content {
|
|
170
156
|
color: #fff;
|
|
171
157
|
background-color: var(--kui-color-red);
|
|
172
158
|
}
|
|
159
|
+
.k-tooltip-arrow {
|
|
160
|
+
color: var(--kui-color-red);
|
|
161
|
+
}
|
|
173
162
|
}
|
|
174
163
|
|
|
175
164
|
.k-tooltip-yellow {
|
|
176
|
-
.k-tooltip-
|
|
165
|
+
.k-tooltip-content {
|
|
177
166
|
color: #fff;
|
|
178
167
|
background-color: var(--kui-color-yellow);
|
|
179
168
|
}
|
|
169
|
+
.k-tooltip-arrow {
|
|
170
|
+
color: var(--kui-color-yellow);
|
|
171
|
+
}
|
|
180
172
|
}
|
|
181
173
|
|
|
182
174
|
.k-tooltip-orange {
|
|
183
|
-
.k-tooltip-
|
|
175
|
+
.k-tooltip-content {
|
|
184
176
|
color: #fff;
|
|
185
177
|
background-color: var(--kui-color-orange);
|
|
186
178
|
}
|
|
179
|
+
.k-tooltip-arrow {
|
|
180
|
+
color: var(--kui-color-orange);
|
|
181
|
+
}
|
|
187
182
|
}
|
|
188
183
|
|
|
189
184
|
.k-tooltip-cyan {
|
|
190
|
-
.k-tooltip-
|
|
185
|
+
.k-tooltip-content {
|
|
191
186
|
color: #fff;
|
|
192
187
|
background-color: var(--kui-color-cyan);
|
|
193
188
|
}
|
|
189
|
+
.k-tooltip-arrow {
|
|
190
|
+
color: var(--kui-color-cyan);
|
|
191
|
+
}
|
|
194
192
|
}
|
|
195
193
|
|
|
196
194
|
.k-tooltip-green {
|
|
197
|
-
.k-tooltip-
|
|
195
|
+
.k-tooltip-content {
|
|
198
196
|
color: #fff;
|
|
199
197
|
background-color: var(--kui-color-green);
|
|
200
198
|
}
|
|
199
|
+
.k-tooltip-arrow {
|
|
200
|
+
color: var(--kui-color-green);
|
|
201
|
+
}
|
|
201
202
|
}
|
|
202
203
|
|
|
203
204
|
.k-tooltip-blue {
|
|
204
|
-
.k-tooltip-
|
|
205
|
+
.k-tooltip-content {
|
|
205
206
|
color: #fff;
|
|
206
207
|
background-color: var(--kui-color-blue);
|
|
207
208
|
}
|
|
209
|
+
.k-tooltip-arrow {
|
|
210
|
+
color: var(--kui-color-blue);
|
|
211
|
+
}
|
|
208
212
|
}
|
|
209
213
|
|
|
210
214
|
.k-tooltip-purple {
|
|
211
|
-
.k-tooltip-
|
|
215
|
+
.k-tooltip-content {
|
|
212
216
|
color: #fff;
|
|
213
217
|
background-color: var(--kui-color-purple);
|
|
214
218
|
}
|
|
219
|
+
.k-tooltip-arrow {
|
|
220
|
+
color: var(--kui-color-purple);
|
|
221
|
+
}
|
|
215
222
|
}
|
|
216
223
|
|
|
217
224
|
.k-tooltip-geekblue {
|
|
218
|
-
.k-tooltip-
|
|
225
|
+
.k-tooltip-content {
|
|
219
226
|
color: #fff;
|
|
220
227
|
background-color: var(--kui-color-geekblue);
|
|
221
228
|
}
|
|
229
|
+
.k-tooltip-arrow {
|
|
230
|
+
color: var(--kui-color-geekblue);
|
|
231
|
+
}
|
|
222
232
|
}
|
|
223
233
|
|
|
224
234
|
.k-tooltip-magenta {
|
|
225
|
-
.k-tooltip-
|
|
235
|
+
.k-tooltip-content {
|
|
226
236
|
color: #fff;
|
|
227
237
|
background-color: var(--kui-color-magenta);
|
|
228
238
|
}
|
|
239
|
+
.k-tooltip-arrow {
|
|
240
|
+
color: var(--kui-color-magenta);
|
|
241
|
+
}
|
|
229
242
|
}
|
|
230
243
|
|
|
231
244
|
.k-tooltip-volcano {
|
|
232
|
-
.k-tooltip-
|
|
245
|
+
.k-tooltip-content {
|
|
233
246
|
color: #fff;
|
|
234
247
|
background-color: var(--kui-color-volcano);
|
|
235
248
|
}
|
|
249
|
+
.k-tooltip-arrow {
|
|
250
|
+
color: var(--kui-color-volcano);
|
|
251
|
+
}
|
|
236
252
|
}
|
|
237
253
|
|
|
238
254
|
.k-tooltip-gold {
|
|
239
|
-
.k-tooltip-
|
|
255
|
+
.k-tooltip-content {
|
|
240
256
|
color: #fff;
|
|
241
257
|
background-color: var(--kui-color-gold);
|
|
242
258
|
}
|
|
259
|
+
.k-tooltip-arrow {
|
|
260
|
+
color: var(--kui-color-gold);
|
|
261
|
+
}
|
|
243
262
|
}
|
|
244
263
|
|
|
245
264
|
.k-tooltip-lime {
|
|
246
|
-
.k-tooltip-
|
|
265
|
+
.k-tooltip-content {
|
|
247
266
|
color: #fff;
|
|
248
267
|
background-color: var(--kui-color-lime);
|
|
249
268
|
}
|
|
269
|
+
.k-tooltip-arrow {
|
|
270
|
+
color: var(--kui-color-lime);
|
|
271
|
+
}
|
|
250
272
|
}
|
|
251
273
|
|
|
252
274
|
@keyframes pop-zoom-in {
|
|
@@ -279,4 +301,9 @@
|
|
|
279
301
|
.k-tooltip-leave-active {
|
|
280
302
|
// transform-origin: center bottom;
|
|
281
303
|
animation: pop-zoom-out .3s;
|
|
304
|
+
}
|
|
305
|
+
body[theme-mode=dark], *[theme-mode=dark] {
|
|
306
|
+
.k-tooltip .k-tooltip-content {
|
|
307
|
+
// background-color: #999;
|
|
308
|
+
}
|
|
282
309
|
}
|
|
@@ -6,6 +6,7 @@ export default {
|
|
|
6
6
|
transfer: { type: Boolean, default: true },
|
|
7
7
|
title: String,
|
|
8
8
|
color: String,
|
|
9
|
+
trigger: String,
|
|
9
10
|
width: [Number, String],
|
|
10
11
|
placement: {
|
|
11
12
|
validator(value) {
|
|
@@ -15,6 +16,8 @@ export default {
|
|
|
15
16
|
},
|
|
16
17
|
default: "top"
|
|
17
18
|
},
|
|
19
|
+
value: Boolean,
|
|
20
|
+
show: Boolean
|
|
18
21
|
},
|
|
19
22
|
render() {
|
|
20
23
|
const title = this.$slots.title || this.title
|
|
@@ -243,6 +243,13 @@
|
|
|
243
243
|
&:hover {
|
|
244
244
|
border-color: var(--kui-color-main);
|
|
245
245
|
}
|
|
246
|
+
&[drag=over] {
|
|
247
|
+
border-color: var(--kui-color-main);
|
|
248
|
+
.k-upload-sub-text {
|
|
249
|
+
font-weight: bold;
|
|
250
|
+
color: var(--kui-color-main);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
246
253
|
}
|
|
247
254
|
.k-upload-add .k-icon {
|
|
248
255
|
font-size: 30px;
|
|
@@ -46,16 +46,16 @@ export default {
|
|
|
46
46
|
};
|
|
47
47
|
},
|
|
48
48
|
mounted() {
|
|
49
|
-
if (this.draggable && this.$isServer) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
49
|
+
// if (this.draggable && this.$isServer) {
|
|
50
|
+
// window.addEventListener("dragover", function (e) {
|
|
51
|
+
// e = e || event;
|
|
52
|
+
// e.preventDefault();
|
|
53
|
+
// }, false);
|
|
54
|
+
// window.addEventListener("drop", function (e) {
|
|
55
|
+
// e = e || event;
|
|
56
|
+
// e.preventDefault();
|
|
57
|
+
// }, false);
|
|
58
|
+
// }
|
|
59
59
|
},
|
|
60
60
|
methods: {
|
|
61
61
|
formatFileSize(fileSize) {
|
|
@@ -239,12 +239,17 @@ export default {
|
|
|
239
239
|
// var files = e.dataTransfer.files;
|
|
240
240
|
this.selectFiles(e)
|
|
241
241
|
e.preventDefault()
|
|
242
|
+
this.dragOver = false
|
|
242
243
|
return false
|
|
243
244
|
},
|
|
244
245
|
onDragEnter(e) {
|
|
245
246
|
this.dragOver = true
|
|
246
247
|
e.preventDefault()
|
|
247
248
|
return false
|
|
249
|
+
},
|
|
250
|
+
onDragOver(e) {
|
|
251
|
+
e.stopPropagation();
|
|
252
|
+
e.preventDefault();
|
|
248
253
|
}
|
|
249
254
|
},
|
|
250
255
|
|
|
@@ -268,9 +273,14 @@ export default {
|
|
|
268
273
|
// return cloneVNode(child, { on: { click: this.triggerSelect } })
|
|
269
274
|
// })
|
|
270
275
|
let addProps = {
|
|
276
|
+
attrs: {
|
|
277
|
+
drag: draggable && this.dragOver ? 'over' : null
|
|
278
|
+
},
|
|
271
279
|
on: {
|
|
272
280
|
dragenter: this.onDragEnter,
|
|
273
281
|
drop: this.onDrop,
|
|
282
|
+
dragover: this.onDragOver,
|
|
283
|
+
dragleave: () => this.dragOver = false,
|
|
274
284
|
click: this.triggerSelect
|
|
275
285
|
}
|
|
276
286
|
}
|
|
@@ -284,7 +294,7 @@ export default {
|
|
|
284
294
|
onChange={this.selectFiles} ref="k-upload-file" />
|
|
285
295
|
{(isPicture || draggable) ? <Icon type={uploadIcon} /> : this.$slots.default}
|
|
286
296
|
{(isPicture || draggable && uploadText) ? <span class="k-upload-text">{uploadText}</span> : null}
|
|
287
|
-
{(draggable && uploadSubText) ? <span class="k-upload-sub-text">{uploadSubText}</span> : null}
|
|
297
|
+
{(draggable && uploadSubText) ? <span class="k-upload-sub-text">{this.dragOver ? '松手开始上传' : uploadSubText}</span> : null}
|
|
288
298
|
</div>
|
|
289
299
|
</div> : null
|
|
290
300
|
|
|
@@ -312,7 +322,7 @@ export default {
|
|
|
312
322
|
(item.status != 'wait') ?
|
|
313
323
|
<div class="k-upload-file-status">
|
|
314
324
|
{item.status == 'uploading' ?
|
|
315
|
-
<Progress percent={item.percent} type={`${isPicture ? 'circle' : 'line'}`} size="small" showInfo={false} status="active" />
|
|
325
|
+
<Progress percent={item.percent} type={`${isPicture ? 'circle' : 'line'}`} size="small" showInfo={false} status="active" strokeWidth={15} />
|
|
316
326
|
:
|
|
317
327
|
statusText && !isPicture ? <div class="k-upload-file-status-text"><Icon type="alert-circle" />{statusText}</div> : null
|
|
318
328
|
}
|