@king-design/vue 3.3.1 → 3.3.3
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/__tests__/__snapshots__/Vue Next Demos.md +166 -154
- package/__tests__/components/upload.spec.ts +1 -1
- package/components/button/group.d.ts +1 -0
- package/components/button/group.js +2 -1
- package/components/button/index.d.ts +1 -0
- package/components/button/index.js +1 -0
- package/components/button/index.vdt.js +15 -9
- package/components/button/styles.d.ts +1 -1
- package/components/button/styles.js +3 -3
- package/components/checkbox/index.vdt.js +2 -4
- package/components/dialog/alert.vdt.js +2 -2
- package/components/input/index.vdt.js +2 -4
- package/components/radio/index.vdt.js +2 -4
- package/components/select/base.vdt.js +2 -4
- package/components/switch/index.d.ts +3 -1
- package/components/switch/index.js +65 -13
- package/components/switch/index.spec.js +21 -0
- package/components/switch/index.vdt.js +14 -4
- package/components/switch/styles.js +12 -7
- package/components/table/cell.vdt.js +3 -1
- package/components/table/column.d.ts +1 -0
- package/components/table/column.js +1 -0
- package/components/table/column.vdt.js +3 -2
- package/components/table/styles.js +1 -1
- package/components/table/table.vdt.js +1 -1
- package/components/table/useColumns.js +1 -1
- package/components/utils.js +17 -0
- package/components/wave/index.js +2 -0
- package/i18n/en-US.js +6 -2
- package/index.d.ts +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
- package/yarn-error.log +1012 -0
package/components/utils.js
CHANGED
|
@@ -263,7 +263,24 @@ export function strPad(str, length, pad) {
|
|
|
263
263
|
}
|
|
264
264
|
return str;
|
|
265
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* 在vue3.0中,数组会转成Proxy对象,需要获取原始数据比较
|
|
268
|
+
* https://github.com/ksc-fe/kpc/issues/985
|
|
269
|
+
* https://github.com/vuejs/core/blob/main/packages/reactivity/src/reactive.ts
|
|
270
|
+
*/
|
|
271
|
+
var RAW = '__v_raw';
|
|
272
|
+
function isProxy(value) {
|
|
273
|
+
return value ? !!value[RAW] : false;
|
|
274
|
+
}
|
|
275
|
+
function toRaw(observed) {
|
|
276
|
+
var raw = observed && observed[RAW];
|
|
277
|
+
return raw ? toRaw(raw) : observed;
|
|
278
|
+
}
|
|
266
279
|
export function isEqualArray(a, b) {
|
|
280
|
+
if (a === b) return true;
|
|
281
|
+
// for vue3.0 Proxy object
|
|
282
|
+
if (isProxy(a)) a = toRaw(a);
|
|
283
|
+
if (isProxy(b)) b = toRaw(b);
|
|
267
284
|
if (a === b) return true;
|
|
268
285
|
if (Array.isArray(a) && Array.isArray(b)) {
|
|
269
286
|
if (a.length !== b.length) return false;
|
package/components/wave/index.js
CHANGED
|
@@ -62,6 +62,8 @@ export var Wave = /*#__PURE__*/function (_Component) {
|
|
|
62
62
|
var _this$get2 = this.get(),
|
|
63
63
|
disabled = _this$get2.disabled;
|
|
64
64
|
var node = e.target;
|
|
65
|
+
// configProvider全局禁用动效
|
|
66
|
+
if (this.config.disableWave) return;
|
|
65
67
|
// 点击输入框中的icon时,此时输入框不需要动效
|
|
66
68
|
var isInput = instance.classList.contains('k-input-wrapper');
|
|
67
69
|
if (disabled || isInput && node.classList.contains(this.config.cls('icon'))) return;
|
package/i18n/en-US.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _globalThis from "@babel/runtime-corejs3/core-js/global-this";
|
|
1
2
|
var i18n = {
|
|
2
3
|
// datepicker
|
|
3
4
|
'yearMonthFormat': 'MM YYYY',
|
|
@@ -107,6 +108,9 @@ var i18n = {
|
|
|
107
108
|
'复制': 'Copy'
|
|
108
109
|
};
|
|
109
110
|
export default i18n;
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
/**
|
|
112
|
+
* global does not exist in Vite, use standard object globalThis
|
|
113
|
+
*/
|
|
114
|
+
if (typeof _globalThis.Kpc !== 'undefined') {
|
|
115
|
+
_globalThis.Kpc.localize(i18n);
|
|
112
116
|
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.3.
|
|
2
|
+
* @king-design v3.3.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -63,7 +63,7 @@ export * from './components/treeSelect';
|
|
|
63
63
|
export * from './components/upload';
|
|
64
64
|
export * from './components/view';
|
|
65
65
|
export * from './components/wave';
|
|
66
|
-
export declare const version = "3.3.
|
|
66
|
+
export declare const version = "3.3.3";
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
export {normalize} from 'intact-vue-next';
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.3.
|
|
2
|
+
* @king-design v3.3.3
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -64,7 +64,7 @@ export * from './components/treeSelect';
|
|
|
64
64
|
export * from './components/upload';
|
|
65
65
|
export * from './components/view';
|
|
66
66
|
export * from './components/wave';
|
|
67
|
-
export var version = '3.3.
|
|
67
|
+
export var version = '3.3.3';
|
|
68
68
|
/* generate end */
|
|
69
69
|
|
|
70
70
|
export {normalize} from 'intact-vue-next';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/vue",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "King-Design UI components for Vue3.0.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@emotion/css": "^11.5.0",
|
|
38
38
|
"dayjs": "^1.10.7",
|
|
39
39
|
"enquire.js": "^2.1.6",
|
|
40
|
-
"intact-vue-next": "3.0.
|
|
40
|
+
"intact-vue-next": "3.0.35",
|
|
41
41
|
"monaco-editor": "^0.26.1",
|
|
42
42
|
"mxgraphx": "^4.0.7",
|
|
43
43
|
"resize-observer-polyfill": "^1.5.1",
|