view-ui-plus-derive 0.0.3 → 0.1.1
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 +15 -9
- package/dist/index.d.ts +8 -14
- package/dist/index.js +882 -896
- package/dist/styles/PageTable.css +1 -1
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.d.ts +18 -1
- package/dist/umd/index.js +1 -1
- package/package.json +32 -34
package/README.md
CHANGED
|
@@ -36,12 +36,12 @@ yarn add view-ui-plus-derive
|
|
|
36
36
|
import { createApp } from 'vue'
|
|
37
37
|
import ViewUIPlus from 'view-ui-plus'
|
|
38
38
|
import 'view-ui-plus/dist/styles/viewuiplus.css'
|
|
39
|
-
import
|
|
39
|
+
import iviewDerive from 'view-ui-plus-derive' // 包含所有组件与指令
|
|
40
40
|
import 'view-ui-plus-derive/style' // 引入所有组件样式
|
|
41
41
|
|
|
42
42
|
import App from './App.vue'
|
|
43
43
|
|
|
44
|
-
createApp(App).use(ViewUIPlus).use(
|
|
44
|
+
createApp(App).use(ViewUIPlus).use(iviewDerive).mount('#app')
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
### 按需引入
|
|
@@ -71,14 +71,14 @@ createApp(App).use(ViewUIPlus).component(Combi.name, Combi).mount('#app')
|
|
|
71
71
|
import { createApp } from 'vue'
|
|
72
72
|
import ViewUIPlus from 'view-ui-plus'
|
|
73
73
|
import 'view-ui-plus/dist/styles/viewuiplus.css'
|
|
74
|
-
import
|
|
74
|
+
import iviewDerive from 'view-ui-plus-derive'
|
|
75
75
|
import enUS from 'view-ui-plus-derive/locale/en-US'
|
|
76
76
|
|
|
77
77
|
import App from './App.vue'
|
|
78
78
|
|
|
79
79
|
createApp(App)
|
|
80
80
|
.use(ViewUIPlus)
|
|
81
|
-
.use(
|
|
81
|
+
.use(iviewDerive, {
|
|
82
82
|
msg: enUS
|
|
83
83
|
})
|
|
84
84
|
.mount('#app')
|
|
@@ -90,13 +90,13 @@ createApp(App)
|
|
|
90
90
|
import { createApp } from 'vue'
|
|
91
91
|
import ViewUIPlus from 'view-ui-plus'
|
|
92
92
|
import 'view-ui-plus/dist/styles/viewuiplus.css'
|
|
93
|
-
import
|
|
93
|
+
import iviewDerive from 'view-ui-plus-derive'
|
|
94
94
|
|
|
95
95
|
import App from './App.vue'
|
|
96
96
|
|
|
97
97
|
createApp(App)
|
|
98
98
|
.use(ViewUIPlus)
|
|
99
|
-
.use(
|
|
99
|
+
.use(iviewDerive, {
|
|
100
100
|
msg: {
|
|
101
101
|
d: {
|
|
102
102
|
lang: 'zh-Hant',
|
|
@@ -150,7 +150,7 @@ import ViewUIPlus from 'view-ui-plus'
|
|
|
150
150
|
import zh from 'view-ui-plus/dist/locale/zh-CN'
|
|
151
151
|
import en from 'view-ui-plus/dist/locale/en-US'
|
|
152
152
|
import 'view-ui-plus/dist/styles/viewuiplus.css'
|
|
153
|
-
import
|
|
153
|
+
import iviewDerive from 'view-ui-plus-derive'
|
|
154
154
|
import zhCN from 'view-ui-plus-derive/locale/zh-CN'
|
|
155
155
|
import enUS from 'view-ui-plus-derive/locale/en-US'
|
|
156
156
|
|
|
@@ -183,7 +183,7 @@ const i18n = createI18n({
|
|
|
183
183
|
createApp(App)
|
|
184
184
|
.use(i18n)
|
|
185
185
|
.use(ViewUIPlus)
|
|
186
|
-
.use(
|
|
186
|
+
.use(iviewDerive, {
|
|
187
187
|
i18n
|
|
188
188
|
// msgPrefix: 'someKey' // 该值仅针对使用vue-i18n的情况生效
|
|
189
189
|
})
|
|
@@ -1713,7 +1713,7 @@ emit('load', res)
|
|
|
1713
1713
|
* 勾选项变更后触发
|
|
1714
1714
|
* @param selections 勾选项
|
|
1715
1715
|
*/
|
|
1716
|
-
emit('
|
|
1716
|
+
emit('selection-change', selections)
|
|
1717
1717
|
|
|
1718
1718
|
/**
|
|
1719
1719
|
* 更改全选框后触发
|
|
@@ -1733,6 +1733,12 @@ emit('select', row, checked)
|
|
|
1733
1733
|
* @param checked 切换的列
|
|
1734
1734
|
*/
|
|
1735
1735
|
emit('change-col', checked)
|
|
1736
|
+
|
|
1737
|
+
/**
|
|
1738
|
+
* 切换最大化后触发
|
|
1739
|
+
* @param maximized 是否最大化
|
|
1740
|
+
*/
|
|
1741
|
+
emit('maximize-change', maximized)
|
|
1736
1742
|
```
|
|
1737
1743
|
|
|
1738
1744
|
**slots**
|
package/dist/index.d.ts
CHANGED
|
@@ -324,7 +324,6 @@ autoGet: boolean;
|
|
|
324
324
|
textMode: boolean;
|
|
325
325
|
cache: boolean;
|
|
326
326
|
strict: boolean;
|
|
327
|
-
check: Function;
|
|
328
327
|
getSelected: Function;
|
|
329
328
|
}> & Omit<{
|
|
330
329
|
readonly all: boolean;
|
|
@@ -337,7 +336,6 @@ readonly autoGet: boolean;
|
|
|
337
336
|
readonly textMode: boolean;
|
|
338
337
|
readonly cache: boolean;
|
|
339
338
|
readonly strict: boolean;
|
|
340
|
-
readonly check: Function;
|
|
341
339
|
readonly getSelected: Function;
|
|
342
340
|
readonly list?: Obj[] | undefined;
|
|
343
341
|
readonly modelValue?: SelectValue | undefined;
|
|
@@ -351,13 +349,14 @@ readonly optionTag?: Function | undefined;
|
|
|
351
349
|
readonly loader?: Function | undefined;
|
|
352
350
|
readonly chosen?: Record<string, any> | unknown[] | undefined;
|
|
353
351
|
readonly formatLabel?: Function | undefined;
|
|
352
|
+
readonly check?: Function | undefined;
|
|
354
353
|
readonly parentCode?: string | number | unknown[] | undefined;
|
|
355
354
|
readonly "onUpdate:modelValue"?: ((val: SelectValue) => any) | undefined;
|
|
356
355
|
readonly "onUpdate:chosen"?: ((item: Obj) => any) | undefined;
|
|
357
356
|
readonly "onUpdate:list"?: ((list: Obj[]) => any) | undefined;
|
|
358
357
|
readonly "onUpdate:refresh"?: ((handle: () => Promise<void>) => any) | undefined;
|
|
359
358
|
readonly onLoad?: ((val: any) => any) | undefined;
|
|
360
|
-
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "all" | "multiple" | "valueKey" | "labelKey" | "keyMap" | "valueAsKey" | "autoGet" | "textMode" | "cache" | "strict" | "
|
|
359
|
+
} & VNodeProps & AllowedComponentProps & ComponentCustomProps, "all" | "multiple" | "valueKey" | "labelKey" | "keyMap" | "valueAsKey" | "autoGet" | "textMode" | "cache" | "strict" | "getSelected">;
|
|
361
360
|
$attrs: {
|
|
362
361
|
[x: string]: unknown;
|
|
363
362
|
};
|
|
@@ -403,7 +402,6 @@ type: FunctionConstructor;
|
|
|
403
402
|
};
|
|
404
403
|
check: {
|
|
405
404
|
type: FunctionConstructor;
|
|
406
|
-
default: () => boolean;
|
|
407
405
|
};
|
|
408
406
|
textMode: BooleanConstructor;
|
|
409
407
|
textFormat: FunctionConstructor;
|
|
@@ -457,7 +455,6 @@ autoGet: boolean;
|
|
|
457
455
|
textMode: boolean;
|
|
458
456
|
cache: boolean;
|
|
459
457
|
strict: boolean;
|
|
460
|
-
check: Function;
|
|
461
458
|
getSelected: Function;
|
|
462
459
|
}, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & {
|
|
463
460
|
beforeCreate?: (() => void) | (() => void)[];
|
|
@@ -490,7 +487,6 @@ autoGet: boolean;
|
|
|
490
487
|
textMode: boolean;
|
|
491
488
|
cache: boolean;
|
|
492
489
|
strict: boolean;
|
|
493
|
-
check: Function;
|
|
494
490
|
getSelected: Function;
|
|
495
491
|
}> & Omit<Readonly<ExtractPropTypes< {
|
|
496
492
|
modelValue: PropType<SelectValue>;
|
|
@@ -523,7 +519,6 @@ type: FunctionConstructor;
|
|
|
523
519
|
};
|
|
524
520
|
check: {
|
|
525
521
|
type: FunctionConstructor;
|
|
526
|
-
default: () => boolean;
|
|
527
522
|
};
|
|
528
523
|
textMode: BooleanConstructor;
|
|
529
524
|
textFormat: FunctionConstructor;
|
|
@@ -554,7 +549,7 @@ default: boolean;
|
|
|
554
549
|
"onUpdate:list"?: ((list: Obj[]) => any) | undefined;
|
|
555
550
|
"onUpdate:refresh"?: ((handle: () => Promise<void>) => any) | undefined;
|
|
556
551
|
onLoad?: ((val: any) => any) | undefined;
|
|
557
|
-
}>, "code" | "search" | "changeCode" | "loaded" | "codes" | ("all" | "multiple" | "valueKey" | "labelKey" | "keyMap" | "valueAsKey" | "autoGet" | "textMode" | "cache" | "strict" | "
|
|
552
|
+
}>, "code" | "search" | "changeCode" | "loaded" | "codes" | ("all" | "multiple" | "valueKey" | "labelKey" | "keyMap" | "valueAsKey" | "autoGet" | "textMode" | "cache" | "strict" | "getSelected")> & ShallowUnwrapRef< {
|
|
558
553
|
code: Ref<SelectValue, SelectValue>;
|
|
559
554
|
changeCode: (val: SelectValue) => void;
|
|
560
555
|
loaded: Ref<boolean, boolean>;
|
|
@@ -1967,7 +1962,7 @@ search: (stay?: boolean) => void;
|
|
|
1967
1962
|
setMaxHeight: () => void;
|
|
1968
1963
|
table: {
|
|
1969
1964
|
data: Obj[];
|
|
1970
|
-
maxHeight:
|
|
1965
|
+
maxHeight: string | number | undefined;
|
|
1971
1966
|
selectType: {
|
|
1972
1967
|
align: string;
|
|
1973
1968
|
className: string;
|
|
@@ -1986,9 +1981,10 @@ load: (res: any) => any;
|
|
|
1986
1981
|
"update:loading": (value: boolean | undefined) => any;
|
|
1987
1982
|
"update:selection": (val: Obj[]) => any;
|
|
1988
1983
|
"select-all": (val: Obj[], args_1: boolean) => any;
|
|
1989
|
-
"
|
|
1984
|
+
"selection-change": (val: Obj[]) => any;
|
|
1990
1985
|
reload: () => any;
|
|
1991
1986
|
"change-col": (val: Obj | Obj[]) => any;
|
|
1987
|
+
"maximize-change": (val: boolean) => any;
|
|
1992
1988
|
}, string, PublicProps, Readonly<ExtractPropTypes< {
|
|
1993
1989
|
columns: {
|
|
1994
1990
|
type: PropType<Obj[]>;
|
|
@@ -2143,9 +2139,10 @@ onLoad?: ((res: any) => any) | undefined;
|
|
|
2143
2139
|
"onUpdate:loading"?: ((value: boolean | undefined) => any) | undefined;
|
|
2144
2140
|
"onUpdate:selection"?: ((val: Obj[]) => any) | undefined;
|
|
2145
2141
|
"onSelect-all"?: ((val: Obj[], args_1: boolean) => any) | undefined;
|
|
2146
|
-
"
|
|
2142
|
+
"onSelection-change"?: ((val: Obj[]) => any) | undefined;
|
|
2147
2143
|
onReload?: (() => any) | undefined;
|
|
2148
2144
|
"onChange-col"?: ((val: Obj | Obj[]) => any) | undefined;
|
|
2145
|
+
"onMaximize-change"?: ((val: boolean) => any) | undefined;
|
|
2149
2146
|
}>, {
|
|
2150
2147
|
transfer: boolean;
|
|
2151
2148
|
modelValue: Obj[];
|
|
@@ -2215,7 +2212,6 @@ type: FunctionConstructor;
|
|
|
2215
2212
|
*/
|
|
2216
2213
|
check: {
|
|
2217
2214
|
type: FunctionConstructor;
|
|
2218
|
-
default: () => boolean;
|
|
2219
2215
|
};
|
|
2220
2216
|
textMode: BooleanConstructor;
|
|
2221
2217
|
textFormat: FunctionConstructor;
|
|
@@ -2308,7 +2304,6 @@ type: FunctionConstructor;
|
|
|
2308
2304
|
*/
|
|
2309
2305
|
check: {
|
|
2310
2306
|
type: FunctionConstructor;
|
|
2311
|
-
default: () => boolean;
|
|
2312
2307
|
};
|
|
2313
2308
|
textMode: BooleanConstructor;
|
|
2314
2309
|
textFormat: FunctionConstructor;
|
|
@@ -2363,7 +2358,6 @@ autoGet: boolean;
|
|
|
2363
2358
|
textMode: boolean;
|
|
2364
2359
|
cache: boolean;
|
|
2365
2360
|
strict: boolean;
|
|
2366
|
-
check: Function;
|
|
2367
2361
|
getSelected: Function;
|
|
2368
2362
|
}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>, Readonly<{
|
|
2369
2363
|
default(_: {
|