@vunk/plus 1.1.1 → 1.1.2
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/tables-v1-checkbox/index.mjs +29 -11
- package/components/tables-v1-checkbox/src/ctx.d.ts +17 -1
- package/components/tables-v1-checkbox/src/index.vue.d.ts +18 -1
- package/composables/el-breakpoints/index.d.ts +18 -0
- package/composables/el-breakpoints/index.mjs +19 -0
- package/composables/index.d.ts +0 -18
- package/composables/index.mjs +0 -18
- package/package.json +5 -1
|
@@ -3950,6 +3950,20 @@ const props = {
|
|
|
3950
3950
|
checkTrigger: {
|
|
3951
3951
|
type: String,
|
|
3952
3952
|
default: "check"
|
|
3953
|
+
},
|
|
3954
|
+
/**
|
|
3955
|
+
* 同 TableV1 disabled, 用于控制分页组件是否禁用
|
|
3956
|
+
*/
|
|
3957
|
+
paginationDisabled: {
|
|
3958
|
+
type: Boolean,
|
|
3959
|
+
default: false
|
|
3960
|
+
},
|
|
3961
|
+
/**
|
|
3962
|
+
* 是否只读
|
|
3963
|
+
*/
|
|
3964
|
+
readonly: {
|
|
3965
|
+
type: Boolean,
|
|
3966
|
+
default: false
|
|
3953
3967
|
}
|
|
3954
3968
|
};
|
|
3955
3969
|
const emits = {
|
|
@@ -3975,8 +3989,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
3975
3989
|
setup(props2, {
|
|
3976
3990
|
emit
|
|
3977
3991
|
}) {
|
|
3978
|
-
const coreProps = _VkTabelsV1Ctx.createBindProps(props2, ["columns"]);
|
|
3992
|
+
const coreProps = _VkTabelsV1Ctx.createBindProps(props2, ["columns", "disabled"]);
|
|
3979
3993
|
const coreEmits = _VkTabelsV1Ctx.createOnEmits(emit, ["row-click"]);
|
|
3994
|
+
const theDisabled = computed(() => props2.disabled || props2.readonly);
|
|
3980
3995
|
const getCurrentPageCheckInfo = () => {
|
|
3981
3996
|
const oidField = props2.oidField;
|
|
3982
3997
|
const allCheckedId = props2.modelValue.map(d => d[oidField]);
|
|
@@ -4028,19 +4043,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
4028
4043
|
toggle,
|
|
4029
4044
|
isActive
|
|
4030
4045
|
}) => {
|
|
4031
|
-
const onChange = props2.multiple ? toggle : () => singleChange(e.row);
|
|
4032
|
-
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4046
|
+
const onChange = theDisabled.value ? noop : props2.multiple ? toggle : () => singleChange(e.row);
|
|
4047
|
+
changeEvents[e.row[props2.oidField]] = onChange;
|
|
4048
|
+
const checkHandler = () => {
|
|
4049
|
+
if (props2.checkTrigger === "check") {
|
|
4050
|
+
onChange();
|
|
4051
|
+
}
|
|
4052
|
+
};
|
|
4036
4053
|
return props2.multiple ? createVNode(ElCheckbox, {
|
|
4037
|
-
"disabled":
|
|
4054
|
+
"disabled": theDisabled.value,
|
|
4038
4055
|
"modelValue": isActive,
|
|
4039
|
-
"onChange":
|
|
4056
|
+
"onChange": checkHandler
|
|
4040
4057
|
}, null) : createVNode(NRadio, {
|
|
4041
|
-
"disabled":
|
|
4058
|
+
"disabled": theDisabled.value,
|
|
4042
4059
|
"checked": isActive,
|
|
4043
|
-
"onUpdate:checked":
|
|
4060
|
+
"onUpdate:checked": checkHandler,
|
|
4044
4061
|
"theme-overrides": radioThemeOverrides
|
|
4045
4062
|
}, null);
|
|
4046
4063
|
}
|
|
@@ -4095,8 +4112,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
4095
4112
|
_ctx.selectionHidden ? { hidden: true } : _ctx.checkboxCol,
|
|
4096
4113
|
..._ctx.columns
|
|
4097
4114
|
],
|
|
4115
|
+
disabled: _ctx.paginationDisabled,
|
|
4098
4116
|
onRowClick: _ctx.handleRowClick
|
|
4099
|
-
}, toHandlers(_ctx.coreEmits)), null, 16, ["columns", "onRowClick"])
|
|
4117
|
+
}, toHandlers(_ctx.coreEmits)), null, 16, ["columns", "disabled", "onRowClick"])
|
|
4100
4118
|
]),
|
|
4101
4119
|
_: 1
|
|
4102
4120
|
/* STABLE */
|
|
@@ -45,10 +45,26 @@ export declare const props: {
|
|
|
45
45
|
type: PropType<"check" | "rowClick">;
|
|
46
46
|
default: string;
|
|
47
47
|
};
|
|
48
|
-
|
|
48
|
+
/**
|
|
49
|
+
* 同 TableV1 disabled, 用于控制分页组件是否禁用
|
|
50
|
+
*/
|
|
51
|
+
paginationDisabled: {
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
default: boolean;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* 是否只读
|
|
57
|
+
*/
|
|
58
|
+
readonly: {
|
|
49
59
|
type: BooleanConstructor;
|
|
50
60
|
default: boolean;
|
|
51
61
|
};
|
|
62
|
+
border: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: boolean;
|
|
65
|
+
}; /**
|
|
66
|
+
* 是否只读
|
|
67
|
+
*/
|
|
52
68
|
tableClass: {
|
|
53
69
|
type: StringConstructor;
|
|
54
70
|
default: string;
|
|
@@ -24,6 +24,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
24
24
|
type: import("vue").PropType<"check" | "rowClick">;
|
|
25
25
|
default: string;
|
|
26
26
|
};
|
|
27
|
+
paginationDisabled: {
|
|
28
|
+
type: BooleanConstructor;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
readonly: {
|
|
32
|
+
type: BooleanConstructor;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
27
35
|
border: {
|
|
28
36
|
type: BooleanConstructor;
|
|
29
37
|
default: boolean;
|
|
@@ -233,7 +241,6 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
233
241
|
size: import("element-plus").ButtonType<StringConstructor, "" | "small" | "default" | "large", never>;
|
|
234
242
|
index: number | ((index: number) => number);
|
|
235
243
|
popperClass: string;
|
|
236
|
-
disabled: boolean;
|
|
237
244
|
teleported: import("element-plus").ButtonType<BooleanConstructor, unknown, unknown>;
|
|
238
245
|
renderHeader: (data: {
|
|
239
246
|
column: import("element-plus").TableColumnCtx<any>;
|
|
@@ -417,6 +424,14 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
417
424
|
type: import("vue").PropType<"check" | "rowClick">;
|
|
418
425
|
default: string;
|
|
419
426
|
};
|
|
427
|
+
paginationDisabled: {
|
|
428
|
+
type: BooleanConstructor;
|
|
429
|
+
default: boolean;
|
|
430
|
+
};
|
|
431
|
+
readonly: {
|
|
432
|
+
type: BooleanConstructor;
|
|
433
|
+
default: boolean;
|
|
434
|
+
};
|
|
420
435
|
border: {
|
|
421
436
|
type: BooleanConstructor;
|
|
422
437
|
default: boolean;
|
|
@@ -699,6 +714,8 @@ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
699
714
|
multiple: boolean;
|
|
700
715
|
selectionHidden: boolean;
|
|
701
716
|
checkTrigger: "check" | "rowClick";
|
|
717
|
+
paginationDisabled: boolean;
|
|
718
|
+
readonly: boolean;
|
|
702
719
|
}, {}, {
|
|
703
720
|
VkCheckRecordLogicProvider: import("vue").DefineComponent<{
|
|
704
721
|
modelValue: {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const useElBreakpoints: () => {
|
|
2
|
+
breakpoints: Record<"sm" | "md" | "lg" | "xl", import("vue").Ref<boolean, boolean>> & {
|
|
3
|
+
greaterOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">) => import("vue").Ref<boolean, boolean>;
|
|
4
|
+
smallerOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">) => import("vue").Ref<boolean, boolean>;
|
|
5
|
+
greater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
6
|
+
smaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
7
|
+
between(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
8
|
+
isGreater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
9
|
+
isGreaterOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
10
|
+
isSmaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
11
|
+
isSmallerOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
12
|
+
isInBetween(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
13
|
+
current: () => import("vue").ComputedRef<string[]>;
|
|
14
|
+
active(): import("vue").ComputedRef<string>;
|
|
15
|
+
};
|
|
16
|
+
isMobile: import("vue").Ref<boolean, boolean>;
|
|
17
|
+
isDesktop: import("vue").Ref<boolean, boolean>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useBreakpoints } from '@vueuse/core';
|
|
2
|
+
|
|
3
|
+
const useElBreakpoints = () => {
|
|
4
|
+
const breakpoints = useBreakpoints({
|
|
5
|
+
sm: 768,
|
|
6
|
+
md: 992,
|
|
7
|
+
lg: 1200,
|
|
8
|
+
xl: 1920
|
|
9
|
+
});
|
|
10
|
+
const isMobile = breakpoints.smaller("lg");
|
|
11
|
+
const isDesktop = breakpoints.greaterOrEqual("lg");
|
|
12
|
+
return {
|
|
13
|
+
breakpoints,
|
|
14
|
+
isMobile,
|
|
15
|
+
isDesktop
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { useElBreakpoints };
|
package/composables/index.d.ts
CHANGED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const useElBreakpoints: () => {
|
|
2
|
-
breakpoints: Record<"sm" | "md" | "lg" | "xl", import("vue").Ref<boolean, boolean>> & {
|
|
3
|
-
greaterOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">) => import("vue").Ref<boolean, boolean>;
|
|
4
|
-
smallerOrEqual: (k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">) => import("vue").Ref<boolean, boolean>;
|
|
5
|
-
greater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
6
|
-
smaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
7
|
-
between(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): import("vue").Ref<boolean, boolean>;
|
|
8
|
-
isGreater(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
9
|
-
isGreaterOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
10
|
-
isSmaller(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
11
|
-
isSmallerOrEqual(k: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
12
|
-
isInBetween(a: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">, b: import("@vueuse/shared").MaybeRefOrGetter<"sm" | "md" | "lg" | "xl">): boolean;
|
|
13
|
-
current: () => import("vue").ComputedRef<string[]>;
|
|
14
|
-
active(): import("vue").ComputedRef<string>;
|
|
15
|
-
};
|
|
16
|
-
isMobile: import("vue").Ref<boolean, boolean>;
|
|
17
|
-
isDesktop: import("vue").Ref<boolean, boolean>;
|
|
18
|
-
};
|
package/composables/index.mjs
CHANGED
|
@@ -1,19 +1 @@
|
|
|
1
|
-
import { useBreakpoints } from '@vueuse/core';
|
|
2
1
|
|
|
3
|
-
const useElBreakpoints = () => {
|
|
4
|
-
const breakpoints = useBreakpoints({
|
|
5
|
-
sm: 768,
|
|
6
|
-
md: 992,
|
|
7
|
-
lg: 1200,
|
|
8
|
-
xl: 1920
|
|
9
|
-
});
|
|
10
|
-
const isMobile = breakpoints.smaller("lg");
|
|
11
|
-
const isDesktop = breakpoints.greaterOrEqual("lg");
|
|
12
|
-
return {
|
|
13
|
-
breakpoints,
|
|
14
|
-
isMobile,
|
|
15
|
-
isDesktop
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export { useElBreakpoints };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vunk/plus",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "ISC",
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
"import": "./composables/index.mjs",
|
|
32
32
|
"types": "./composables/index.d.ts"
|
|
33
33
|
},
|
|
34
|
+
"./composables/el-breakpoints": {
|
|
35
|
+
"import": "./composables/el-breakpoints/index.mjs",
|
|
36
|
+
"types": "./composables/el-breakpoints/index.d.ts"
|
|
37
|
+
},
|
|
34
38
|
"./components/vditor": {
|
|
35
39
|
"import": "./components/vditor/index.mjs",
|
|
36
40
|
"types": "./components/vditor/index.d.ts"
|