kui-vue 3.3.8 → 3.3.10
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/base/input.jsx +1 -1
- package/components/card/card.jsx +1 -1
- package/components/card/styles/index.less +1 -1
- package/components/checkbox/styles/index.less +1 -1
- package/components/datePicker/datepicker.jsx +21 -2
- package/components/datePicker/styles/datepicker.less +1 -1
- package/components/drawer/index.md +1 -1
- package/components/form/styles/index.less +4 -4
- package/components/input/styles/index.less +2 -2
- package/components/inputNumber/styles/index.less +1 -2
- package/components/radio/styles/index.less +1 -1
- package/components/select/styles/index.less +1 -1
- package/components/table/styles/index.less +1 -1
- package/components/table/table.jsx +8 -1
- package/components/upload/styles/index.less +1 -0
- package/dist/k-ui.css +2 -2
- package/dist/k-ui.js +2 -2
- package/package.json +1 -1
package/components/card/card.jsx
CHANGED
|
@@ -12,7 +12,7 @@ export default {
|
|
|
12
12
|
['k-card-bordered']: bordered
|
|
13
13
|
}]
|
|
14
14
|
const extra = $slots.extra ? <div class="k-card-extra">{$slots.extra}</div> : null
|
|
15
|
-
const iconNode = icon ? <Icon type={icon} /> : null
|
|
15
|
+
const iconNode = icon ? <Icon type={icon} class="k-card-title-icon" /> : null
|
|
16
16
|
const titleNode = title ? <span class="k-card-title">{title}</span> : $slots.title || null
|
|
17
17
|
return (
|
|
18
18
|
<div class={classes}>
|
|
@@ -99,10 +99,12 @@ export default {
|
|
|
99
99
|
let { currentValue, isRange } = this
|
|
100
100
|
if (isRange) {
|
|
101
101
|
let [a, b] = currentValue || []
|
|
102
|
-
this.d1 = a ? dayjs(a) : dayjs()
|
|
102
|
+
this.d1 = a ? dayjs(a) : dayjs()
|
|
103
|
+
this.d2 = b ? dayjs(b) : dayjs().add(1, 'month')
|
|
103
104
|
if (this.d1.isSame(this.d2, 'month')) {
|
|
104
105
|
this.d2 = this.d1.add(1, 'month')
|
|
105
106
|
}
|
|
107
|
+
// this.currentValue = [dayjs(this.d1), dayjs(this.d2)]
|
|
106
108
|
} else {
|
|
107
109
|
this.d1 = currentValue ? dayjs(currentValue) : dayjs()
|
|
108
110
|
}
|
|
@@ -138,6 +140,7 @@ export default {
|
|
|
138
140
|
}
|
|
139
141
|
},
|
|
140
142
|
picker1Update(value, type) {
|
|
143
|
+
console.log(type)
|
|
141
144
|
let { isRange, format, fmt, mode } = this
|
|
142
145
|
if (!isRange) {
|
|
143
146
|
if (!type) {
|
|
@@ -159,7 +162,7 @@ export default {
|
|
|
159
162
|
|
|
160
163
|
} else {
|
|
161
164
|
let { v1, v2, withTime } = this
|
|
162
|
-
if (!type) {
|
|
165
|
+
if (!type) { //for day
|
|
163
166
|
this.d1 = dayjs(value)
|
|
164
167
|
if (!v1 && !v2) {
|
|
165
168
|
this.v1 = dayjs(value)
|
|
@@ -172,22 +175,32 @@ export default {
|
|
|
172
175
|
let dateStr = [v1.format(ft), this.v2.format(ft)]
|
|
173
176
|
// console.log(dateStr)
|
|
174
177
|
// return
|
|
178
|
+
|
|
175
179
|
this.$emit('input', dateStr)
|
|
176
180
|
this.$emit('change', this.currentValue, dateStr)
|
|
177
181
|
this.updateCalendDate()
|
|
178
182
|
if (!withTime) {
|
|
179
183
|
this.opened = false
|
|
180
184
|
}
|
|
185
|
+
console.log('22')
|
|
181
186
|
} else if (v1 && v2) {
|
|
187
|
+
console.log('333')
|
|
182
188
|
this.v1 = dayjs(value)
|
|
183
189
|
this.v2 = null
|
|
184
190
|
this.currentValue = [dayjs(value),]
|
|
185
191
|
}
|
|
186
192
|
} else {
|
|
193
|
+
console.log('11')
|
|
187
194
|
this.v1 = (this.v1 || dayjs())[type](value)
|
|
188
195
|
|
|
189
196
|
this.currentValue = [this.v1, v2]
|
|
190
197
|
this.d1 = this.d1[type](value)
|
|
198
|
+
|
|
199
|
+
let ft = format || fmt[mode]
|
|
200
|
+
let dateStr = [v1.format(ft), this.v2.format(ft)]
|
|
201
|
+
this.$emit('input', dateStr)
|
|
202
|
+
this.$emit('change', this.currentValue, dateStr)
|
|
203
|
+
this.updateCalendDate()
|
|
191
204
|
}
|
|
192
205
|
if (this.d1.isSame(this.d2, 'month') || this.d1.isAfter(this.d2, 'month')) {
|
|
193
206
|
this.d2 = this.d1.add(1, 'month')
|
|
@@ -230,6 +243,12 @@ export default {
|
|
|
230
243
|
this.currentValue = [v1, this.v2]
|
|
231
244
|
this.d2 = this.d2[type](value)
|
|
232
245
|
}
|
|
246
|
+
|
|
247
|
+
let ft = format || fmt[mode]
|
|
248
|
+
let dateStr = [v1.format(ft), this.v2.format(ft)]
|
|
249
|
+
this.$emit('input', dateStr)
|
|
250
|
+
this.$emit('change', this.currentValue, dateStr)
|
|
251
|
+
this.updateCalendDate()
|
|
233
252
|
}
|
|
234
253
|
if (this.d2.isSame(this.d1, 'month') || this.d2.isBefore(this.d1, 'month')) {
|
|
235
254
|
this.d1 = this.d2.subtract(1, 'month')
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
.k-datepicker:focus,
|
|
145
145
|
.k-datepicker-open {
|
|
146
146
|
border-color: var(--kui-color-main);
|
|
147
|
-
box-shadow: 0 0
|
|
147
|
+
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
148
148
|
|
|
149
149
|
&.k-datepicker-light {
|
|
150
150
|
border-color: transparent;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| footer | 页脚内容,不显示页脚设置`footer=null`即可 | slot | true |
|
|
9
9
|
| closable | 是否显示关闭按钮 | Boolean | true |
|
|
10
10
|
| target | 展示的父元素 | Function | - |
|
|
11
|
-
|
|
|
11
|
+
| mask-closable | 点击蒙层是否允许关闭 | Boolean | true |
|
|
12
12
|
| okText | 确定按钮文字 | String | 确定 |
|
|
13
13
|
| cancelText | 取消按钮文字 | String | 取消 |
|
|
14
14
|
| ok | 点击确定的回调 | Function | - |
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
.k-form-item-error {
|
|
79
79
|
.k-input[mult].k-input-focus {
|
|
80
80
|
border-color: var(--kui-color-danger);
|
|
81
|
-
box-shadow: 0 0
|
|
81
|
+
box-shadow: 0 0 0 2px var(--kui-color-danger-90);
|
|
82
82
|
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
&:hover,
|
|
93
93
|
&:focus {
|
|
94
94
|
border-color: var(--kui-color-danger);
|
|
95
|
-
box-shadow: 0 0
|
|
95
|
+
box-shadow: 0 0 0 2px var(--kui-color-danger-90);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
98
|
|
|
@@ -111,11 +111,11 @@
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
.k-select-open .k-select-selection {
|
|
114
|
-
box-shadow: 0 0
|
|
114
|
+
box-shadow: 0 0 0 2px var(--kui-color-danger-90);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
.k-datepicker-open {
|
|
118
|
-
box-shadow: 0 0
|
|
118
|
+
box-shadow: 0 0 0 2px var(--kui-color-danger-90);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
&.k-input-focus {
|
|
57
57
|
border-color: var(--kui-color-main);
|
|
58
|
-
box-shadow: 0 0
|
|
58
|
+
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
.k-input-suffix,
|
|
@@ -105,7 +105,7 @@
|
|
|
105
105
|
flex-shrink: 0;
|
|
106
106
|
&:focus {
|
|
107
107
|
// box-shadow: 0 0 5px rgba(59, 180, 242, 0.55);
|
|
108
|
-
box-shadow: 0 0
|
|
108
|
+
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
109
109
|
border-color: var(--kui-color-main);
|
|
110
110
|
outline: none;
|
|
111
111
|
}
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
&:focus {
|
|
84
|
-
// box-shadow: 0 0 5px var(--kui-color-main-30);
|
|
85
84
|
// border-color: var(--kui-color-main);
|
|
86
85
|
outline: none;
|
|
87
86
|
}
|
|
@@ -89,7 +88,7 @@
|
|
|
89
88
|
|
|
90
89
|
&.k-input-number-focus {
|
|
91
90
|
border-color: var(--kui-color-main);
|
|
92
|
-
box-shadow: 0 0
|
|
91
|
+
box-shadow: 0 0 0 2px var(--kui-color-main-90);
|
|
93
92
|
}
|
|
94
93
|
|
|
95
94
|
.k-input-number-suffix,
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
[c.className]: c.className
|
|
92
92
|
}],
|
|
93
93
|
attrs: {
|
|
94
|
-
title: c.ellipsis ? d[c.key] : null
|
|
94
|
+
title: c.ellipsis ? this.toString(d[c.key]) : null
|
|
95
95
|
},
|
|
96
96
|
style: {}
|
|
97
97
|
}
|
|
@@ -217,6 +217,13 @@ export default {
|
|
|
217
217
|
},
|
|
218
218
|
|
|
219
219
|
methods: {
|
|
220
|
+
toString(obj) {
|
|
221
|
+
if (typeof obj === 'object' && obj !== null) {
|
|
222
|
+
return JSON.stringify(obj);
|
|
223
|
+
} else {
|
|
224
|
+
return String(obj);
|
|
225
|
+
}
|
|
226
|
+
},
|
|
220
227
|
sorter(item) {
|
|
221
228
|
let { key, _order } = item
|
|
222
229
|
this.$emit('change', this.filters, { key, order: _order })
|