kui-vue 3.6.5 → 3.6.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/components/alert/alert.jsx +26 -7
- package/components/alert/demo/basic.md +4 -4
- package/components/alert/demo/icon.md +15 -6
- package/components/alert/styles/index.less +42 -14
- package/components/avatar/styles/index.less +5 -5
- package/components/backtop/styles/index.less +10 -14
- package/components/badge/styles/index.less +7 -13
- package/components/breadcrumb/index.md +7 -6
- package/components/breadcrumb/styles/index.less +7 -21
- package/components/button/demo/color.md +0 -1
- package/components/button/demo/disabled.md +6 -0
- package/components/button/demo/light.md +1 -1
- package/components/button/styles/index.less +165 -111
- package/components/card/card.jsx +1 -1
- package/components/card/demo/basic.md +1 -1
- package/components/card/demo/border.md +1 -1
- package/components/card/demo/notitle.md +1 -1
- package/components/card/styles/index.less +5 -4
- package/components/carousel/carousel.jsx +186 -175
- package/components/carousel/styles/index.less +11 -16
- package/components/checkbox/checkbox.jsx +2 -2
- package/components/checkbox/styles/index.less +21 -29
- package/components/collapse/styles/index.less +7 -11
- package/components/colorPicker/styles/index.less +83 -71
- package/components/config/context.js +21 -0
- package/components/config/index.js +10 -2
- package/components/datePicker/datepicker.jsx +6 -7
- package/components/datePicker/styles/index.less +54 -57
- package/components/descriptions/styles/index.less +8 -17
- package/components/divider/styles/index.less +20 -18
- package/components/drawer/styles/animal.less +0 -1
- package/components/drawer/styles/index.less +8 -11
- package/components/dropdown/styles/index.less +26 -34
- package/components/empty/index.md +3 -2
- package/components/empty/styles/index.less +2 -2
- package/components/flex/demo/align.md +1 -1
- package/components/flex/demo/basic.md +1 -2
- package/components/flex/index.md +1 -1
- package/components/form/demo/dynamicvalid.md +1 -3
- package/components/form/demo/info.md +22 -12
- package/components/form/demo/valid.md +6 -6
- package/components/form/demo/withmodal.md +2 -2
- package/components/form/styles/index.less +10 -11
- package/components/grid/index.md +4 -1
- package/components/grid/styles/index.less +1 -1
- package/components/icon/demo/search.vue +44 -21
- package/components/icon/index.md +1 -1
- package/components/icon/styles/index.less +7 -8
- package/components/image/index.md +7 -1
- package/components/image/preview.jsx +17 -4
- package/components/image/styles/index.less +36 -42
- package/components/index.js +9 -9
- package/components/input/demo/icon.md +0 -1
- package/components/input/demo/suffix.md +2 -7
- package/components/input/input.jsx +31 -29
- package/components/input/inputBox.jsx +13 -0
- package/components/input/inputGroup.jsx +2 -0
- package/components/input/styles/index.less +47 -53
- package/components/input/textarea.jsx +1 -1
- package/components/inputNumber/demo/basic.md +3 -3
- package/components/inputNumber/demo/ffix.md +2 -2
- package/components/inputNumber/inputNumber.jsx +2 -2
- package/components/inputNumber/styles/index.less +36 -42
- package/components/layout/demo/basic.md +5 -5
- package/components/layout/demo/info.md +1 -34
- package/components/layout/demo/layout1.md +7 -7
- package/components/layout/demo/layout2.md +6 -7
- package/components/layout/demo/layout3.md +5 -5
- package/components/layout/demo/layout4.md +12 -8
- package/components/layout/demo/layout5.md +6 -2
- package/components/layout/styles/index.less +1 -18
- package/components/loading/demo/info.md +3 -3
- package/components/loading/styles/index.less +31 -31
- package/components/menu/index.md +14 -3
- package/components/menu/menu.jsx +1 -1
- package/components/menu/recursiveMenu.jsx +1 -0
- package/components/menu/styles/index.less +43 -55
- package/components/message/demo/basic.md +0 -7
- package/components/message/index.js +0 -4
- package/components/message/index.md +0 -1
- package/components/message/inner.jsx +15 -2
- package/components/message/styles/index.less +12 -17
- package/components/modal/demo/confirm.md +6 -6
- package/components/modal/demo/global.md +0 -15
- package/components/modal/demo/info.md +0 -1
- package/components/modal/index.js +5 -34
- package/components/modal/index.md +1 -2
- package/components/modal/modal.jsx +2 -1
- package/components/modal/styles/index.less +14 -21
- package/components/notice/demo/basic.md +0 -9
- package/components/notice/demo/close.md +4 -0
- package/components/notice/demo/types.md +1 -2
- package/components/notice/index.js +1 -19
- package/components/notice/styles/index.less +16 -22
- package/components/page/page.jsx +5 -4
- package/components/page/styles/index.less +49 -50
- package/components/popconfirm/demo/basic.md +11 -18
- package/components/popconfirm/demo/info.md +3 -1
- package/components/popconfirm/demo/local.md +14 -20
- package/components/popconfirm/demo/placement.md +3 -9
- package/components/popconfirm/index.md +3 -2
- package/components/popconfirm/styles/index.less +9 -15
- package/components/poptip/styles/index.less +44 -49
- package/components/progress/progress.jsx +23 -5
- package/components/progress/styles/index.less +20 -19
- package/components/radio/index.md +7 -7
- package/components/radio/radio.jsx +5 -1
- package/components/radio/styles/index.less +26 -32
- package/components/rate/index.md +11 -11
- package/components/rate/styles/index.less +4 -7
- package/components/select/select.jsx +1 -1
- package/components/select/styles/index.less +38 -51
- package/components/skeleton/index.md +5 -1
- package/components/skeleton/styles/index.less +21 -19
- package/components/slider/slider.jsx +25 -13
- package/components/slider/styles/index.less +13 -12
- package/components/space/space.jsx +2 -1
- package/components/spin/styles/index.less +25 -40
- package/components/statCard/countup.jsx +8 -0
- package/components/statCard/demo/card.md +20 -6
- package/components/statCard/index.md +17 -12
- package/components/statCard/statCard.jsx +16 -1
- package/components/statCard/styles/index.less +9 -6
- package/components/styles/less-css-var.less +309 -0
- package/components/styles/less-var.less +296 -0
- package/components/styles/sys.less +19 -15
- package/components/switch/styles/index.less +9 -24
- package/components/table/index.md +1 -1
- package/components/table/styles/index.less +63 -59
- package/components/tabs/styles/index.less +22 -24
- package/components/tag/demo/basic.md +0 -8
- package/components/tag/index.md +2 -1
- package/components/tag/styles/index.less +40 -41
- package/components/tag/tag.jsx +2 -2
- package/components/timeline/styles/index.less +8 -14
- package/components/tooltip/styles/index.less +35 -40
- package/components/tree/index.md +15 -15
- package/components/tree/styles/index.less +36 -56
- package/components/tree/tree.jsx +1 -0
- package/components/treeselect/index.md +1 -1
- package/components/treeselect/styles/index.less +26 -32
- package/components/treeselect/treeselect.jsx +1 -1
- package/components/upload/demo/forms.md +0 -1
- package/components/upload/fileList.jsx +6 -3
- package/components/upload/styles/index.less +33 -29
- package/components/upload/upload.jsx +5 -1
- package/components/utils/vue.js +4 -2
- package/dist/k-ui.cjs.js +2 -2
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.d.ts +92 -74
- package/dist/k-ui.esm.js +2 -2
- package/dist/k-ui.umd.js +2 -2
- package/dist/locale/de.js +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/ua.js +2 -2
- package/dist/locale/uk.js +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/zh-CN.js +1 -1
- package/dist/locale/zh-TW.js +1 -1
- package/package.json +15 -16
- package/types/alert/Alert.d.ts +2 -0
- package/types/card/Card.d.ts +1 -1
- package/types/checkbox/Checkbox.d.ts +1 -0
- package/types/datePicker/DatePicker.d.ts +1 -0
- package/types/index.d.ts +8 -8
- package/types/input/Input.d.ts +1 -0
- package/types/input/InputGroup.d.ts +2 -0
- package/types/input/TextArea.d.ts +1 -0
- package/types/inputNumber/InputNumber.d.ts +1 -0
- package/types/page/Page.d.ts +1 -0
- package/types/select/Select.d.ts +1 -0
- package/types/statCard/StatCard.d.ts +5 -0
- package/types/tag/Tag.d.ts +1 -0
- package/types/treeselect/TreeSelect.d.ts +1 -0
- package/components/dropdown/demo/custom.md +0 -31
- package/components/icon/lib/dist.json +0 -1
- package/components/icon/lib/kui-icons.js +0 -1
- package/components/icon/lib/sprite.svg +0 -1
- package/components/styles/color.less +0 -209
- package/components/styles/var.less +0 -207
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
@import
|
|
1
|
+
@import "../../styles/less-css-var.less";
|
|
2
2
|
|
|
3
3
|
.k-color-picker {
|
|
4
|
-
// width: 55px;
|
|
5
4
|
height: 32px;
|
|
6
5
|
border: 1px solid var(--kui-color-border);
|
|
7
6
|
border-radius: var(--kui-border-radius);
|
|
@@ -12,20 +11,18 @@
|
|
|
12
11
|
padding: 3px;
|
|
13
12
|
outline: 1px solid transparent;
|
|
14
13
|
|
|
15
|
-
&:hover
|
|
16
|
-
|
|
17
|
-
border-color: var(--kui-color-main-hover);
|
|
14
|
+
&:not(.k-color-picker-disabled):hover {
|
|
15
|
+
border-color: var(--kui-color-primary-hover);
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
&:active {
|
|
21
|
-
opacity: .8;
|
|
18
|
+
&:not(.k-color-picker-disabled):active {
|
|
19
|
+
opacity: 0.8;
|
|
22
20
|
}
|
|
23
21
|
|
|
24
22
|
.k-color-picker-selection {
|
|
25
23
|
line-height: 1.571;
|
|
26
24
|
display: flex;
|
|
27
25
|
align-items: center;
|
|
28
|
-
// padding: 2px;
|
|
29
26
|
cursor: pointer;
|
|
30
27
|
}
|
|
31
28
|
|
|
@@ -33,17 +30,24 @@
|
|
|
33
30
|
height: 24px;
|
|
34
31
|
width: 24px;
|
|
35
32
|
border-radius: 12%;
|
|
36
|
-
// margin: 2px;
|
|
37
33
|
overflow: hidden;
|
|
38
|
-
background-image:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
background-image:
|
|
35
|
+
linear-gradient(-45deg, #cdcdcd 25%, transparent 0),
|
|
36
|
+
linear-gradient(45deg, #cdcdcd 25%, transparent 0),
|
|
37
|
+
linear-gradient(-45deg, transparent 75%, #cdcdcd 0),
|
|
38
|
+
linear-gradient(45deg, transparent 75%, #cdcdcd 0);
|
|
39
|
+
background-size: 11px 11px;
|
|
40
|
+
background-position:
|
|
41
|
+
0 0,
|
|
42
|
+
0 -5.5px,
|
|
43
|
+
-5.5px 5.5px,
|
|
44
|
+
5.5px 0;
|
|
45
|
+
box-shadow: inset 0 0 1px 0 var(--kui-color-shadow);
|
|
42
46
|
|
|
43
47
|
.k-color-picker-color-inner {
|
|
44
48
|
height: 100%;
|
|
45
49
|
width: 100%;
|
|
46
|
-
box-shadow: inset 0 0 0 1px
|
|
50
|
+
box-shadow: inset 0 0 0 1px var(--kui-color-shadow);
|
|
47
51
|
border-radius: inherit;
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -52,7 +56,7 @@
|
|
|
52
56
|
margin: 0 5px;
|
|
53
57
|
font-size: 16px;
|
|
54
58
|
color: var(--kui-color-icon);
|
|
55
|
-
transition: transform .3s cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
59
|
+
transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
|
|
56
60
|
}
|
|
57
61
|
|
|
58
62
|
.k-color-picker-trigger-text {
|
|
@@ -62,10 +66,9 @@
|
|
|
62
66
|
}
|
|
63
67
|
}
|
|
64
68
|
|
|
65
|
-
|
|
66
69
|
.k-color-picker-opened {
|
|
67
|
-
border: 1px solid var(--kui-color-
|
|
68
|
-
box-shadow: 0 0 0 2px var(--kui-color-
|
|
70
|
+
border: 1px solid var(--kui-color-primary);
|
|
71
|
+
box-shadow: 0 0 0 2px var(--kui-color-primary-9);
|
|
69
72
|
|
|
70
73
|
.k-color-picker-arrow {
|
|
71
74
|
transform: rotate(180deg);
|
|
@@ -74,30 +77,20 @@
|
|
|
74
77
|
|
|
75
78
|
.k-color-picker-disabled {
|
|
76
79
|
cursor: not-allowed;
|
|
77
|
-
background: var(--kui-color-
|
|
78
|
-
border-color: var(--kui-color-
|
|
80
|
+
background: var(--kui-color-bg-component-disabled);
|
|
81
|
+
border-color: var(--kui-color-border-disabled);
|
|
79
82
|
|
|
80
83
|
* {
|
|
81
84
|
cursor: not-allowed;
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
.k-color-picker-color {
|
|
85
|
-
opacity: .5;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
&:hover {
|
|
89
|
-
border-color: var(--kui-color-disable-border);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&:active {
|
|
93
|
-
opacity: 1;
|
|
88
|
+
opacity: 0.5;
|
|
94
89
|
}
|
|
95
90
|
}
|
|
96
91
|
|
|
97
92
|
.k-color-picker-lg {
|
|
98
|
-
// width: 70px;
|
|
99
93
|
height: 40px;
|
|
100
|
-
// padding: 4px;
|
|
101
94
|
|
|
102
95
|
.k-color-picker-color {
|
|
103
96
|
width: 32px;
|
|
@@ -131,7 +124,6 @@
|
|
|
131
124
|
.k-color-picker-trigger-text {
|
|
132
125
|
font-size: 12px;
|
|
133
126
|
}
|
|
134
|
-
|
|
135
127
|
}
|
|
136
128
|
|
|
137
129
|
.k-color-picker-dropdown {
|
|
@@ -140,17 +132,14 @@
|
|
|
140
132
|
position: absolute;
|
|
141
133
|
z-index: 1001;
|
|
142
134
|
|
|
143
|
-
|
|
144
135
|
.k-color-picker-paint-dot {
|
|
145
136
|
width: 15px;
|
|
146
137
|
height: 15px;
|
|
147
138
|
display: block;
|
|
148
139
|
position: absolute;
|
|
149
140
|
box-sizing: border-box;
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
border: 2px solid var(--kui-color-back);
|
|
153
|
-
box-shadow: 0 0 0 px rgba(0, 0, 0, 0.2);
|
|
141
|
+
border: 2px solid var(--kui-color-bg);
|
|
142
|
+
box-shadow: 0 0 0 px var(--kui-color-shadow);
|
|
154
143
|
border-radius: 50%;
|
|
155
144
|
top: 10px;
|
|
156
145
|
left: 10px;
|
|
@@ -160,7 +149,7 @@
|
|
|
160
149
|
.k-color-picker-paint {
|
|
161
150
|
width: 234px;
|
|
162
151
|
height: 136px;
|
|
163
|
-
border-radius:
|
|
152
|
+
border-radius: var(--kui-border-radius);
|
|
164
153
|
}
|
|
165
154
|
|
|
166
155
|
.k-color-picker-bar {
|
|
@@ -172,17 +161,38 @@
|
|
|
172
161
|
width: 28px;
|
|
173
162
|
height: 28px;
|
|
174
163
|
border-radius: 6px;
|
|
164
|
+
overflow: hidden;
|
|
175
165
|
float: left;
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
166
|
+
position: relative;
|
|
167
|
+
&::before {
|
|
168
|
+
z-index: 0;
|
|
169
|
+
border-radius: 7px;
|
|
170
|
+
content: "";
|
|
171
|
+
position: absolute;
|
|
172
|
+
width: 100%;
|
|
173
|
+
height: 100%;
|
|
174
|
+
background-image:
|
|
175
|
+
linear-gradient(-45deg, #cdcdcd 25%, transparent 0),
|
|
176
|
+
linear-gradient(45deg, #cdcdcd 25%, transparent 0),
|
|
177
|
+
linear-gradient(-45deg, transparent 75%, #cdcdcd 0),
|
|
178
|
+
linear-gradient(45deg, transparent 75%, #cdcdcd 0);
|
|
179
|
+
background-size: 11px 11px;
|
|
180
|
+
background-position:
|
|
181
|
+
0 0,
|
|
182
|
+
0 -5.5px,
|
|
183
|
+
-5.5px 5.5px,
|
|
184
|
+
5.5px 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
179
187
|
box-shadow: inset 0 0 1px 0 rgba(255, 255, 255, 0.25);
|
|
180
188
|
|
|
181
189
|
.k-color-picker-avatar-inner {
|
|
190
|
+
// transform: scale(1.02);
|
|
182
191
|
border-radius: 6px;
|
|
183
192
|
width: 100%;
|
|
184
193
|
height: 100%;
|
|
185
|
-
|
|
194
|
+
position: relative;
|
|
195
|
+
z-index: 1;
|
|
186
196
|
box-sizing: border-box;
|
|
187
197
|
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
|
|
188
198
|
}
|
|
@@ -203,9 +213,17 @@
|
|
|
203
213
|
}
|
|
204
214
|
|
|
205
215
|
.k-color-picker-alpha {
|
|
206
|
-
background-image:
|
|
216
|
+
background-image:
|
|
217
|
+
linear-gradient(-45deg, #cdcdcd 25%, transparent 0),
|
|
218
|
+
linear-gradient(45deg, #cdcdcd 25%, transparent 0),
|
|
219
|
+
linear-gradient(-45deg, transparent 75%, #cdcdcd 0),
|
|
220
|
+
linear-gradient(45deg, transparent 75%, #cdcdcd 0);
|
|
207
221
|
background-size: 7px 7px;
|
|
208
|
-
background-position:
|
|
222
|
+
background-position:
|
|
223
|
+
0 0,
|
|
224
|
+
0 -4px,
|
|
225
|
+
-4px 4px,
|
|
226
|
+
4px 0;
|
|
209
227
|
border: 1px solid #a1a1a1;
|
|
210
228
|
box-sizing: border-box;
|
|
211
229
|
}
|
|
@@ -215,7 +233,7 @@
|
|
|
215
233
|
height: 12px;
|
|
216
234
|
display: block;
|
|
217
235
|
position: absolute;
|
|
218
|
-
border: 2px solid var(--kui-color-
|
|
236
|
+
border: 2px solid var(--kui-color-bg);
|
|
219
237
|
box-shadow: 0 0 0 1px rgb(0 0 0 / 7%);
|
|
220
238
|
border-radius: 50%;
|
|
221
239
|
pointer-events: none;
|
|
@@ -247,7 +265,7 @@
|
|
|
247
265
|
|
|
248
266
|
.k-select {
|
|
249
267
|
min-width: 0;
|
|
250
|
-
padding: 0;
|
|
268
|
+
padding: 0 5px;
|
|
251
269
|
|
|
252
270
|
.k-select-arrow {
|
|
253
271
|
margin: 0;
|
|
@@ -266,10 +284,6 @@
|
|
|
266
284
|
min-width: 0;
|
|
267
285
|
justify-content: space-around;
|
|
268
286
|
|
|
269
|
-
.k-input-number {
|
|
270
|
-
// flex: 0 0 44px;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
287
|
.k-color-picker-alpha-input {
|
|
274
288
|
max-width: 45px;
|
|
275
289
|
flex-shrink: 0;
|
|
@@ -287,7 +301,7 @@
|
|
|
287
301
|
flex-wrap: wrap;
|
|
288
302
|
gap: 6px;
|
|
289
303
|
|
|
290
|
-
>span {
|
|
304
|
+
> span {
|
|
291
305
|
display: inline-block;
|
|
292
306
|
width: 20px;
|
|
293
307
|
height: 20px;
|
|
@@ -326,14 +340,14 @@
|
|
|
326
340
|
display: flex;
|
|
327
341
|
width: 24px;
|
|
328
342
|
height: 9px;
|
|
329
|
-
color: var(--kui-color-
|
|
343
|
+
color: var(--kui-color-bg-pop);
|
|
330
344
|
}
|
|
331
345
|
|
|
332
346
|
.k-color-picker-body {
|
|
333
|
-
box-shadow:
|
|
347
|
+
box-shadow: var(--kui-pop-shadow);
|
|
334
348
|
border-radius: var(--kui-border-radius);
|
|
335
|
-
background: var(--kui-color-
|
|
336
|
-
border: 1px solid var(--kui-color-
|
|
349
|
+
background: var(--kui-color-bg-pop);
|
|
350
|
+
border: 1px solid var(--kui-color-pop-border);
|
|
337
351
|
padding: 10px;
|
|
338
352
|
box-sizing: border-box;
|
|
339
353
|
}
|
|
@@ -344,10 +358,10 @@
|
|
|
344
358
|
|
|
345
359
|
#ot {
|
|
346
360
|
stroke-width: 1px;
|
|
347
|
-
stroke: var(--kui-color-border);
|
|
361
|
+
stroke: var(--kui-color-pop-border);
|
|
348
362
|
}
|
|
349
363
|
|
|
350
|
-
&[k-placement^=top] {
|
|
364
|
+
&[k-placement^="top"] {
|
|
351
365
|
.k-color-picker-body {
|
|
352
366
|
margin-bottom: 10px;
|
|
353
367
|
}
|
|
@@ -358,8 +372,7 @@
|
|
|
358
372
|
}
|
|
359
373
|
}
|
|
360
374
|
|
|
361
|
-
|
|
362
|
-
&[k-placement^=bottom] {
|
|
375
|
+
&[k-placement^="bottom"] {
|
|
363
376
|
.k-color-picker-body {
|
|
364
377
|
margin-top: 10px;
|
|
365
378
|
}
|
|
@@ -371,28 +384,28 @@
|
|
|
371
384
|
}
|
|
372
385
|
}
|
|
373
386
|
|
|
374
|
-
&[k-placement=bottom-left],
|
|
375
|
-
&[k-placement=top-left] {
|
|
387
|
+
&[k-placement="bottom-left"],
|
|
388
|
+
&[k-placement="top-left"] {
|
|
376
389
|
.k-color-picker-arrow {
|
|
377
390
|
left: 6px;
|
|
378
391
|
}
|
|
379
392
|
}
|
|
380
393
|
|
|
381
|
-
&[k-placement=bottom-right],
|
|
382
|
-
&[k-placement=top-right] {
|
|
394
|
+
&[k-placement="bottom-right"],
|
|
395
|
+
&[k-placement="top-right"] {
|
|
383
396
|
.k-color-picker-arrow {
|
|
384
397
|
right: 6px;
|
|
385
398
|
}
|
|
386
399
|
}
|
|
387
400
|
|
|
388
|
-
&[k-placement=bottom] {
|
|
401
|
+
&[k-placement="bottom"] {
|
|
389
402
|
.k-color-picker-arrow {
|
|
390
403
|
left: 50%;
|
|
391
404
|
transform: translateX(-50%) rotate(180deg);
|
|
392
405
|
}
|
|
393
406
|
}
|
|
394
407
|
|
|
395
|
-
&[k-placement=top] {
|
|
408
|
+
&[k-placement="top"] {
|
|
396
409
|
.k-color-picker-arrow {
|
|
397
410
|
left: 50%;
|
|
398
411
|
transform: translateX(-50%);
|
|
@@ -411,28 +424,27 @@
|
|
|
411
424
|
@keyframes k-picker-zoom {
|
|
412
425
|
0% {
|
|
413
426
|
opacity: 0;
|
|
414
|
-
transform: scale(0.8)
|
|
427
|
+
transform: scale(0.8);
|
|
415
428
|
}
|
|
416
429
|
|
|
417
430
|
to {
|
|
418
431
|
opacity: 1;
|
|
419
|
-
transform: scale(1)
|
|
432
|
+
transform: scale(1);
|
|
420
433
|
}
|
|
421
434
|
}
|
|
422
435
|
|
|
423
436
|
.k-color-picker-enter-active {
|
|
424
437
|
transform-origin: 0 0;
|
|
425
|
-
animation: k-picker-zoom .2s;
|
|
438
|
+
animation: k-picker-zoom 0.2s;
|
|
426
439
|
}
|
|
427
440
|
|
|
428
441
|
.k-color-picker-leave-active {
|
|
429
442
|
transform-origin: 0 0;
|
|
430
|
-
animation: k-picker-zoom .2s reverse;
|
|
443
|
+
animation: k-picker-zoom 0.2s reverse;
|
|
431
444
|
}
|
|
432
445
|
|
|
433
|
-
|
|
434
446
|
.k-color-picker-disabled-alpha {
|
|
435
447
|
.k-color-picker-bar-box {
|
|
436
448
|
justify-content: center;
|
|
437
449
|
}
|
|
438
|
-
}
|
|
450
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
let __appContext = null;
|
|
2
|
+
let __mouse__point = null;
|
|
3
|
+
export function setAppContext(app) {
|
|
4
|
+
__appContext = app;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function getAppContext() {
|
|
8
|
+
return __appContext;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function recordMousePoint() {
|
|
12
|
+
if (typeof window !== "undefined") {
|
|
13
|
+
document.addEventListener("mousedown", (e) => {
|
|
14
|
+
__mouse__point = { x: e.clientX, y: e.clientY };
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function getMousePoint() {
|
|
20
|
+
return __mouse__point || { x: 0, y: 0 };
|
|
21
|
+
}
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { withInstall } from "../utils/vue";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
defineComponent,
|
|
4
|
+
provide,
|
|
5
|
+
ref,
|
|
6
|
+
watch,
|
|
7
|
+
getCurrentInstance,
|
|
8
|
+
} from "vue";
|
|
9
|
+
import { setAppContext } from "./context";
|
|
3
10
|
const ConfigProvider = defineComponent({
|
|
4
11
|
name: "ConfigProvider",
|
|
5
12
|
props: {
|
|
@@ -15,7 +22,8 @@ const ConfigProvider = defineComponent({
|
|
|
15
22
|
setup(props, { slots }) {
|
|
16
23
|
const locale = ref(props.locale);
|
|
17
24
|
provide("locale", locale);
|
|
18
|
-
|
|
25
|
+
const context = getCurrentInstance();
|
|
26
|
+
setAppContext(context);
|
|
19
27
|
// for 2
|
|
20
28
|
watch(
|
|
21
29
|
() => props.locale,
|
|
@@ -3,10 +3,8 @@ import {
|
|
|
3
3
|
ref,
|
|
4
4
|
watch,
|
|
5
5
|
inject,
|
|
6
|
-
onMounted,
|
|
7
6
|
computed,
|
|
8
7
|
onUnmounted,
|
|
9
|
-
reactive,
|
|
10
8
|
nextTick,
|
|
11
9
|
} from "vue";
|
|
12
10
|
import dayjs from "dayjs";
|
|
@@ -77,7 +75,7 @@ const DatePicker = defineComponent({
|
|
|
77
75
|
size: { type: String, default: "default" },
|
|
78
76
|
pickerSize: { type: String, default: "default" },
|
|
79
77
|
dateIcon: { type: [Array, Object] },
|
|
80
|
-
theme: String,
|
|
78
|
+
theme: { type: String, default: "light" },
|
|
81
79
|
shape: String,
|
|
82
80
|
bordered: { type: Boolean, default: true },
|
|
83
81
|
placement: {
|
|
@@ -113,7 +111,6 @@ const DatePicker = defineComponent({
|
|
|
113
111
|
return locale.value.name || "zh-cn";
|
|
114
112
|
});
|
|
115
113
|
|
|
116
|
-
// --- 状态定义 ---
|
|
117
114
|
const isVisible = ref(false);
|
|
118
115
|
const isFocus = ref(false);
|
|
119
116
|
const rendered = ref(false);
|
|
@@ -123,9 +120,7 @@ const DatePicker = defineComponent({
|
|
|
123
120
|
const transOrigin = ref("bottom");
|
|
124
121
|
const refPopper = ref(null);
|
|
125
122
|
const refSelection = ref(null);
|
|
126
|
-
// console.log(local);
|
|
127
123
|
|
|
128
|
-
// DOM 引用,用于滚动计算
|
|
129
124
|
const timeColRefs = ref({});
|
|
130
125
|
|
|
131
126
|
// 面板显示的基准日期
|
|
@@ -1075,7 +1070,11 @@ const DatePicker = defineComponent({
|
|
|
1075
1070
|
) : null;
|
|
1076
1071
|
|
|
1077
1072
|
return (
|
|
1078
|
-
<div
|
|
1073
|
+
<div
|
|
1074
|
+
class={classes}
|
|
1075
|
+
ref={refSelection}
|
|
1076
|
+
tabindex={props.disabled ? null : 0}
|
|
1077
|
+
>
|
|
1079
1078
|
<div class={selectCls} onClick={togglePanel}>
|
|
1080
1079
|
{renderInput()}
|
|
1081
1080
|
<Icon type={dateIcon} class="k-icon-calendar" />
|