vft 0.0.283 → 0.0.288
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/dist/index.css +1 -1
- package/es/component.js +112 -100
- package/es/components/breadcrumb/breadcrumb-item.vue.d.ts +21 -0
- package/es/components/breadcrumb/breadcrumb-item.vue.js +4 -0
- package/es/components/breadcrumb/breadcrumb-item.vue2.js +48 -0
- package/es/components/breadcrumb/breadcrumb.vue.d.ts +21 -0
- package/es/components/breadcrumb/breadcrumb.vue.js +4 -0
- package/es/components/breadcrumb/breadcrumb.vue2.js +36 -0
- package/es/components/breadcrumb/constants.d.ts +3 -0
- package/es/components/breadcrumb/constants.js +4 -0
- package/es/components/breadcrumb/index.d.ts +10 -0
- package/es/components/breadcrumb/index.js +19 -0
- package/es/components/breadcrumb/instances.d.ts +4 -0
- package/es/components/breadcrumb/instances.js +1 -0
- package/es/components/breadcrumb/style/css.d.ts +2 -0
- package/es/components/breadcrumb/style/css.js +3 -0
- package/es/components/breadcrumb/style/index.d.ts +2 -0
- package/es/components/breadcrumb/style/index.js +3 -0
- package/es/components/breadcrumb/types.d.ts +10 -0
- package/es/components/breadcrumb/types.js +1 -0
- package/es/components/breadcrumb-item/style/css.d.ts +1 -0
- package/es/components/breadcrumb-item/style/css.js +2 -0
- package/es/components/breadcrumb-item/style/index.d.ts +1 -0
- package/es/components/breadcrumb-item/style/index.js +2 -0
- package/es/components/cascader/style/css.d.ts +1 -0
- package/es/components/cascader/style/css.js +2 -0
- package/es/components/cascader/style/index.d.ts +1 -0
- package/es/components/cascader/style/index.js +2 -0
- package/es/components/cascader-panel/style/css.d.ts +1 -0
- package/es/components/cascader-panel/style/css.js +2 -0
- package/es/components/cascader-panel/style/index.d.ts +1 -0
- package/es/components/cascader-panel/style/index.js +2 -0
- package/es/components/collapse/collapse-item.d.ts +10 -0
- package/es/components/collapse/collapse-item.js +35 -0
- package/es/components/collapse/collapse-item.vue.d.ts +35 -0
- package/es/components/collapse/collapse-item.vue.js +4 -0
- package/es/components/collapse/collapse-item.vue2.js +93 -0
- package/es/components/collapse/collapse.d.ts +24 -0
- package/es/components/collapse/collapse.js +43 -0
- package/es/components/collapse/collapse.vue.d.ts +46 -0
- package/es/components/collapse/collapse.vue.js +4 -0
- package/es/components/collapse/collapse.vue2.js +26 -0
- package/es/components/collapse/constants.d.ts +7 -0
- package/es/components/collapse/constants.js +4 -0
- package/es/components/collapse/index.d.ts +12 -0
- package/es/components/collapse/index.js +24 -0
- package/es/components/collapse/instance.d.ts +4 -0
- package/es/components/collapse/instance.js +1 -0
- package/es/components/collapse/style/css.d.ts +1 -0
- package/es/components/collapse/style/css.js +2 -0
- package/es/components/collapse/style/index.d.ts +1 -0
- package/es/components/collapse/style/index.js +2 -0
- package/es/components/collapse/use-collapse-item.d.ts +21 -0
- package/es/components/collapse/use-collapse-item.js +59 -0
- package/es/components/collapse/use-collapse.d.ts +9 -0
- package/es/components/collapse/use-collapse.js +67 -0
- package/es/components/collapse-item/style/css.d.ts +1 -0
- package/es/components/collapse-item/style/css.js +2 -0
- package/es/components/collapse-item/style/index.d.ts +1 -0
- package/es/components/collapse-item/style/index.js +2 -0
- package/es/components/collapse-transition/{src/collapse-transition.vue2.js → collapse-transition.vue2.js} +4 -4
- package/es/components/collapse-transition/index.d.ts +1 -1
- package/es/components/collapse-transition/index.js +1 -1
- package/es/components/countdown/countdown.d.ts +24 -0
- package/es/components/countdown/countdown.js +47 -0
- package/es/components/countdown/countdown.vue.d.ts +47 -0
- package/es/components/countdown/countdown.vue.js +4 -0
- package/es/components/countdown/countdown.vue2.js +65 -0
- package/es/components/countdown/index.d.ts +5 -0
- package/es/components/countdown/index.js +15 -0
- package/es/components/countdown/style/css.d.ts +1 -0
- package/es/components/countdown/style/css.js +2 -0
- package/es/components/countdown/style/index.d.ts +1 -0
- package/es/components/countdown/style/index.js +2 -0
- package/es/components/countdown/utils.d.ts +3 -0
- package/es/components/countdown/utils.js +35 -0
- package/es/components/index.d.ts +5 -0
- package/es/components/index.js +280 -252
- package/es/components/input-tag/composables/index.d.ts +4 -0
- package/es/components/input-tag/composables/index.js +10 -0
- package/es/components/input-tag/composables/use-drag-tag.d.ts +15 -0
- package/es/components/input-tag/composables/use-drag-tag.js +63 -0
- package/es/components/input-tag/composables/use-hovering.d.ts +5 -0
- package/es/components/input-tag/composables/use-hovering.js +16 -0
- package/es/components/input-tag/composables/use-input-tag-dom.d.ts +58 -0
- package/es/components/input-tag/composables/use-input-tag-dom.js +49 -0
- package/es/components/input-tag/composables/use-input-tag.d.ts +32 -0
- package/es/components/input-tag/composables/use-input-tag.js +110 -0
- package/es/components/input-tag/index.d.ts +6 -0
- package/es/components/input-tag/index.js +15 -0
- package/es/components/input-tag/input-tag.d.ts +63 -0
- package/es/components/input-tag/input-tag.js +138 -0
- package/es/components/input-tag/input-tag.vue.d.ts +145 -0
- package/es/components/input-tag/input-tag.vue.js +4 -0
- package/es/components/input-tag/input-tag.vue2.js +201 -0
- package/es/components/input-tag/instance.d.ts +2 -0
- package/es/components/input-tag/instance.js +1 -0
- package/es/components/input-tag/style/css.d.ts +4 -0
- package/es/components/input-tag/style/css.js +5 -0
- package/es/components/input-tag/style/index.d.ts +4 -0
- package/es/components/input-tag/style/index.js +5 -0
- package/es/components/message-box/style/css.d.ts +1 -0
- package/es/components/message-box/style/css.js +2 -0
- package/es/components/message-box/style/index.d.ts +1 -0
- package/es/components/message-box/style/index.js +2 -0
- package/es/components/notification/style/css.d.ts +1 -0
- package/es/components/notification/style/css.js +2 -0
- package/es/components/notification/style/index.d.ts +1 -0
- package/es/components/notification/style/index.js +2 -0
- package/es/components/rate/style/css.d.ts +1 -0
- package/es/components/rate/style/css.js +2 -0
- package/es/components/rate/style/index.d.ts +1 -0
- package/es/components/rate/style/index.js +2 -0
- package/es/components/segmented/style/css.d.ts +1 -0
- package/es/components/segmented/style/css.js +2 -0
- package/es/components/segmented/style/index.d.ts +1 -0
- package/es/components/segmented/style/index.js +2 -0
- package/es/components/statistic/index.d.ts +4 -0
- package/es/components/statistic/index.js +12 -0
- package/es/components/statistic/statistic.d.ts +22 -0
- package/es/components/statistic/statistic.js +60 -0
- package/es/components/statistic/statistic.vue.d.ts +53 -0
- package/es/components/statistic/statistic.vue.js +4 -0
- package/es/components/statistic/statistic.vue2.js +69 -0
- package/es/components/statistic/style/css.d.ts +1 -0
- package/es/components/statistic/style/css.js +2 -0
- package/es/components/statistic/style/index.d.ts +1 -0
- package/es/components/statistic/style/index.js +2 -0
- package/es/components/table/index.d.ts +6 -0
- package/es/components/table/table.vue.d.ts +3 -0
- package/es/components/table/table.vue2.js +3 -2
- package/es/components/transfer/style/css.d.ts +1 -0
- package/es/components/transfer/style/css.js +2 -0
- package/es/components/transfer/style/index.d.ts +1 -0
- package/es/components/transfer/style/index.js +2 -0
- package/es/components/tree-select/style/css.d.ts +1 -0
- package/es/components/tree-select/style/css.js +2 -0
- package/es/components/tree-select/style/index.d.ts +1 -0
- package/es/components/tree-select/style/index.js +2 -0
- package/es/components/watermark/style/css.d.ts +1 -0
- package/es/components/watermark/style/css.js +2 -0
- package/es/components/watermark/style/index.d.ts +1 -0
- package/es/components/watermark/style/index.js +2 -0
- package/es/index.js +394 -366
- package/es/package.json.d.ts +1 -1
- package/es/package.json.js +1 -1
- package/lib/component.cjs +1 -1
- package/lib/components/breadcrumb/breadcrumb-item.vue.cjs +1 -0
- package/lib/components/breadcrumb/breadcrumb-item.vue.d.ts +21 -0
- package/lib/components/breadcrumb/breadcrumb-item.vue2.cjs +1 -0
- package/lib/components/breadcrumb/breadcrumb.vue.cjs +1 -0
- package/lib/components/breadcrumb/breadcrumb.vue.d.ts +21 -0
- package/lib/components/breadcrumb/breadcrumb.vue2.cjs +1 -0
- package/lib/components/breadcrumb/constants.cjs +1 -0
- package/lib/components/breadcrumb/constants.d.ts +3 -0
- package/lib/components/breadcrumb/index.cjs +1 -0
- package/lib/components/breadcrumb/index.d.ts +10 -0
- package/lib/components/breadcrumb/instances.cjs +1 -0
- package/lib/components/breadcrumb/instances.d.ts +4 -0
- package/lib/components/breadcrumb/style/css.cjs +1 -0
- package/lib/components/breadcrumb/style/css.d.ts +2 -0
- package/lib/components/breadcrumb/style/index.cjs +1 -0
- package/lib/components/breadcrumb/style/index.d.ts +2 -0
- package/lib/components/breadcrumb/types.cjs +1 -0
- package/lib/components/breadcrumb/types.d.ts +10 -0
- package/lib/components/breadcrumb-item/style/css.cjs +1 -0
- package/lib/components/breadcrumb-item/style/css.d.ts +1 -0
- package/lib/components/breadcrumb-item/style/index.cjs +1 -0
- package/lib/components/breadcrumb-item/style/index.d.ts +1 -0
- package/lib/components/cascader/style/css.cjs +1 -0
- package/lib/components/cascader/style/css.d.ts +1 -0
- package/lib/components/cascader/style/index.cjs +1 -0
- package/lib/components/cascader/style/index.d.ts +1 -0
- package/lib/components/cascader-panel/style/css.cjs +1 -0
- package/lib/components/cascader-panel/style/css.d.ts +1 -0
- package/lib/components/cascader-panel/style/index.cjs +1 -0
- package/lib/components/cascader-panel/style/index.d.ts +1 -0
- package/lib/components/collapse/collapse-item.cjs +1 -0
- package/lib/components/collapse/collapse-item.d.ts +10 -0
- package/lib/components/collapse/collapse-item.vue.cjs +1 -0
- package/lib/components/collapse/collapse-item.vue.d.ts +35 -0
- package/lib/components/collapse/collapse-item.vue2.cjs +1 -0
- package/lib/components/collapse/collapse.cjs +1 -0
- package/lib/components/collapse/collapse.d.ts +24 -0
- package/lib/components/collapse/collapse.vue.cjs +1 -0
- package/lib/components/collapse/collapse.vue.d.ts +46 -0
- package/lib/components/collapse/collapse.vue2.cjs +1 -0
- package/lib/components/collapse/constants.cjs +1 -0
- package/lib/components/collapse/constants.d.ts +7 -0
- package/lib/components/collapse/index.cjs +1 -0
- package/lib/components/collapse/index.d.ts +12 -0
- package/lib/components/collapse/instance.cjs +1 -0
- package/lib/components/collapse/instance.d.ts +4 -0
- package/lib/components/collapse/style/css.cjs +1 -0
- package/lib/components/collapse/style/css.d.ts +1 -0
- package/lib/components/collapse/style/index.cjs +1 -0
- package/lib/components/collapse/style/index.d.ts +1 -0
- package/lib/components/collapse/use-collapse-item.cjs +1 -0
- package/lib/components/collapse/use-collapse-item.d.ts +21 -0
- package/lib/components/collapse/use-collapse.cjs +1 -0
- package/lib/components/collapse/use-collapse.d.ts +9 -0
- package/lib/components/collapse-item/style/css.cjs +1 -0
- package/lib/components/collapse-item/style/css.d.ts +1 -0
- package/lib/components/collapse-item/style/index.cjs +1 -0
- package/lib/components/collapse-item/style/index.d.ts +1 -0
- package/lib/components/collapse-transition/collapse-transition.vue2.cjs +1 -0
- package/lib/components/collapse-transition/index.cjs +1 -1
- package/lib/components/collapse-transition/index.d.ts +1 -1
- package/lib/components/countdown/countdown.cjs +1 -0
- package/lib/components/countdown/countdown.d.ts +24 -0
- package/lib/components/countdown/countdown.vue.cjs +1 -0
- package/lib/components/countdown/countdown.vue.d.ts +47 -0
- package/lib/components/countdown/countdown.vue2.cjs +1 -0
- package/lib/components/countdown/index.cjs +1 -0
- package/lib/components/countdown/index.d.ts +5 -0
- package/lib/components/countdown/style/css.cjs +1 -0
- package/lib/components/countdown/style/css.d.ts +1 -0
- package/lib/components/countdown/style/index.cjs +1 -0
- package/lib/components/countdown/style/index.d.ts +1 -0
- package/lib/components/countdown/utils.cjs +1 -0
- package/lib/components/countdown/utils.d.ts +3 -0
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.d.ts +5 -0
- package/lib/components/input-tag/composables/index.cjs +1 -0
- package/lib/components/input-tag/composables/index.d.ts +4 -0
- package/lib/components/input-tag/composables/use-drag-tag.cjs +1 -0
- package/lib/components/input-tag/composables/use-drag-tag.d.ts +15 -0
- package/lib/components/input-tag/composables/use-hovering.cjs +1 -0
- package/lib/components/input-tag/composables/use-hovering.d.ts +5 -0
- package/lib/components/input-tag/composables/use-input-tag-dom.cjs +1 -0
- package/lib/components/input-tag/composables/use-input-tag-dom.d.ts +58 -0
- package/lib/components/input-tag/composables/use-input-tag.cjs +1 -0
- package/lib/components/input-tag/composables/use-input-tag.d.ts +32 -0
- package/lib/components/input-tag/index.cjs +1 -0
- package/lib/components/input-tag/index.d.ts +6 -0
- package/lib/components/input-tag/input-tag.cjs +1 -0
- package/lib/components/input-tag/input-tag.d.ts +63 -0
- package/lib/components/input-tag/input-tag.vue.cjs +1 -0
- package/lib/components/input-tag/input-tag.vue.d.ts +145 -0
- package/lib/components/input-tag/input-tag.vue2.cjs +1 -0
- package/lib/components/input-tag/instance.cjs +1 -0
- package/lib/components/input-tag/instance.d.ts +2 -0
- package/lib/components/input-tag/style/css.cjs +1 -0
- package/lib/components/input-tag/style/css.d.ts +4 -0
- package/lib/components/input-tag/style/index.cjs +1 -0
- package/lib/components/input-tag/style/index.d.ts +4 -0
- package/lib/components/message-box/style/css.cjs +1 -0
- package/lib/components/message-box/style/css.d.ts +1 -0
- package/lib/components/message-box/style/index.cjs +1 -0
- package/lib/components/message-box/style/index.d.ts +1 -0
- package/lib/components/notification/style/css.cjs +1 -0
- package/lib/components/notification/style/css.d.ts +1 -0
- package/lib/components/notification/style/index.cjs +1 -0
- package/lib/components/notification/style/index.d.ts +1 -0
- package/lib/components/rate/style/css.cjs +1 -0
- package/lib/components/rate/style/css.d.ts +1 -0
- package/lib/components/rate/style/index.cjs +1 -0
- package/lib/components/rate/style/index.d.ts +1 -0
- package/lib/components/segmented/style/css.cjs +1 -0
- package/lib/components/segmented/style/css.d.ts +1 -0
- package/lib/components/segmented/style/index.cjs +1 -0
- package/lib/components/segmented/style/index.d.ts +1 -0
- package/lib/components/statistic/index.cjs +1 -0
- package/lib/components/statistic/index.d.ts +4 -0
- package/lib/components/statistic/statistic.cjs +1 -0
- package/lib/components/statistic/statistic.d.ts +22 -0
- package/lib/components/statistic/statistic.vue.cjs +1 -0
- package/lib/components/statistic/statistic.vue.d.ts +53 -0
- package/lib/components/statistic/statistic.vue2.cjs +1 -0
- package/lib/components/statistic/style/css.cjs +1 -0
- package/lib/components/statistic/style/css.d.ts +1 -0
- package/lib/components/statistic/style/index.cjs +1 -0
- package/lib/components/statistic/style/index.d.ts +1 -0
- package/lib/components/table/index.d.ts +6 -0
- package/lib/components/table/table.vue.d.ts +3 -0
- package/lib/components/table/table.vue2.cjs +1 -1
- package/lib/components/transfer/style/css.cjs +1 -0
- package/lib/components/transfer/style/css.d.ts +1 -0
- package/lib/components/transfer/style/index.cjs +1 -0
- package/lib/components/transfer/style/index.d.ts +1 -0
- package/lib/components/tree-select/style/css.cjs +1 -0
- package/lib/components/tree-select/style/css.d.ts +1 -0
- package/lib/components/tree-select/style/index.cjs +1 -0
- package/lib/components/tree-select/style/index.d.ts +1 -0
- package/lib/components/watermark/style/css.cjs +1 -0
- package/lib/components/watermark/style/css.d.ts +1 -0
- package/lib/components/watermark/style/index.cjs +1 -0
- package/lib/components/watermark/style/index.d.ts +1 -0
- package/lib/index.cjs +1 -1
- package/lib/package.json.cjs +1 -1
- package/lib/package.json.d.ts +1 -1
- package/package.json +6 -6
- package/theme-style/index.css +1 -1
- package/theme-style/src/breadcrumb.scss +5 -6
- package/theme-style/src/cascader-panel.scss +28 -28
- package/theme-style/src/cascader.scss +101 -60
- package/theme-style/src/collapse.scss +31 -8
- package/theme-style/src/common/var.scss +115 -0
- package/theme-style/src/countdown.scss +0 -0
- package/theme-style/src/index.scss +3 -0
- package/theme-style/src/input-tag.scss +218 -0
- package/theme-style/src/message-box.scss +61 -103
- package/theme-style/src/notification.scss +43 -39
- package/theme-style/src/rate.scss +45 -34
- package/theme-style/src/segmented.scss +185 -0
- package/theme-style/src/statistic.scss +7 -7
- package/theme-style/src/table.scss +9 -0
- package/theme-style/src/transfer.scss +37 -55
- package/theme-style/src/tree-select.scss +9 -4
- package/theme-style/vft-breadcrumb.css +1 -1
- package/theme-style/vft-cascader-panel.css +1 -1
- package/theme-style/vft-cascader.css +1 -1
- package/theme-style/vft-collapse.css +1 -1
- package/theme-style/vft-countdown.css +0 -0
- package/theme-style/vft-input-tag.css +1 -0
- package/theme-style/vft-message-box.css +1 -1
- package/theme-style/vft-notification.css +1 -1
- package/theme-style/vft-rate.css +1 -1
- package/theme-style/vft-segmented.css +1 -0
- package/theme-style/vft-statistic.css +1 -1
- package/theme-style/vft-table.css +1 -1
- package/theme-style/vft-transfer.css +1 -1
- package/theme-style/vft-tree-select.css +1 -1
- package/web-types.json +1 -1
- package/lib/components/collapse-transition/src/collapse-transition.vue2.cjs +0 -1
- /package/es/components/collapse-transition/{src/collapse-transition.vue.d.ts → collapse-transition.vue.d.ts} +0 -0
- /package/es/components/collapse-transition/{src/collapse-transition.vue.js → collapse-transition.vue.js} +0 -0
- /package/lib/components/collapse-transition/{src/collapse-transition.vue.cjs → collapse-transition.vue.cjs} +0 -0
- /package/lib/components/collapse-transition/{src/collapse-transition.vue.d.ts → collapse-transition.vue.d.ts} +0 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useDragTag as e } from "./use-drag-tag.js";
|
|
2
|
+
import { useHovering as t } from "./use-hovering.js";
|
|
3
|
+
import { useInputTag as g } from "./use-input-tag.js";
|
|
4
|
+
import { useInputTagDom as a } from "./use-input-tag-dom.js";
|
|
5
|
+
export {
|
|
6
|
+
e as useDragTag,
|
|
7
|
+
t as useHovering,
|
|
8
|
+
g as useInputTag,
|
|
9
|
+
a as useInputTagDom
|
|
10
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ShallowRef } from 'vue';
|
|
2
|
+
type DropType = 'before' | 'after';
|
|
3
|
+
interface UseDragTagOptions {
|
|
4
|
+
wrapperRef: ShallowRef<HTMLElement | undefined>;
|
|
5
|
+
handleDragged: (draggingIndex: number, dropIndex: number, type: DropType) => void;
|
|
6
|
+
afterDragged?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useDragTag({ wrapperRef, handleDragged, afterDragged, }: UseDragTagOptions): {
|
|
9
|
+
dropIndicatorRef: ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
10
|
+
showDropIndicator: import("vue").Ref<boolean, boolean>;
|
|
11
|
+
handleDragStart: (event: DragEvent, index: number) => void;
|
|
12
|
+
handleDragOver: (event: DragEvent, index: number) => void;
|
|
13
|
+
handleDragEnd: (event: DragEvent) => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { shallowRef as x, ref as C } from "vue";
|
|
2
|
+
import "@vueuse/core";
|
|
3
|
+
import { isUndefined as u, getStyle as E, setStyle as M } from "@vft/utils";
|
|
4
|
+
import "../../../utils/ns-cover.js";
|
|
5
|
+
import "lodash-es";
|
|
6
|
+
import { useNamespace as B } from "../../../hooks/use-namespace/index.js";
|
|
7
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
8
|
+
import "@popperjs/core";
|
|
9
|
+
import "../../../hooks/use-z-index/index.js";
|
|
10
|
+
function z({
|
|
11
|
+
wrapperRef: s,
|
|
12
|
+
handleDragged: S,
|
|
13
|
+
afterDragged: $
|
|
14
|
+
}) {
|
|
15
|
+
const p = B("input-tag"), g = x(), l = C(!1);
|
|
16
|
+
let e, n, i, t;
|
|
17
|
+
function m(o) {
|
|
18
|
+
return `.${p.e("inner")} .${p.namespace.value}-tag:nth-child(${o + 1})`;
|
|
19
|
+
}
|
|
20
|
+
function P(o, r) {
|
|
21
|
+
e = r, n = s.value.querySelector(
|
|
22
|
+
m(r)
|
|
23
|
+
), n && (n.style.opacity = "0.5"), o.dataTransfer.effectAllowed = "move";
|
|
24
|
+
}
|
|
25
|
+
function w(o, r) {
|
|
26
|
+
if (i = r, o.preventDefault(), o.dataTransfer.dropEffect = "move", u(e) || e === r) {
|
|
27
|
+
l.value = !1;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const a = s.value.querySelector(m(r)).getBoundingClientRect(), v = e + 1 !== r, h = e - 1 !== r, y = o.clientX - a.left, N = v ? h ? 0.5 : 1 : -1, b = h ? v ? 0.5 : 0 : 1;
|
|
31
|
+
y <= a.width * N ? t = "before" : y > a.width * b ? t = "after" : t = void 0;
|
|
32
|
+
const D = s.value.querySelector(
|
|
33
|
+
`.${p.e("inner")}`
|
|
34
|
+
), f = D.getBoundingClientRect(), c = Number.parseFloat(E(D, "gap")) / 2, q = a.top - f.top;
|
|
35
|
+
let d = -9999;
|
|
36
|
+
if (t === "before")
|
|
37
|
+
d = Math.max(
|
|
38
|
+
a.left - f.left - c,
|
|
39
|
+
Math.floor(-c / 2)
|
|
40
|
+
);
|
|
41
|
+
else if (t === "after") {
|
|
42
|
+
const T = a.right - f.left;
|
|
43
|
+
d = T + (f.width === T ? Math.floor(c / 2) : c);
|
|
44
|
+
}
|
|
45
|
+
M(g.value, {
|
|
46
|
+
top: `${q}px`,
|
|
47
|
+
left: `${d}px`
|
|
48
|
+
}), l.value = !!t;
|
|
49
|
+
}
|
|
50
|
+
function I(o) {
|
|
51
|
+
o.preventDefault(), n && (n.style.opacity = ""), t && !u(e) && !u(i) && e !== i && S(e, i, t), l.value = !1, e = void 0, n = null, i = void 0, t = void 0, $?.();
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
dropIndicatorRef: g,
|
|
55
|
+
showDropIndicator: l,
|
|
56
|
+
handleDragStart: P,
|
|
57
|
+
handleDragOver: w,
|
|
58
|
+
handleDragEnd: I
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
z as useDragTag
|
|
63
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { ComputedRef, Ref, StyleValue } from 'vue';
|
|
2
|
+
import type { ComponentSize } from 'vft/es/constants';
|
|
3
|
+
import type { InputTagProps } from '../input-tag';
|
|
4
|
+
interface UseInputTagDomOptions {
|
|
5
|
+
props: InputTagProps;
|
|
6
|
+
isFocused: Ref<boolean>;
|
|
7
|
+
hovering: Ref<boolean>;
|
|
8
|
+
disabled: ComputedRef<boolean>;
|
|
9
|
+
inputValue: Ref<string | undefined>;
|
|
10
|
+
size: ComputedRef<ComponentSize>;
|
|
11
|
+
validateState: ComputedRef<string>;
|
|
12
|
+
validateIcon: ComputedRef<boolean>;
|
|
13
|
+
needStatusIcon: ComputedRef<boolean>;
|
|
14
|
+
}
|
|
15
|
+
export declare function useInputTagDom({ props, isFocused, hovering, disabled, inputValue, size, validateState, validateIcon, needStatusIcon, }: UseInputTagDomOptions): {
|
|
16
|
+
ns: {
|
|
17
|
+
namespace: ComputedRef<string>;
|
|
18
|
+
b: (blockSuffix?: string) => string;
|
|
19
|
+
e: (element?: string) => string;
|
|
20
|
+
m: (modifier?: string) => string;
|
|
21
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
22
|
+
em: (element?: string, modifier?: string) => string;
|
|
23
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
24
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
25
|
+
is: {
|
|
26
|
+
(name: string, state: boolean | undefined): string;
|
|
27
|
+
(name: string): string;
|
|
28
|
+
};
|
|
29
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
30
|
+
cssVarName: (name: string) => string;
|
|
31
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
32
|
+
cssVarBlockName: (name: string) => string;
|
|
33
|
+
};
|
|
34
|
+
nsInput: {
|
|
35
|
+
namespace: ComputedRef<string>;
|
|
36
|
+
b: (blockSuffix?: string) => string;
|
|
37
|
+
e: (element?: string) => string;
|
|
38
|
+
m: (modifier?: string) => string;
|
|
39
|
+
be: (blockSuffix?: string, element?: string) => string;
|
|
40
|
+
em: (element?: string, modifier?: string) => string;
|
|
41
|
+
bm: (blockSuffix?: string, modifier?: string) => string;
|
|
42
|
+
bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
|
|
43
|
+
is: {
|
|
44
|
+
(name: string, state: boolean | undefined): string;
|
|
45
|
+
(name: string): string;
|
|
46
|
+
};
|
|
47
|
+
cssVar: (object: Record<string, string>) => Record<string, string>;
|
|
48
|
+
cssVarName: (name: string) => string;
|
|
49
|
+
cssVarBlock: (object: Record<string, string>) => Record<string, string>;
|
|
50
|
+
cssVarBlockName: (name: string) => string;
|
|
51
|
+
};
|
|
52
|
+
containerKls: ComputedRef<unknown[]>;
|
|
53
|
+
containerStyle: ComputedRef<StyleValue>;
|
|
54
|
+
innerKls: ComputedRef<string[]>;
|
|
55
|
+
showClear: ComputedRef<boolean | "" | 0 | undefined>;
|
|
56
|
+
showSuffix: ComputedRef<boolean | "" | import("vue").Slot<any>>;
|
|
57
|
+
};
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { useAttrs as w, useSlots as y, computed as l } from "vue";
|
|
2
|
+
import "@vueuse/core";
|
|
3
|
+
import "@vft/utils";
|
|
4
|
+
import "../../../utils/ns-cover.js";
|
|
5
|
+
import "lodash-es";
|
|
6
|
+
import { useNamespace as c } from "../../../hooks/use-namespace/index.js";
|
|
7
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
8
|
+
import "@popperjs/core";
|
|
9
|
+
import "../../../hooks/use-z-index/index.js";
|
|
10
|
+
function j({
|
|
11
|
+
props: t,
|
|
12
|
+
isFocused: a,
|
|
13
|
+
hovering: n,
|
|
14
|
+
disabled: s,
|
|
15
|
+
inputValue: m,
|
|
16
|
+
size: v,
|
|
17
|
+
validateState: p,
|
|
18
|
+
validateIcon: f,
|
|
19
|
+
needStatusIcon: g
|
|
20
|
+
}) {
|
|
21
|
+
const u = w(), o = y(), e = c("input-tag"), d = c("input"), h = l(() => [
|
|
22
|
+
e.b(),
|
|
23
|
+
e.is("focused", a.value),
|
|
24
|
+
e.is("hovering", n.value),
|
|
25
|
+
e.is("disabled", s.value),
|
|
26
|
+
e.m(v.value),
|
|
27
|
+
e.e("wrapper"),
|
|
28
|
+
u.class
|
|
29
|
+
]), b = l(() => [
|
|
30
|
+
u.style
|
|
31
|
+
]), x = l(() => [
|
|
32
|
+
e.e("inner"),
|
|
33
|
+
e.is("draggable", t.draggable),
|
|
34
|
+
e.is("left-space", !t.modelValue?.length && !o.prefix),
|
|
35
|
+
e.is("right-space", !t.modelValue?.length && !i.value)
|
|
36
|
+
]), r = l(() => t.clearable && !s.value && !t.readonly && (t.modelValue?.length || m.value) && (a.value || n.value)), i = l(() => o.suffix || r.value || p.value && f.value && g.value);
|
|
37
|
+
return {
|
|
38
|
+
ns: e,
|
|
39
|
+
nsInput: d,
|
|
40
|
+
containerKls: h,
|
|
41
|
+
containerStyle: b,
|
|
42
|
+
innerKls: x,
|
|
43
|
+
showClear: r,
|
|
44
|
+
showSuffix: i
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
j as useInputTagDom
|
|
49
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { FormItemContext } from 'vft/es/components/form';
|
|
2
|
+
import type { InputTagProps } from '../input-tag';
|
|
3
|
+
interface UseInputTagOptions {
|
|
4
|
+
props: InputTagProps;
|
|
5
|
+
emit: any;
|
|
6
|
+
formItem?: FormItemContext;
|
|
7
|
+
}
|
|
8
|
+
export declare function useInputTag({ props, emit, formItem }: UseInputTagOptions): {
|
|
9
|
+
inputRef: import("vue").ShallowRef<HTMLInputElement | undefined, HTMLInputElement | undefined>;
|
|
10
|
+
wrapperRef: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
11
|
+
isFocused: import("vue").Ref<boolean, boolean>;
|
|
12
|
+
isComposing: import("vue").Ref<boolean, boolean>;
|
|
13
|
+
inputValue: import("vue").Ref<string | undefined, string | undefined>;
|
|
14
|
+
size: import("vue").ComputedRef<import("vft/es/constants").ComponentSize>;
|
|
15
|
+
tagSize: import("vue").ComputedRef<"default" | "small">;
|
|
16
|
+
placeholder: import("vue").ComputedRef<string | undefined>;
|
|
17
|
+
closable: import("vue").ComputedRef<boolean>;
|
|
18
|
+
disabled: import("vue").ComputedRef<boolean>;
|
|
19
|
+
inputLimit: import("vue").ComputedRef<boolean>;
|
|
20
|
+
handleDragged: (draggingIndex: number, dropIndex: number, type: "before" | "after") => void;
|
|
21
|
+
handleInput: (event: Event) => void;
|
|
22
|
+
handleKeydown: (event: KeyboardEvent) => void;
|
|
23
|
+
handleAddTag: () => void;
|
|
24
|
+
handleRemoveTag: (index: number) => void;
|
|
25
|
+
handleClear: () => void;
|
|
26
|
+
handleCompositionStart: (event: CompositionEvent) => void;
|
|
27
|
+
handleCompositionUpdate: (event: CompositionEvent) => void;
|
|
28
|
+
handleCompositionEnd: (event: CompositionEvent) => void;
|
|
29
|
+
focus: () => void;
|
|
30
|
+
blur: () => void;
|
|
31
|
+
};
|
|
32
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { shallowRef as B, ref as L, computed as c, watch as G } from "vue";
|
|
2
|
+
import { EVENT_CODE as g } from "../../../constants/aria.js";
|
|
3
|
+
import { CHANGE_EVENT as i, INPUT_EVENT as H, UPDATE_MODEL_EVENT as d } from "../../../constants/event.js";
|
|
4
|
+
import "@vueuse/core";
|
|
5
|
+
import { isUndefined as K } from "@vft/utils";
|
|
6
|
+
import { debugWarn as C } from "../../../utils/error.js";
|
|
7
|
+
import "../../../utils/ns-cover.js";
|
|
8
|
+
import { castArray as M } from "lodash-es";
|
|
9
|
+
import "../../../hooks/use-model-toggle/index.js";
|
|
10
|
+
import "@popperjs/core";
|
|
11
|
+
import "../../../hooks/use-z-index/index.js";
|
|
12
|
+
import { useComposition as W } from "../../../hooks/use-composition/index.js";
|
|
13
|
+
import { useFocusController as j } from "../../../hooks/use-focus-controller/index.js";
|
|
14
|
+
import "../../form/index.js";
|
|
15
|
+
import { useFormDisabled as q, useFormSize as I } from "../../form/hooks/use-form-common-props.js";
|
|
16
|
+
function se({ props: t, emit: l, formItem: h }) {
|
|
17
|
+
const m = q(), E = I(), r = B(), o = L(), D = c(() => ["small"].includes(E.value) ? "small" : "default"), N = c(() => t.modelValue?.length ? void 0 : t.placeholder), w = c(() => !(t.readonly || m.value)), f = c(() => K(t.max) ? !1 : (t.modelValue?.length ?? 0) >= t.max), V = (e) => {
|
|
18
|
+
const a = [...t.modelValue ?? [], ...M(e)];
|
|
19
|
+
l(d, a), l(i, a), l("add-tag", e), o.value = void 0;
|
|
20
|
+
}, P = (e) => {
|
|
21
|
+
const a = e.split(t.delimiter).filter((n) => n && n !== e);
|
|
22
|
+
if (t.max) {
|
|
23
|
+
const n = t.max - (t.modelValue?.length ?? 0);
|
|
24
|
+
a.splice(n);
|
|
25
|
+
}
|
|
26
|
+
return a.length === 1 ? a[0] : a;
|
|
27
|
+
}, b = (e) => {
|
|
28
|
+
if (f.value) {
|
|
29
|
+
o.value = void 0;
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (!v.value) {
|
|
33
|
+
if (t.delimiter && o.value) {
|
|
34
|
+
const a = P(o.value);
|
|
35
|
+
a.length && V(a);
|
|
36
|
+
}
|
|
37
|
+
l(H, e.target.value);
|
|
38
|
+
}
|
|
39
|
+
}, _ = (e) => {
|
|
40
|
+
if (!v.value)
|
|
41
|
+
switch (e.code) {
|
|
42
|
+
case t.trigger:
|
|
43
|
+
e.preventDefault(), e.stopPropagation(), u();
|
|
44
|
+
break;
|
|
45
|
+
case g.numpadEnter:
|
|
46
|
+
t.trigger === g.enter && (e.preventDefault(), e.stopPropagation(), u());
|
|
47
|
+
break;
|
|
48
|
+
case g.backspace:
|
|
49
|
+
!o.value && t.modelValue?.length && (e.preventDefault(), e.stopPropagation(), T(t.modelValue.length - 1));
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}, u = () => {
|
|
53
|
+
const e = o.value?.trim();
|
|
54
|
+
!e || f.value || V(e);
|
|
55
|
+
}, T = (e) => {
|
|
56
|
+
const a = (t.modelValue ?? []).slice(), [n] = a.splice(e, 1);
|
|
57
|
+
l(d, a), l(i, a), l("remove-tag", n);
|
|
58
|
+
}, k = () => {
|
|
59
|
+
o.value = void 0, l(d, void 0), l(i, void 0), l("clear");
|
|
60
|
+
}, p = (e, a, n) => {
|
|
61
|
+
const s = (t.modelValue ?? []).slice(), [x] = s.splice(e, 1), y = a > e && n === "before" ? -1 : a < e && n === "after" ? 1 : 0;
|
|
62
|
+
s.splice(a + y, 0, x), l(d, s), l(i, s);
|
|
63
|
+
}, A = () => {
|
|
64
|
+
r.value?.focus();
|
|
65
|
+
}, F = () => {
|
|
66
|
+
r.value?.blur();
|
|
67
|
+
}, { wrapperRef: R, isFocused: U } = j(r, {
|
|
68
|
+
disabled: m,
|
|
69
|
+
afterBlur() {
|
|
70
|
+
t.saveOnBlur ? u() : o.value = void 0, t.validateEvent && h?.validate?.("blur").catch((e) => C(e));
|
|
71
|
+
}
|
|
72
|
+
}), {
|
|
73
|
+
isComposing: v,
|
|
74
|
+
handleCompositionStart: z,
|
|
75
|
+
handleCompositionUpdate: O,
|
|
76
|
+
handleCompositionEnd: S
|
|
77
|
+
} = W({ afterComposition: b });
|
|
78
|
+
return G(
|
|
79
|
+
() => t.modelValue,
|
|
80
|
+
() => {
|
|
81
|
+
t.validateEvent && h?.validate?.(i).catch((e) => C(e));
|
|
82
|
+
}
|
|
83
|
+
), {
|
|
84
|
+
inputRef: r,
|
|
85
|
+
wrapperRef: R,
|
|
86
|
+
isFocused: U,
|
|
87
|
+
isComposing: v,
|
|
88
|
+
inputValue: o,
|
|
89
|
+
size: E,
|
|
90
|
+
tagSize: D,
|
|
91
|
+
placeholder: N,
|
|
92
|
+
closable: w,
|
|
93
|
+
disabled: m,
|
|
94
|
+
inputLimit: f,
|
|
95
|
+
handleDragged: p,
|
|
96
|
+
handleInput: b,
|
|
97
|
+
handleKeydown: _,
|
|
98
|
+
handleAddTag: u,
|
|
99
|
+
handleRemoveTag: T,
|
|
100
|
+
handleClear: k,
|
|
101
|
+
handleCompositionStart: z,
|
|
102
|
+
handleCompositionUpdate: O,
|
|
103
|
+
handleCompositionEnd: S,
|
|
104
|
+
focus: A,
|
|
105
|
+
blur: F
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
export {
|
|
109
|
+
se as useInputTag
|
|
110
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import InputTag from './input-tag.vue';
|
|
2
|
+
import type { SFCWithInstall } from 'vft/es/utils';
|
|
3
|
+
export declare const VftInputTag: SFCWithInstall<typeof InputTag>;
|
|
4
|
+
export default VftInputTag;
|
|
5
|
+
export * from './input-tag';
|
|
6
|
+
export type { InputTagInstance } from './instance';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "@vueuse/core";
|
|
2
|
+
import "@vft/utils";
|
|
3
|
+
import "../../utils/ns-cover.js";
|
|
4
|
+
import { withInstall as t } from "../../utils/vue/install.js";
|
|
5
|
+
import "lodash-es";
|
|
6
|
+
import "vue";
|
|
7
|
+
import o from "./input-tag.vue2.js";
|
|
8
|
+
import { inputTagEmits as g, inputTagProps as l } from "./input-tag.js";
|
|
9
|
+
const s = t(o);
|
|
10
|
+
export {
|
|
11
|
+
s as VftInputTag,
|
|
12
|
+
s as default,
|
|
13
|
+
g as inputTagEmits,
|
|
14
|
+
l as inputTagProps
|
|
15
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { type ComponentSize } from 'vft/es/constants';
|
|
2
|
+
import type { ExtractPropTypes, __ExtractPublicPropTypes, PropType } from 'vue';
|
|
3
|
+
export declare const inputTagProps: {
|
|
4
|
+
readonly modelValue: {
|
|
5
|
+
readonly type: PropType<string[]>;
|
|
6
|
+
readonly required: false;
|
|
7
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
8
|
+
__epPropKey: true;
|
|
9
|
+
};
|
|
10
|
+
readonly max: NumberConstructor;
|
|
11
|
+
readonly tagType: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "info", boolean>;
|
|
12
|
+
readonly tagEffect: {
|
|
13
|
+
readonly type: PropType<string>;
|
|
14
|
+
readonly required: false;
|
|
15
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
16
|
+
__epPropKey: true;
|
|
17
|
+
};
|
|
18
|
+
readonly trigger: import("vft/es/utils").EpPropFinalized<(new (...args: any[]) => "Enter" | "Space") | (() => "Enter" | "Space") | (((new (...args: any[]) => "Enter" | "Space") | (() => "Enter" | "Space")) | null)[], unknown, unknown, string, boolean>;
|
|
19
|
+
readonly draggable: BooleanConstructor;
|
|
20
|
+
readonly delimiter: import("vft/es/utils").EpPropFinalized<readonly [StringConstructor, RegExpConstructor], unknown, unknown, "", boolean>;
|
|
21
|
+
readonly size: {
|
|
22
|
+
readonly type: PropType<import("vft/es/utils").EpPropMergeType<(new (...args: any[]) => "" | "default" | "small" | "large") | (() => ComponentSize) | (((new (...args: any[]) => "" | "default" | "small" | "large") | (() => ComponentSize)) | null)[], unknown, unknown>>;
|
|
23
|
+
readonly required: false;
|
|
24
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
25
|
+
__epPropKey: true;
|
|
26
|
+
};
|
|
27
|
+
readonly clearable: BooleanConstructor;
|
|
28
|
+
readonly disabled: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
29
|
+
readonly validateEvent: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
30
|
+
readonly readonly: BooleanConstructor;
|
|
31
|
+
readonly autofocus: BooleanConstructor;
|
|
32
|
+
readonly id: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, undefined, boolean>;
|
|
33
|
+
readonly tabindex: import("vft/es/utils").EpPropFinalized<readonly [StringConstructor, NumberConstructor], unknown, unknown, 0, boolean>;
|
|
34
|
+
readonly maxlength: {
|
|
35
|
+
readonly type: PropType<import("vft/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
36
|
+
readonly required: false;
|
|
37
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
38
|
+
__epPropKey: true;
|
|
39
|
+
};
|
|
40
|
+
readonly minlength: {
|
|
41
|
+
readonly type: PropType<import("vft/es/utils").EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown>>;
|
|
42
|
+
readonly required: false;
|
|
43
|
+
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
44
|
+
__epPropKey: true;
|
|
45
|
+
};
|
|
46
|
+
readonly placeholder: StringConstructor;
|
|
47
|
+
readonly autocomplete: import("vft/es/utils").EpPropFinalized<StringConstructor, unknown, unknown, "off", boolean>;
|
|
48
|
+
readonly saveOnBlur: import("vft/es/utils").EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
49
|
+
readonly ariaLabel: StringConstructor;
|
|
50
|
+
};
|
|
51
|
+
export type InputTagProps = ExtractPropTypes<typeof inputTagProps>;
|
|
52
|
+
export type InputTagPropsPublic = __ExtractPublicPropTypes<typeof inputTagProps>;
|
|
53
|
+
export declare const inputTagEmits: {
|
|
54
|
+
"update:modelValue": (value?: string[]) => boolean;
|
|
55
|
+
change: (value?: string[]) => boolean;
|
|
56
|
+
input: (value: string) => boolean;
|
|
57
|
+
'add-tag': (value: string | string[]) => boolean;
|
|
58
|
+
'remove-tag': (value: string) => boolean;
|
|
59
|
+
focus: (evt: FocusEvent) => boolean;
|
|
60
|
+
blur: (evt: FocusEvent) => boolean;
|
|
61
|
+
clear: () => boolean;
|
|
62
|
+
};
|
|
63
|
+
export type InputTagEmits = typeof inputTagEmits;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import "@vueuse/core";
|
|
2
|
+
import { isString as t, isArray as r, isUndefined as o } from "@vft/utils";
|
|
3
|
+
import { EVENT_CODE as i } from "../../constants/aria.js";
|
|
4
|
+
import { INPUT_EVENT as n, CHANGE_EVENT as l, UPDATE_MODEL_EVENT as p } from "../../constants/event.js";
|
|
5
|
+
import "../../utils/ns-cover.js";
|
|
6
|
+
import { buildProps as d, definePropType as a } from "../../utils/vue/props/runtime.js";
|
|
7
|
+
import "vue";
|
|
8
|
+
const c = d({
|
|
9
|
+
/**
|
|
10
|
+
* @description binding value
|
|
11
|
+
*/
|
|
12
|
+
modelValue: {
|
|
13
|
+
type: a(Array)
|
|
14
|
+
},
|
|
15
|
+
/**
|
|
16
|
+
* @description max number tags that can be enter
|
|
17
|
+
*/
|
|
18
|
+
max: Number,
|
|
19
|
+
/**
|
|
20
|
+
* @description tag type
|
|
21
|
+
*/
|
|
22
|
+
tagType: { type: String, default: "info" },
|
|
23
|
+
/**
|
|
24
|
+
* @description tag effect
|
|
25
|
+
*/
|
|
26
|
+
tagEffect: { type: String },
|
|
27
|
+
/**
|
|
28
|
+
* @description the key to trigger input tag
|
|
29
|
+
*/
|
|
30
|
+
trigger: {
|
|
31
|
+
type: a(String),
|
|
32
|
+
default: i.enter
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* @description whether tags can be dragged
|
|
36
|
+
*/
|
|
37
|
+
draggable: Boolean,
|
|
38
|
+
/**
|
|
39
|
+
* @description add a tag when a delimiter is matched
|
|
40
|
+
*/
|
|
41
|
+
delimiter: {
|
|
42
|
+
type: [String, RegExp],
|
|
43
|
+
default: ""
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* @description input box size
|
|
47
|
+
*/
|
|
48
|
+
size: {
|
|
49
|
+
type: String
|
|
50
|
+
},
|
|
51
|
+
/**
|
|
52
|
+
* @description whether to show clear button
|
|
53
|
+
*/
|
|
54
|
+
clearable: Boolean,
|
|
55
|
+
/**
|
|
56
|
+
* @description whether to disable input-tag
|
|
57
|
+
*/
|
|
58
|
+
disabled: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: void 0
|
|
61
|
+
},
|
|
62
|
+
/**
|
|
63
|
+
* @description whether to trigger form validation
|
|
64
|
+
*/
|
|
65
|
+
validateEvent: {
|
|
66
|
+
type: Boolean,
|
|
67
|
+
default: !0
|
|
68
|
+
},
|
|
69
|
+
/**
|
|
70
|
+
* @description native input readonly
|
|
71
|
+
*/
|
|
72
|
+
readonly: Boolean,
|
|
73
|
+
/**
|
|
74
|
+
* @description native input autofocus
|
|
75
|
+
*/
|
|
76
|
+
autofocus: Boolean,
|
|
77
|
+
/**
|
|
78
|
+
* @description same as `id` in native input
|
|
79
|
+
*/
|
|
80
|
+
id: {
|
|
81
|
+
type: String,
|
|
82
|
+
default: void 0
|
|
83
|
+
},
|
|
84
|
+
/**
|
|
85
|
+
* @description same as `tabindex` in native input
|
|
86
|
+
*/
|
|
87
|
+
tabindex: {
|
|
88
|
+
type: [String, Number],
|
|
89
|
+
default: 0
|
|
90
|
+
},
|
|
91
|
+
/**
|
|
92
|
+
* @description same as `maxlength` in native input
|
|
93
|
+
*/
|
|
94
|
+
maxlength: {
|
|
95
|
+
type: [String, Number]
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* @description same as `minlength` in native input
|
|
99
|
+
*/
|
|
100
|
+
minlength: {
|
|
101
|
+
type: [String, Number]
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* @description placeholder of input
|
|
105
|
+
*/
|
|
106
|
+
placeholder: String,
|
|
107
|
+
/**
|
|
108
|
+
* @description native input autocomplete
|
|
109
|
+
*/
|
|
110
|
+
autocomplete: {
|
|
111
|
+
type: String,
|
|
112
|
+
default: "off"
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* @description whether to save the input value when the input loses focus
|
|
116
|
+
*/
|
|
117
|
+
saveOnBlur: {
|
|
118
|
+
type: Boolean,
|
|
119
|
+
default: !0
|
|
120
|
+
},
|
|
121
|
+
/**
|
|
122
|
+
* @description native `aria-label` attribute
|
|
123
|
+
*/
|
|
124
|
+
ariaLabel: String
|
|
125
|
+
}), S = {
|
|
126
|
+
[p]: (e) => r(e) || o(e),
|
|
127
|
+
[l]: (e) => r(e) || o(e),
|
|
128
|
+
[n]: (e) => t(e),
|
|
129
|
+
"add-tag": (e) => t(e) || r(e),
|
|
130
|
+
"remove-tag": (e) => t(e),
|
|
131
|
+
focus: (e) => e instanceof FocusEvent,
|
|
132
|
+
blur: (e) => e instanceof FocusEvent,
|
|
133
|
+
clear: () => !0
|
|
134
|
+
};
|
|
135
|
+
export {
|
|
136
|
+
S as inputTagEmits,
|
|
137
|
+
c as inputTagProps
|
|
138
|
+
};
|