vft 0.0.429 → 0.0.431
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/es/components/alert/alert.vue2.js +38 -38
- package/es/components/autocomplete/autocomplete.vue2.js +82 -82
- package/es/components/avatar/avatar.vue2.js +23 -23
- package/es/components/avatar-stack/avatar-stack.vue2.js +25 -25
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +19 -19
- package/es/components/button/button.vue2.js +37 -37
- package/es/components/card/card.vue2.js +19 -19
- package/es/components/carousel/carousel.vue2.js +75 -75
- package/es/components/carousel/use-carousel.js +1 -1
- package/es/components/cascader-panel/index.vue2.js +2 -2
- package/es/components/cascader-panel/menu.vue2.js +2 -2
- package/es/components/cascader-panel/node.vue2.js +3 -4
- package/es/components/checkbox/checkbox-button.vue2.js +52 -52
- package/es/components/checkbox/checkbox-group.vue2.js +26 -26
- package/es/components/checkbox/checkbox.vue2.js +57 -57
- package/es/components/clamp/clamp.vue2.js +14 -14
- package/es/components/clamp-toggle/clamp-toggle.vue2.js +17 -17
- package/es/components/clamp-tooltip/clamp-tooltip.vue2.js +19 -19
- package/es/components/col/col.vue2.js +20 -20
- package/es/components/color-picker/color-picker.vue2.js +126 -128
- package/es/components/color-picker/components/sv-panel.vue.js +2 -2
- package/es/components/config-provider/hooks/use-global-config.js +3 -3
- package/es/components/context-menu/context-menu.vue2.js +18 -18
- package/es/components/date-picker/date-picker-com/panel-date-pick.vue2.js +37 -39
- package/es/components/date-picker/date-picker-com/panel-date-range.vue2.js +8 -10
- package/es/components/date-picker/date-picker.d.ts +1 -1
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/descriptions/description.vue2.js +44 -44
- package/es/components/descriptions/descriptions-row.vue2.js +12 -12
- package/es/components/dialog/dialog-content.vue2.js +31 -31
- package/es/components/dialog/dialog.vue2.js +46 -46
- package/es/components/divider/divider.vue2.js +19 -19
- package/es/components/drawer/drawer.vue2.js +41 -41
- package/es/components/dropdown/dropdown-item-impl.vue2.js +40 -40
- package/es/components/dropdown/dropdown-item.vue2.js +28 -28
- package/es/components/dropdown/dropdown.vue2.js +124 -124
- package/es/components/form/form-item.vue2.js +71 -71
- package/es/components/header-layout/header-layout.vue2.js +25 -25
- package/es/components/icon/icon.vue2.js +15 -15
- package/es/components/icon-text/icon-text.vue2.js +28 -28
- package/es/components/iframe-layout/iframe-layout.vue2.js +13 -13
- package/es/components/iframe-layout/iframe-page.vue2.js +11 -11
- package/es/components/image/image.vue2.js +63 -63
- package/es/components/image-viewer/image-viewer.vue2.js +88 -88
- package/es/components/infinite-scroll/index.d.ts +1 -1
- package/es/components/input/input.vue2.js +112 -112
- package/es/components/input-number/input-number.vue2.js +100 -100
- package/es/components/input-tag/composables/use-input-tag.js +1 -1
- package/es/components/link/link.vue2.js +20 -20
- package/es/components/list-cell/list-cell.vue2.js +19 -19
- package/es/components/logo/logo.vue2.js +22 -22
- package/es/components/menu/menu-item-group.vue2.js +8 -8
- package/es/components/menu/menu-item.vue2.js +48 -48
- package/es/components/menu/sub-menu.vue2.js +33 -31
- package/es/components/message/message.vue2.js +66 -66
- package/es/components/modal/modal-footer-action.vue2.js +25 -25
- package/es/components/modal/modal.vue2.js +40 -40
- package/es/components/multiple-tabs/multiple-tabs.vue2.js +30 -30
- package/es/components/page-wrapper/page-wrapper.vue2.js +12 -12
- package/es/components/pagination/components/jumper.vue2.js +18 -18
- package/es/components/pagination/components/next.vue2.js +11 -11
- package/es/components/pagination/components/pager.vue2.js +74 -74
- package/es/components/pagination/components/prev.vue2.js +9 -9
- package/es/components/pagination/components/sizes.vue2.js +18 -18
- package/es/components/pagination/components/total.vue2.js +8 -8
- package/es/components/popconfirm/popconfirm.vue2.js +47 -47
- package/es/components/popover/popover.vue2.js +28 -28
- package/es/components/popper/trigger.vue2.js +9 -9
- package/es/components/progress/progress.vue2.js +87 -87
- package/es/components/qrcode/qrcode.vue2.js +31 -31
- package/es/components/radio/radio-button.vue2.js +17 -17
- package/es/components/radio/radio-group.vue2.js +35 -35
- package/es/components/router-view-content/router-view-content.vue2.js +25 -25
- package/es/components/roving-focus-group/roving-focus-item.vue2.js +30 -30
- package/es/components/row/row.vue2.js +5 -5
- package/es/components/scrollbar/bar.vue2.js +16 -16
- package/es/components/scrollbar/scrollbar.vue2.js +48 -48
- package/es/components/scrollbar/thumb.vue2.js +27 -27
- package/es/components/search/search.vue2.js +29 -29
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/select.vue.d.ts +1 -1
- package/es/components/side-menu/index.d.ts +2 -8
- package/es/components/side-menu/side-menu.vue.d.ts +8 -62
- package/es/components/side-menu/side-menu.vue2.js +48 -46
- package/es/components/side-menu/types.d.ts +107 -0
- package/es/components/side-menu/use-drag-line.d.ts +3 -1
- package/es/components/side-menu/use-drag-line.js +39 -28
- package/es/components/skeleton/skeleton-item.vue2.js +9 -9
- package/es/components/skeleton/skeleton.vue2.js +14 -14
- package/es/components/slider/button.vue2.js +54 -54
- package/es/components/slider/slider.vue2.js +106 -106
- package/es/components/steps/item.vue2.js +56 -56
- package/es/components/steps/steps.vue2.js +16 -16
- package/es/components/super-form/super-form-action.vue2.js +28 -28
- package/es/components/super-form/super-form-item.vue2.js +1 -1
- package/es/components/switch/switch.vue2.js +108 -108
- package/es/components/table/field.d.ts +4 -4
- package/es/components/teleport/teleport.vue2.js +6 -6
- package/es/components/time-picker/common/picker.vue.d.ts +1 -1
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/time-picker/time-picker.d.ts +1 -1
- package/es/components/timeline/timeline-item.vue2.js +20 -20
- package/es/components/tooltip/content.vue2.js +57 -57
- package/es/components/tooltip/tooltip.vue2.js +66 -66
- package/es/components/tooltip/trigger.vue2.js +42 -42
- package/es/components/tree/tree.vue2.js +72 -72
- package/es/components/upload/upload-content.vue2.js +85 -85
- package/es/components/upload/upload-list.vue2.js +70 -70
- package/es/components/upload/upload.vue2.js +86 -86
- package/es/components/verify-code/verify-code.vue2.js +18 -18
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/es/utils/vue/vnode.js +1 -1
- package/lib/components/alert/alert.vue2.cjs +1 -1
- package/lib/components/autocomplete/autocomplete.vue2.cjs +1 -1
- package/lib/components/avatar/avatar.vue2.cjs +1 -1
- package/lib/components/avatar-stack/avatar-stack.vue2.cjs +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -1
- package/lib/components/button/button.vue2.cjs +1 -1
- package/lib/components/card/card.vue2.cjs +1 -1
- package/lib/components/carousel/carousel.vue2.cjs +1 -1
- package/lib/components/cascader-panel/index.vue2.cjs +1 -1
- package/lib/components/cascader-panel/menu.vue2.cjs +1 -1
- package/lib/components/cascader-panel/node.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-button.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox-group.vue2.cjs +1 -1
- package/lib/components/checkbox/checkbox.vue2.cjs +1 -1
- package/lib/components/clamp/clamp.vue2.cjs +1 -1
- package/lib/components/clamp-toggle/clamp-toggle.vue2.cjs +1 -1
- package/lib/components/clamp-tooltip/clamp-tooltip.vue2.cjs +1 -1
- package/lib/components/col/col.vue2.cjs +1 -1
- package/lib/components/color-picker/color-picker.vue2.cjs +1 -1
- package/lib/components/color-picker/components/sv-panel.vue.cjs +1 -1
- package/lib/components/context-menu/context-menu.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-pick.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker-com/panel-date-range.vue2.cjs +1 -1
- package/lib/components/date-picker/date-picker.d.ts +1 -1
- package/lib/components/date-picker/index.d.ts +2 -2
- package/lib/components/descriptions/description.vue2.cjs +1 -1
- package/lib/components/descriptions/descriptions-row.vue2.cjs +1 -1
- package/lib/components/dialog/dialog-content.vue2.cjs +1 -1
- package/lib/components/dialog/dialog.vue2.cjs +1 -1
- package/lib/components/divider/divider.vue2.cjs +1 -1
- package/lib/components/drawer/drawer.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item-impl.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown-item.vue2.cjs +1 -1
- package/lib/components/dropdown/dropdown.vue2.cjs +1 -1
- package/lib/components/form/form-item.vue2.cjs +1 -1
- package/lib/components/header-layout/header-layout.vue2.cjs +1 -1
- package/lib/components/icon/icon.vue2.cjs +1 -1
- package/lib/components/icon-text/icon-text.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-layout.vue2.cjs +1 -1
- package/lib/components/iframe-layout/iframe-page.vue2.cjs +1 -1
- package/lib/components/image/image.vue2.cjs +1 -1
- package/lib/components/image-viewer/image-viewer.vue2.cjs +1 -1
- package/lib/components/infinite-scroll/index.d.ts +1 -1
- package/lib/components/input/input.vue2.cjs +1 -1
- package/lib/components/input-number/input-number.vue2.cjs +1 -1
- package/lib/components/link/link.vue2.cjs +1 -1
- package/lib/components/list-cell/list-cell.vue2.cjs +1 -1
- package/lib/components/logo/logo.vue2.cjs +1 -1
- package/lib/components/menu/menu-item-group.vue2.cjs +1 -1
- package/lib/components/menu/menu-item.vue2.cjs +1 -1
- package/lib/components/menu/sub-menu.vue2.cjs +1 -1
- package/lib/components/message/message.vue2.cjs +1 -1
- package/lib/components/modal/modal-footer-action.vue2.cjs +1 -1
- package/lib/components/modal/modal.vue2.cjs +1 -1
- package/lib/components/multiple-tabs/multiple-tabs.vue2.cjs +1 -1
- package/lib/components/page-wrapper/page-wrapper.vue2.cjs +1 -1
- package/lib/components/pagination/components/jumper.vue2.cjs +1 -1
- package/lib/components/pagination/components/next.vue2.cjs +1 -1
- package/lib/components/pagination/components/pager.vue2.cjs +1 -1
- package/lib/components/pagination/components/prev.vue2.cjs +1 -1
- package/lib/components/pagination/components/sizes.vue2.cjs +1 -1
- package/lib/components/pagination/components/total.vue2.cjs +1 -1
- package/lib/components/popconfirm/popconfirm.vue2.cjs +1 -1
- package/lib/components/popover/popover.vue2.cjs +1 -1
- package/lib/components/popper/trigger.vue2.cjs +1 -1
- package/lib/components/progress/progress.vue2.cjs +5 -5
- package/lib/components/qrcode/qrcode.vue2.cjs +1 -1
- package/lib/components/radio/radio-button.vue2.cjs +1 -1
- package/lib/components/radio/radio-group.vue2.cjs +1 -1
- package/lib/components/router-view-content/router-view-content.vue2.cjs +1 -1
- package/lib/components/roving-focus-group/roving-focus-item.vue2.cjs +1 -1
- package/lib/components/row/row.vue2.cjs +1 -1
- package/lib/components/scrollbar/bar.vue2.cjs +1 -1
- package/lib/components/scrollbar/scrollbar.vue2.cjs +1 -1
- package/lib/components/scrollbar/thumb.vue2.cjs +1 -1
- package/lib/components/search/search.vue2.cjs +1 -1
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/select.vue.d.ts +1 -1
- package/lib/components/side-menu/index.d.ts +2 -8
- package/lib/components/side-menu/side-menu.vue.d.ts +8 -62
- package/lib/components/side-menu/side-menu.vue2.cjs +1 -1
- package/lib/components/side-menu/types.d.ts +107 -0
- package/lib/components/side-menu/use-drag-line.cjs +1 -1
- package/lib/components/side-menu/use-drag-line.d.ts +3 -1
- package/lib/components/skeleton/skeleton-item.vue2.cjs +1 -1
- package/lib/components/skeleton/skeleton.vue2.cjs +1 -1
- package/lib/components/slider/button.vue2.cjs +1 -1
- package/lib/components/slider/slider.vue2.cjs +1 -1
- package/lib/components/steps/item.vue2.cjs +1 -1
- package/lib/components/steps/steps.vue2.cjs +1 -1
- package/lib/components/super-form/super-form-action.vue2.cjs +1 -1
- package/lib/components/switch/switch.vue2.cjs +1 -1
- package/lib/components/table/field.d.ts +4 -4
- package/lib/components/teleport/teleport.vue2.cjs +1 -1
- package/lib/components/time-picker/common/picker.vue.d.ts +1 -1
- package/lib/components/time-picker/index.d.ts +2 -2
- package/lib/components/time-picker/time-picker.d.ts +1 -1
- package/lib/components/timeline/timeline-item.vue2.cjs +1 -1
- package/lib/components/tooltip/content.vue2.cjs +1 -1
- package/lib/components/tooltip/tooltip.vue2.cjs +1 -1
- package/lib/components/tooltip/trigger.vue2.cjs +1 -1
- package/lib/components/tree/tree.vue2.cjs +1 -1
- package/lib/components/upload/upload-content.vue2.cjs +1 -1
- package/lib/components/upload/upload-list.vue2.cjs +1 -1
- package/lib/components/upload/upload.vue2.cjs +1 -1
- package/lib/components/verify-code/verify-code.vue2.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +4 -4
- package/tags.json +1 -1
- package/theme-style/index.css +1 -1
- package/theme-style/src/header-layout.scss +1 -1
- package/theme-style/src/menu.scss +7 -2
- package/theme-style/src/mixins/mixins.scss +1 -0
- package/theme-style/src/side-menu.scss +0 -3
- package/theme-style/vft-header-layout.css +1 -1
- package/theme-style/vft-menu.css +1 -1
- package/theme-style/vft-side-menu.css +1 -1
- package/web-types.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as B, useSlots as z, inject as D, computed as f, createElementBlock as d, openBlock as r, normalizeClass as b, withDirectives as x, createCommentVNode as k, unref as t, isRef as y, vModelCheckbox as C, normalizeStyle as F, createTextVNode as V, renderSlot as j, toDisplayString as p } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
@@ -10,9 +10,9 @@ import "@popperjs/core";
|
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
11
|
import { useCheckbox as E } from "./composables/use-checkbox.js";
|
|
12
12
|
import { checkboxGroupContextKey as G } from "./constants.js";
|
|
13
|
-
const K = ["name", "tabindex", "disabled", "true-value", "false-value"], U = ["name", "tabindex", "disabled", "value"], M =
|
|
13
|
+
const K = ["name", "tabindex", "disabled", "true-value", "false-value"], U = ["name", "tabindex", "disabled", "value"], M = B({
|
|
14
14
|
name: "VftCheckboxButton"
|
|
15
|
-
}), X = /* @__PURE__ */
|
|
15
|
+
}), X = /* @__PURE__ */ B({
|
|
16
16
|
...M,
|
|
17
17
|
props: {
|
|
18
18
|
modelValue: { type: [Number, String, Boolean] },
|
|
@@ -32,72 +32,72 @@ const K = ["name", "tabindex", "disabled", "true-value", "false-value"], U = ["n
|
|
|
32
32
|
validateEvent: { type: Boolean }
|
|
33
33
|
},
|
|
34
34
|
emits: ["update:modelValue", "change"],
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
isFocused:
|
|
38
|
-
isChecked:
|
|
39
|
-
isDisabled:
|
|
35
|
+
setup(l) {
|
|
36
|
+
const g = l, S = z(), {
|
|
37
|
+
isFocused: i,
|
|
38
|
+
isChecked: v,
|
|
39
|
+
isDisabled: m,
|
|
40
40
|
checkboxButtonSize: $,
|
|
41
|
-
model:
|
|
41
|
+
model: u,
|
|
42
42
|
handleChange: s
|
|
43
|
-
} = E(
|
|
44
|
-
const
|
|
43
|
+
} = E(g, S), c = D(G, void 0), a = w("checkbox"), h = f(() => {
|
|
44
|
+
const n = c?.fill?.value ?? "";
|
|
45
45
|
return {
|
|
46
|
-
backgroundColor:
|
|
47
|
-
borderColor:
|
|
48
|
-
color:
|
|
49
|
-
boxShadow:
|
|
46
|
+
backgroundColor: n,
|
|
47
|
+
borderColor: n,
|
|
48
|
+
color: c?.textColor?.value ?? "",
|
|
49
|
+
boxShadow: n ? `-1px 0 0 0 ${n}` : void 0
|
|
50
50
|
};
|
|
51
|
-
}), N =
|
|
51
|
+
}), N = f(() => [
|
|
52
52
|
a.b("button"),
|
|
53
53
|
a.bm("button", $.value),
|
|
54
|
-
a.is("disabled",
|
|
55
|
-
a.is("checked",
|
|
56
|
-
a.is("focus",
|
|
54
|
+
a.is("disabled", m.value),
|
|
55
|
+
a.is("checked", v.value),
|
|
56
|
+
a.is("focus", i.value)
|
|
57
57
|
]);
|
|
58
|
-
return (
|
|
59
|
-
class:
|
|
58
|
+
return (n, e) => (r(), d("label", {
|
|
59
|
+
class: b(N.value)
|
|
60
60
|
}, [
|
|
61
|
-
|
|
61
|
+
l.trueValue || l.falseValue ? x((r(), d("input", {
|
|
62
62
|
key: 0,
|
|
63
|
-
"onUpdate:modelValue":
|
|
64
|
-
class:
|
|
63
|
+
"onUpdate:modelValue": e[0] || (e[0] = (o) => y(u) ? u.value = o : null),
|
|
64
|
+
class: b(t(a).be("button", "original")),
|
|
65
65
|
type: "checkbox",
|
|
66
|
-
name:
|
|
67
|
-
tabindex:
|
|
68
|
-
disabled:
|
|
69
|
-
"true-value":
|
|
70
|
-
"false-value":
|
|
71
|
-
onChange:
|
|
72
|
-
(...
|
|
73
|
-
onFocus:
|
|
74
|
-
onBlur:
|
|
66
|
+
name: l.name,
|
|
67
|
+
tabindex: l.tabindex,
|
|
68
|
+
disabled: t(m),
|
|
69
|
+
"true-value": l.trueValue,
|
|
70
|
+
"false-value": l.falseValue,
|
|
71
|
+
onChange: e[1] || (e[1] = //@ts-ignore
|
|
72
|
+
(...o) => t(s) && t(s)(...o)),
|
|
73
|
+
onFocus: e[2] || (e[2] = (o) => i.value = !0),
|
|
74
|
+
onBlur: e[3] || (e[3] = (o) => i.value = !1)
|
|
75
75
|
}, null, 42, K)), [
|
|
76
|
-
[C,
|
|
77
|
-
]) :
|
|
76
|
+
[C, t(u)]
|
|
77
|
+
]) : x((r(), d("input", {
|
|
78
78
|
key: 1,
|
|
79
|
-
"onUpdate:modelValue":
|
|
80
|
-
class:
|
|
79
|
+
"onUpdate:modelValue": e[4] || (e[4] = (o) => y(u) ? u.value = o : null),
|
|
80
|
+
class: b(t(a).be("button", "original")),
|
|
81
81
|
type: "checkbox",
|
|
82
|
-
name:
|
|
83
|
-
tabindex:
|
|
84
|
-
disabled:
|
|
85
|
-
value:
|
|
86
|
-
onChange:
|
|
87
|
-
(...
|
|
88
|
-
onFocus:
|
|
89
|
-
onBlur:
|
|
82
|
+
name: l.name,
|
|
83
|
+
tabindex: l.tabindex,
|
|
84
|
+
disabled: t(m),
|
|
85
|
+
value: l.value,
|
|
86
|
+
onChange: e[5] || (e[5] = //@ts-ignore
|
|
87
|
+
(...o) => t(s) && t(s)(...o)),
|
|
88
|
+
onFocus: e[6] || (e[6] = (o) => i.value = !0),
|
|
89
|
+
onBlur: e[7] || (e[7] = (o) => i.value = !1)
|
|
90
90
|
}, null, 42, U)), [
|
|
91
|
-
[C,
|
|
91
|
+
[C, t(u)]
|
|
92
92
|
]),
|
|
93
|
-
|
|
93
|
+
n.$slots.default || l.value || l.label ? (r(), d("span", {
|
|
94
94
|
key: 2,
|
|
95
|
-
class:
|
|
96
|
-
style: F(
|
|
95
|
+
class: b(t(a).be("button", "inner")),
|
|
96
|
+
style: F(t(v) ? h.value : void 0)
|
|
97
97
|
}, [
|
|
98
|
-
V(
|
|
99
|
-
|
|
100
|
-
V(
|
|
98
|
+
V(p(l.label) + " ", 1),
|
|
99
|
+
l.label ? k("", !0) : j(n.$slots, "default", { key: 0 }, () => [
|
|
100
|
+
V(p(l.value), 1)
|
|
101
101
|
])
|
|
102
102
|
], 6)) : k("", !0)
|
|
103
103
|
], 2));
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as c, computed as x, provide as h, toRefs as k, watch as g, createBlock as m, openBlock as n, resolveDynamicComponent as u, unref as l, normalizeClass as y, withCtx as E, createElementBlock as I, renderSlot as B, Fragment as C, renderList as V, nextTick as z } from "vue";
|
|
2
2
|
import "../form/index.js";
|
|
3
|
-
import { UPDATE_MODEL_EVENT as
|
|
3
|
+
import { UPDATE_MODEL_EVENT as F } from "../../constants/event.js";
|
|
4
4
|
import "@vueuse/core";
|
|
5
5
|
import "@vft/utils";
|
|
6
|
-
import { debugWarn as
|
|
6
|
+
import { debugWarn as _ } from "../../utils/error.js";
|
|
7
7
|
import "../config-provider/hooks/use-global-config.js";
|
|
8
8
|
import { pick as w } from "lodash-es";
|
|
9
9
|
import { useNamespace as D } from "../../hooks/use-namespace/index.js";
|
|
@@ -14,9 +14,9 @@ import L from "./checkbox.vue2.js";
|
|
|
14
14
|
import T from "./checkbox-button.vue2.js";
|
|
15
15
|
import { checkboxGroupContextKey as $ } from "./constants.js";
|
|
16
16
|
import { useFormItem as G, useFormItemInputId as N } from "../form/hooks/use-form-item.js";
|
|
17
|
-
const A =
|
|
17
|
+
const A = c({
|
|
18
18
|
name: "VftCheckboxGroup"
|
|
19
|
-
}),
|
|
19
|
+
}), te = /* @__PURE__ */ c({
|
|
20
20
|
...A,
|
|
21
21
|
props: {
|
|
22
22
|
modelValue: { default: () => [] },
|
|
@@ -33,21 +33,21 @@ const A = u({
|
|
|
33
33
|
options: {}
|
|
34
34
|
},
|
|
35
35
|
emits: ["update:modelValue", "change"],
|
|
36
|
-
setup(
|
|
37
|
-
const o =
|
|
38
|
-
formItemContext:
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
}, v =
|
|
36
|
+
setup(a, { emit: p }) {
|
|
37
|
+
const o = a, i = p, f = D("checkbox"), { formItem: r } = G(), { inputId: b, isLabeledByFormItem: d } = N(o, {
|
|
38
|
+
formItemContext: r
|
|
39
|
+
}), s = async (t) => {
|
|
40
|
+
i(F, t), await z(), i("change", t);
|
|
41
|
+
}, v = x({
|
|
42
42
|
get() {
|
|
43
43
|
return o.modelValue;
|
|
44
44
|
},
|
|
45
|
-
set(
|
|
46
|
-
|
|
45
|
+
set(t) {
|
|
46
|
+
s(t);
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
|
-
return
|
|
50
|
-
...w(
|
|
49
|
+
return h($, {
|
|
50
|
+
...w(k(o), [
|
|
51
51
|
"size",
|
|
52
52
|
"min",
|
|
53
53
|
"max",
|
|
@@ -57,21 +57,21 @@ const A = u({
|
|
|
57
57
|
"textColor"
|
|
58
58
|
]),
|
|
59
59
|
modelValue: v,
|
|
60
|
-
changeEvent:
|
|
61
|
-
}),
|
|
60
|
+
changeEvent: s
|
|
61
|
+
}), g(
|
|
62
62
|
() => o.modelValue,
|
|
63
63
|
() => {
|
|
64
|
-
o.validateEvent &&
|
|
64
|
+
o.validateEvent && r?.validate("change").catch((t) => _(t));
|
|
65
65
|
}
|
|
66
|
-
), (
|
|
67
|
-
id:
|
|
68
|
-
class:
|
|
66
|
+
), (t, K) => (n(), m(u(a.tag), {
|
|
67
|
+
id: l(b),
|
|
68
|
+
class: y(l(f).b("group")),
|
|
69
69
|
role: "group",
|
|
70
|
-
"aria-label":
|
|
71
|
-
"aria-labelledby":
|
|
70
|
+
"aria-label": l(d) ? void 0 : a.label || "checkbox-group",
|
|
71
|
+
"aria-labelledby": l(d) ? l(r)?.labelId : void 0
|
|
72
72
|
}, {
|
|
73
73
|
default: E(() => [
|
|
74
|
-
a.options ? (
|
|
74
|
+
a.options ? (n(!0), I(C, { key: 0 }, V(a.options, (e) => (n(), m(u(a.useButton ? T : L), {
|
|
75
75
|
value: e.value,
|
|
76
76
|
label: e.label,
|
|
77
77
|
indeterminate: e.indeterminate,
|
|
@@ -87,12 +87,12 @@ const A = u({
|
|
|
87
87
|
tabindex: e.tabindex,
|
|
88
88
|
"validate-event": e.validateEvent,
|
|
89
89
|
key: e.value
|
|
90
|
-
}, null, 8, ["value", "label", "indeterminate", "disabled", "checked", "name", "true-value", "false-value", "id", "controls", "border", "size", "tabindex", "validate-event"]))), 128)) : B(
|
|
90
|
+
}, null, 8, ["value", "label", "indeterminate", "disabled", "checked", "name", "true-value", "false-value", "id", "controls", "border", "size", "tabindex", "validate-event"]))), 128)) : B(t.$slots, "default", { key: 1 })
|
|
91
91
|
]),
|
|
92
92
|
_: 3
|
|
93
93
|
}, 8, ["id", "class", "aria-label", "aria-labelledby"]));
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
export {
|
|
97
|
-
|
|
97
|
+
te as default
|
|
98
98
|
};
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as S, useSlots as
|
|
1
|
+
import { defineComponent as S, useSlots as I, computed as y, createBlock as K, openBlock as o, resolveDynamicComponent as L, unref as a, normalizeClass as d, withCtx as O, createElementVNode as h, createElementBlock as s, createCommentVNode as c, withDirectives as C, isRef as B, vModelCheckbox as V, createTextVNode as g, toDisplayString as p, Fragment as N, renderSlot as R } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
3
|
import "@vft/utils";
|
|
4
4
|
import "../config-provider/hooks/use-global-config.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../form/index.js";
|
|
7
|
-
import { useNamespace as
|
|
7
|
+
import { useNamespace as U } from "../../hooks/use-namespace/index.js";
|
|
8
8
|
import "../../hooks/use-model-toggle/index.js";
|
|
9
9
|
import "@popperjs/core";
|
|
10
10
|
import "../../hooks/use-z-index/index.js";
|
|
11
|
-
import { useCheckbox as
|
|
11
|
+
import { useCheckbox as j } from "./composables/use-checkbox.js";
|
|
12
12
|
const M = ["tabindex", "role", "aria-checked"], T = ["id", "aria-hidden", "name", "tabindex", "disabled", "true-value", "false-value"], q = ["id", "aria-hidden", "disabled", "value", "name", "tabindex"], A = S({
|
|
13
13
|
name: "vft-checkbox"
|
|
14
14
|
}), ae = /* @__PURE__ */ S({
|
|
@@ -31,95 +31,95 @@ const M = ["tabindex", "role", "aria-checked"], T = ["id", "aria-hidden", "name"
|
|
|
31
31
|
validateEvent: { type: Boolean, default: !0 }
|
|
32
32
|
},
|
|
33
33
|
emits: ["update:modelValue", "change"],
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
34
|
+
setup(e) {
|
|
35
|
+
const b = e, l = U("checkbox"), $ = I(), {
|
|
36
36
|
inputId: v,
|
|
37
|
-
isLabeledByFormItem:
|
|
37
|
+
isLabeledByFormItem: F,
|
|
38
38
|
isChecked: k,
|
|
39
|
-
isDisabled:
|
|
40
|
-
isFocused:
|
|
41
|
-
checkboxSize:
|
|
39
|
+
isDisabled: r,
|
|
40
|
+
isFocused: u,
|
|
41
|
+
checkboxSize: D,
|
|
42
42
|
hasOwnLabel: f,
|
|
43
|
-
model:
|
|
43
|
+
model: i,
|
|
44
44
|
handleChange: m,
|
|
45
|
-
onClickRoot:
|
|
46
|
-
} =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
]),
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
45
|
+
onClickRoot: w
|
|
46
|
+
} = j(b, $), z = y(() => [
|
|
47
|
+
l.b(),
|
|
48
|
+
l.m(D.value),
|
|
49
|
+
l.is("disabled", r.value),
|
|
50
|
+
l.is("bordered", b.border),
|
|
51
|
+
l.is("checked", k.value)
|
|
52
|
+
]), E = y(() => [
|
|
53
|
+
l.e("input"),
|
|
54
|
+
l.is("disabled", r.value),
|
|
55
|
+
l.is("checked", k.value),
|
|
56
|
+
l.is("indeterminate", b.indeterminate),
|
|
57
|
+
l.is("focus", u.value)
|
|
58
58
|
]);
|
|
59
|
-
return (
|
|
60
|
-
class:
|
|
59
|
+
return (x, t) => (o(), K(L(!a(f) && a(F) ? "span" : "label"), {
|
|
60
|
+
class: d(z.value),
|
|
61
61
|
"aria-controls": e.indeterminate ? e.controls : null,
|
|
62
|
-
onClick: a(
|
|
62
|
+
onClick: a(w)
|
|
63
63
|
}, {
|
|
64
|
-
default:
|
|
65
|
-
|
|
66
|
-
class:
|
|
64
|
+
default: O(() => [
|
|
65
|
+
h("span", {
|
|
66
|
+
class: d(E.value),
|
|
67
67
|
tabindex: e.indeterminate ? 0 : void 0,
|
|
68
68
|
role: e.indeterminate ? "checkbox" : void 0,
|
|
69
69
|
"aria-checked": e.indeterminate ? "mixed" : void 0
|
|
70
70
|
}, [
|
|
71
|
-
e.trueValue || e.falseValue ?
|
|
71
|
+
e.trueValue || e.falseValue ? C((o(), s("input", {
|
|
72
72
|
key: 0,
|
|
73
73
|
id: a(v),
|
|
74
|
-
"onUpdate:modelValue":
|
|
75
|
-
class:
|
|
74
|
+
"onUpdate:modelValue": t[0] || (t[0] = (n) => B(i) ? i.value = n : null),
|
|
75
|
+
class: d(a(l).e("original")),
|
|
76
76
|
type: "checkbox",
|
|
77
77
|
"aria-hidden": e.indeterminate ? "true" : "false",
|
|
78
78
|
name: e.name,
|
|
79
79
|
tabindex: e.tabindex,
|
|
80
|
-
disabled: a(
|
|
80
|
+
disabled: a(r),
|
|
81
81
|
"true-value": e.trueValue,
|
|
82
82
|
"false-value": e.falseValue,
|
|
83
|
-
onChange:
|
|
84
|
-
(...
|
|
85
|
-
onFocus:
|
|
86
|
-
onBlur:
|
|
83
|
+
onChange: t[1] || (t[1] = //@ts-ignore
|
|
84
|
+
(...n) => a(m) && a(m)(...n)),
|
|
85
|
+
onFocus: t[2] || (t[2] = (n) => u.value = !0),
|
|
86
|
+
onBlur: t[3] || (t[3] = (n) => u.value = !1)
|
|
87
87
|
}, null, 42, T)), [
|
|
88
|
-
[
|
|
89
|
-
]) :
|
|
88
|
+
[V, a(i)]
|
|
89
|
+
]) : C((o(), s("input", {
|
|
90
90
|
key: 1,
|
|
91
91
|
id: a(v),
|
|
92
|
-
"onUpdate:modelValue":
|
|
93
|
-
class:
|
|
92
|
+
"onUpdate:modelValue": t[4] || (t[4] = (n) => B(i) ? i.value = n : null),
|
|
93
|
+
class: d(a(l).e("original")),
|
|
94
94
|
type: "checkbox",
|
|
95
95
|
"aria-hidden": e.indeterminate ? "true" : "false",
|
|
96
|
-
disabled: a(
|
|
96
|
+
disabled: a(r),
|
|
97
97
|
value: e.value,
|
|
98
98
|
name: e.name,
|
|
99
99
|
tabindex: e.tabindex,
|
|
100
|
-
onChange:
|
|
101
|
-
(...
|
|
102
|
-
onFocus:
|
|
103
|
-
onBlur:
|
|
100
|
+
onChange: t[5] || (t[5] = //@ts-ignore
|
|
101
|
+
(...n) => a(m) && a(m)(...n)),
|
|
102
|
+
onFocus: t[6] || (t[6] = (n) => u.value = !0),
|
|
103
|
+
onBlur: t[7] || (t[7] = (n) => u.value = !1)
|
|
104
104
|
}, null, 42, q)), [
|
|
105
|
-
[
|
|
105
|
+
[V, a(i)]
|
|
106
106
|
]),
|
|
107
|
-
|
|
108
|
-
class:
|
|
107
|
+
h("span", {
|
|
108
|
+
class: d(a(l).e("inner"))
|
|
109
109
|
}, null, 2)
|
|
110
110
|
], 10, M),
|
|
111
|
-
a(f) ? (
|
|
111
|
+
a(f) ? (o(), s("span", {
|
|
112
112
|
key: 0,
|
|
113
|
-
class:
|
|
113
|
+
class: d(a(l).e("label"))
|
|
114
114
|
}, [
|
|
115
|
-
|
|
116
|
-
e.label ?
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
g(p(e.label) + " ", 1),
|
|
116
|
+
e.label ? c("", !0) : (o(), s(N, { key: 0 }, [
|
|
117
|
+
R(x.$slots, "default"),
|
|
118
|
+
x.$slots.default ? c("", !0) : (o(), s(N, { key: 0 }, [
|
|
119
|
+
g(p(e.value), 1)
|
|
120
120
|
], 64))
|
|
121
121
|
], 64))
|
|
122
|
-
], 2)) :
|
|
122
|
+
], 2)) : c("", !0)
|
|
123
123
|
]),
|
|
124
124
|
_: 3
|
|
125
125
|
}, 8, ["class", "aria-controls", "onClick"]));
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as M, ref as v, reactive as N, computed as u, watch as s, nextTick as E, onUnmounted as V, onMounted as
|
|
1
|
+
import { defineComponent as M, ref as v, reactive as N, computed as u, watch as s, nextTick as E, onUnmounted as V, onMounted as q, createElementBlock as D, openBlock as G, normalizeStyle as I, createElementVNode as w, renderSlot as B } from "vue";
|
|
2
2
|
import "@vueuse/core";
|
|
3
|
-
import { addListener as
|
|
4
|
-
import { addUnit as
|
|
3
|
+
import { addListener as J, removeListener as K } from "@vft/utils";
|
|
4
|
+
import { addUnit as P } from "../../utils/helper.js";
|
|
5
5
|
import "lodash-es";
|
|
6
6
|
import "../form/index.js";
|
|
7
|
-
const
|
|
7
|
+
const Q = ["title", "aria-label"], W = M({
|
|
8
8
|
name: "vft-clamp"
|
|
9
9
|
}), te = /* @__PURE__ */ M({
|
|
10
|
-
...
|
|
10
|
+
...W,
|
|
11
11
|
props: {
|
|
12
12
|
text: {},
|
|
13
13
|
maxHeight: {},
|
|
@@ -25,14 +25,14 @@ const P = ["title", "aria-label"], Q = M({
|
|
|
25
25
|
unregisterResizeCallback: null
|
|
26
26
|
}), j = u(() => {
|
|
27
27
|
if (!l.localExpanded && e.maxHeight)
|
|
28
|
-
return
|
|
28
|
+
return P(e.maxHeight);
|
|
29
29
|
}), y = () => {
|
|
30
30
|
x.value && (x.value.textContent = S.value);
|
|
31
31
|
}, c = () => {
|
|
32
32
|
l.localExpanded || (y(), (d() || n.value) && g());
|
|
33
33
|
}, k = () => {
|
|
34
|
-
e.text && (l.offset = e.text.length, C(), e.autoResize && a.value && (
|
|
35
|
-
a.value &&
|
|
34
|
+
e.text && (l.offset = e.text.length, C(), e.autoResize && a.value && (J(a.value, c), l.unregisterResizeCallback = () => {
|
|
35
|
+
a.value && K(a.value, c);
|
|
36
36
|
}), c());
|
|
37
37
|
}, C = () => {
|
|
38
38
|
l.unregisterResizeCallback?.();
|
|
@@ -112,15 +112,15 @@ const P = ["title", "aria-label"], Q = M({
|
|
|
112
112
|
}
|
|
113
113
|
), V(() => {
|
|
114
114
|
C();
|
|
115
|
-
}),
|
|
115
|
+
}), q(() => {
|
|
116
116
|
k();
|
|
117
117
|
}), T({
|
|
118
118
|
isClamped: n
|
|
119
|
-
}), (t, i) => (
|
|
119
|
+
}), (t, i) => (G(), D("div", {
|
|
120
120
|
ref_key: "textClampRef",
|
|
121
121
|
ref: a,
|
|
122
122
|
class: "text-clamp",
|
|
123
|
-
style:
|
|
123
|
+
style: I({
|
|
124
124
|
overflow: "hidden",
|
|
125
125
|
maxHeight: j.value
|
|
126
126
|
})
|
|
@@ -139,9 +139,9 @@ const P = ["title", "aria-label"], Q = M({
|
|
|
139
139
|
w("span", {
|
|
140
140
|
ref_key: "textRef",
|
|
141
141
|
ref: x,
|
|
142
|
-
title:
|
|
143
|
-
"aria-label":
|
|
144
|
-
}, null, 8,
|
|
142
|
+
title: e.text,
|
|
143
|
+
"aria-label": e.text
|
|
144
|
+
}, null, 8, Q),
|
|
145
145
|
B(t.$slots, "after", {
|
|
146
146
|
expand: L,
|
|
147
147
|
collapse: b,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { VftClamp as
|
|
1
|
+
import { defineComponent as a, computed as s, createBlock as c, openBlock as o, unref as l, normalizeStyle as g, withCtx as d, createElementBlock as u, createCommentVNode as x, normalizeClass as f, toDisplayString as p } from "vue";
|
|
2
|
+
import { VftClamp as z } from "../clamp/index.js";
|
|
3
3
|
import "@vueuse/core";
|
|
4
4
|
import "@vft/utils";
|
|
5
5
|
import "../config-provider/hooks/use-global-config.js";
|
|
6
|
-
import { generateCssVars as
|
|
6
|
+
import { generateCssVars as C } from "../../utils/ns-cover.js";
|
|
7
7
|
import "lodash-es";
|
|
8
8
|
import "../form/index.js";
|
|
9
|
-
import { useNamespace as
|
|
9
|
+
import { useNamespace as h } from "../../hooks/use-namespace/index.js";
|
|
10
10
|
import "../../hooks/use-model-toggle/index.js";
|
|
11
11
|
import "@popperjs/core";
|
|
12
12
|
import "../../hooks/use-z-index/index.js";
|
|
13
|
-
const
|
|
13
|
+
const y = ["onClick"], k = a({
|
|
14
14
|
name: "vft-clamp-toggle"
|
|
15
|
-
}), A = /* @__PURE__ */
|
|
16
|
-
...
|
|
15
|
+
}), A = /* @__PURE__ */ a({
|
|
16
|
+
...k,
|
|
17
17
|
props: {
|
|
18
18
|
text: {},
|
|
19
19
|
maxHeight: {},
|
|
@@ -28,13 +28,13 @@ const k = ["onClick"], B = i({
|
|
|
28
28
|
toggleSize: {},
|
|
29
29
|
toggleText: { default: () => ["展开", "收缩"] }
|
|
30
30
|
},
|
|
31
|
-
setup(
|
|
32
|
-
const
|
|
33
|
-
{ color:
|
|
31
|
+
setup(e) {
|
|
32
|
+
const i = h("clamp-toggle"), n = s(() => C(
|
|
33
|
+
{ color: e.color, size: e.size, toggleColor: e.toggleColor, toggleSize: e.toggleSize },
|
|
34
34
|
"clamp-toggle"
|
|
35
35
|
));
|
|
36
|
-
return (
|
|
37
|
-
style:
|
|
36
|
+
return (B, S) => (o(), c(l(z), {
|
|
37
|
+
style: g(n.value),
|
|
38
38
|
text: e.text,
|
|
39
39
|
"max-height": e.maxHeight,
|
|
40
40
|
"max-lines": e.maxLines,
|
|
@@ -43,12 +43,12 @@ const k = ["onClick"], B = i({
|
|
|
43
43
|
ellipsis: e.ellipsis,
|
|
44
44
|
"auto-resize": e.autoResize
|
|
45
45
|
}, {
|
|
46
|
-
after: d(({ toggle:
|
|
47
|
-
|
|
46
|
+
after: d(({ toggle: m, expanded: t, clamped: r }) => [
|
|
47
|
+
t || r ? (o(), u("span", {
|
|
48
48
|
key: 0,
|
|
49
|
-
class:
|
|
50
|
-
onClick:
|
|
51
|
-
},
|
|
49
|
+
class: f(["cursor-pointer", l(i).e("more")]),
|
|
50
|
+
onClick: m
|
|
51
|
+
}, p(t ? e.toggleText[1] : e.toggleText[0]), 11, y)) : x("", !0)
|
|
52
52
|
]),
|
|
53
53
|
_: 1
|
|
54
54
|
}, 8, ["style", "text", "max-height", "max-lines", "expanded", "location", "ellipsis", "auto-resize"]));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { createReusableTemplate as
|
|
3
|
-
import { VftClamp as
|
|
4
|
-
import { VftTooltip as
|
|
5
|
-
const R = /* @__PURE__ */
|
|
1
|
+
import { defineComponent as c, ref as s, createElementBlock as u, openBlock as o, Fragment as d, createVNode as l, createBlock as p, unref as e, withCtx as m, mergeProps as r } from "vue";
|
|
2
|
+
import { createReusableTemplate as x } from "@vueuse/core";
|
|
3
|
+
import { VftClamp as k } from "../clamp/index.js";
|
|
4
|
+
import { VftTooltip as y } from "../tooltip/index.js";
|
|
5
|
+
const R = /* @__PURE__ */ c({
|
|
6
6
|
__name: "clamp-tooltip",
|
|
7
7
|
props: {
|
|
8
8
|
showTooltip: { type: Boolean },
|
|
@@ -15,28 +15,28 @@ const R = /* @__PURE__ */ s({
|
|
|
15
15
|
autoResize: { type: Boolean },
|
|
16
16
|
location: {}
|
|
17
17
|
},
|
|
18
|
-
setup(
|
|
19
|
-
const
|
|
20
|
-
return (
|
|
18
|
+
setup(t) {
|
|
19
|
+
const a = s(), [i, n] = x();
|
|
20
|
+
return (f, B) => (o(), u(d, null, [
|
|
21
21
|
l(e(i), null, {
|
|
22
|
-
default:
|
|
23
|
-
l(e(
|
|
22
|
+
default: m(() => [
|
|
23
|
+
l(e(k), r({
|
|
24
24
|
ref_key: "clampRef",
|
|
25
|
-
ref:
|
|
26
|
-
},
|
|
25
|
+
ref: a
|
|
26
|
+
}, f.$props), null, 16)
|
|
27
27
|
]),
|
|
28
28
|
_: 1
|
|
29
29
|
}),
|
|
30
|
-
|
|
30
|
+
t.showTooltip ? (o(), p(e(y), r({
|
|
31
31
|
key: 0,
|
|
32
|
-
disabled: !
|
|
33
|
-
content:
|
|
34
|
-
},
|
|
35
|
-
default:
|
|
36
|
-
l(e(
|
|
32
|
+
disabled: !a.value?.isClamped,
|
|
33
|
+
content: t.text
|
|
34
|
+
}, t.tooltipCfg), {
|
|
35
|
+
default: m(() => [
|
|
36
|
+
l(e(n))
|
|
37
37
|
]),
|
|
38
38
|
_: 1
|
|
39
|
-
}, 16, ["disabled", "content"])) : (
|
|
39
|
+
}, 16, ["disabled", "content"])) : (o(), p(e(n), { key: 1 }))
|
|
40
40
|
], 64));
|
|
41
41
|
}
|
|
42
42
|
});
|