@wfrog/vc-ui 1.5.3 → 1.6.0

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.
Files changed (32) hide show
  1. package/dist/es/chunk/CL65DvCP.mjs +25 -0
  2. package/dist/es/chunk/DRLHgORP.mjs +26 -0
  3. package/dist/es/chunk/Mq_fqKb4.mjs +41 -0
  4. package/dist/es/components/explorer-form/explorer-form.d.ts +2 -2
  5. package/dist/es/components/explorer-form/explorer-form.mjs +12 -4
  6. package/dist/es/components/explorer-form/explorer-form.vue.d.ts +2 -2
  7. package/dist/es/components/explorer-list/explorer-list.d.ts +3 -1
  8. package/dist/es/components/explorer-list/explorer-list.mjs +65 -69
  9. package/dist/es/components/explorer-list/explorer-list.vue.d.ts +5 -1
  10. package/dist/es/components/explorer-list/index.css +15 -11
  11. package/dist/es/components/explorer-tree/explorer-tree.d.ts +3 -1
  12. package/dist/es/components/explorer-tree/explorer-tree.mjs +34 -42
  13. package/dist/es/components/explorer-tree/explorer-tree.vue.d.ts +5 -1
  14. package/dist/es/components/explorer-tree/index.css +17 -13
  15. package/dist/es/components/input/index.css +1 -1
  16. package/dist/es/components/input/input.d.ts +1 -0
  17. package/dist/es/components/input/input.mjs +6 -4
  18. package/dist/es/components/input/input.vue.d.ts +1 -0
  19. package/dist/es/components/tags/tags.mjs +3 -21
  20. package/dist/es/components/thousand-input/thousand-input.mjs +3 -35
  21. package/dist/es/components/thousand-input/thousand-input.vue.d.ts +8 -2
  22. package/dist/es/directives/cleave/index.mjs +4 -0
  23. package/dist/es/directives/focus/index.mjs +1 -0
  24. package/dist/es/directives/index.mjs +16 -0
  25. package/dist/es/directives/thousand/index.mjs +4 -0
  26. package/dist/es/index.d.ts +3 -0
  27. package/dist/es/index.mjs +4 -1
  28. package/dist/global.d.ts +5 -0
  29. package/dist/index.css +33 -25
  30. package/package.json +10 -1
  31. package/dist/es/components/document.vue.d.ts +0 -14
  32. package/dist/es/components/example-wrapper.vue.d.ts +0 -19
@@ -0,0 +1,25 @@
1
+ const vFocus = {
2
+ mounted: (el) => {
3
+ let input;
4
+ if (el.tagName === "input") {
5
+ input = el;
6
+ } else {
7
+ const elInput = el.getElementsByTagName("input");
8
+ if (elInput.length > 0) {
9
+ input = elInput[0];
10
+ }
11
+ }
12
+ if (input) {
13
+ setTimeout(() => input.focus(), 0);
14
+ const len = input.value.length;
15
+ input.setSelectionRange(len, len);
16
+ }
17
+ }
18
+ };
19
+
20
+ const __vite_glob_0_1 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
21
+ __proto__: null,
22
+ default: vFocus
23
+ }, Symbol.toStringTag, { value: 'Module' }));
24
+
25
+ export { __vite_glob_0_1 as _, vFocus as v };
@@ -0,0 +1,26 @@
1
+ import { i as index } from './BaJ7k5Lg.mjs';
2
+ import 'vue';
3
+ import './D9iEroQw.mjs';
4
+
5
+ const cleave = {
6
+ mounted: async (el, binding) => {
7
+ const Cleave = await index.loadCdnSingle("cleave");
8
+ const [elInput] = el.getElementsByTagName("input");
9
+ elInput.cleave = new Cleave(elInput, binding.value || {});
10
+ },
11
+ updated: (el) => {
12
+ const event = new Event("input", { bubbles: true });
13
+ const [elInput] = el.getElementsByTagName("input");
14
+ setTimeout(() => {
15
+ elInput.value = elInput.cleave.properties.result;
16
+ elInput.dispatchEvent(event);
17
+ }, 100);
18
+ }
19
+ };
20
+
21
+ const __vite_glob_0_0 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
22
+ __proto__: null,
23
+ default: cleave
24
+ }, Symbol.toStringTag, { value: 'Module' }));
25
+
26
+ export { __vite_glob_0_0 as _, cleave as c };
@@ -0,0 +1,41 @@
1
+ import { i as index } from './BaJ7k5Lg.mjs';
2
+ import 'vue';
3
+ import './D9iEroQw.mjs';
4
+
5
+ const thousand = {
6
+ mounted: async (el, binding) => {
7
+ const elInput = el.getElementsByTagName("input")[binding.value?.elInputIndex || 0] || el.getElementsByTagName("input")[0];
8
+ elInput.style.textAlign = "right";
9
+ elInput.style.fontFamily = "Pathway Gothic One";
10
+ const disabled = elInput.disabled;
11
+ elInput.disabled = true;
12
+ const Cleave = await index.loadCdnSingle("cleave");
13
+ const option = { decimalScale: 2, integerScale: 0, prefix: "", ...binding.value };
14
+ elInput.cleave = new Cleave(elInput, {
15
+ numeral: true,
16
+ numeralThousandsGroupStyle: "thousand",
17
+ numeralDecimalScale: option.decimalScale,
18
+ numeralIntegerScale: option.integerScale,
19
+ prefix: option.prefix
20
+ });
21
+ elInput.value = elInput.cleave?.properties?.result || "";
22
+ elInput.disabled = disabled;
23
+ },
24
+ updated: (el, binding) => {
25
+ setTimeout(() => {
26
+ const event = new Event("input", { bubbles: true });
27
+ const elInput = el.getElementsByTagName("input")[binding.value?.elInputIndex || 0] || el.getElementsByTagName("input")[0];
28
+ elInput.dispatchEvent(event);
29
+ if (elInput.cleave) {
30
+ elInput.value = elInput.cleave?.properties?.result || "";
31
+ }
32
+ }, 0);
33
+ }
34
+ };
35
+
36
+ const __vite_glob_0_2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
37
+ __proto__: null,
38
+ default: thousand
39
+ }, Symbol.toStringTag, { value: 'Module' }));
40
+
41
+ export { __vite_glob_0_2 as _, thousand as t };
@@ -12,8 +12,8 @@ export interface IExplorerFormProps {
12
12
  autoInitial?: boolean;
13
13
  defaultEditing?: boolean;
14
14
  labelPosition?: FormProps['labelPosition'];
15
- onCancel?: () => void | Promise<void>;
16
- onSave?: (data: Record<string, any>) => void | Promise<void>;
15
+ onCancel?: () => void | Promise<void> | (() => void | Promise<void>);
16
+ onSave?: (data: Record<string, any>) => void | Promise<void> | (() => void | Promise<void>);
17
17
  }
18
18
  export interface IExplorerFormEmits {
19
19
  (e: 'clickEdit'): void;
@@ -37,17 +37,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
37
  }
38
38
  async function handleCancel() {
39
39
  formRef.value.resetFields();
40
- await props.onCancel();
40
+ const cb = await props.onCancel();
41
41
  isEditing.value = false;
42
+ typeof cb === "function" && await cb();
42
43
  }
43
44
  async function handleSave() {
44
45
  const valid = await formRef.value.validate();
45
46
  if (!valid) {
46
47
  return;
47
48
  }
48
- await props.onSave(props.form.fields);
49
- formRef.value?.setInitialValues(props.form.fields);
50
- isEditing.value = false;
49
+ let cb = null;
50
+ try {
51
+ loading.value = true;
52
+ cb = await props.onSave(props.form.fields);
53
+ formRef.value?.setInitialValues(props.form.fields);
54
+ isEditing.value = false;
55
+ } finally {
56
+ loading.value = false;
57
+ }
58
+ typeof cb === "function" && await cb();
51
59
  }
52
60
  const editingWatch = watch(() => props.defaultEditing, (val) => {
53
61
  isEditing.value = val;
@@ -198,8 +198,8 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerFormProps,
198
198
  onClickEdit?: (() => any) | undefined;
199
199
  }>, {
200
200
  icon: string;
201
- onCancel: () => void | Promise<void>;
202
- onSave: (data: Record<string, any>) => void | Promise<void>;
201
+ onCancel: () => void | Promise<void> | (() => void | Promise<void>);
202
+ onSave: (data: Record<string, any>) => void | Promise<void> | (() => void | Promise<void>);
203
203
  labelPosition: import('element-plus').FormProps["labelPosition"];
204
204
  autoInitial: boolean;
205
205
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
@@ -7,7 +7,7 @@ export interface IExplorerListItem<T = any> {
7
7
  }
8
8
  export interface IExplorerListProps {
9
9
  data?: IExplorerListItem[];
10
- actions?: ('create' | 'modify' | 'remove')[];
10
+ actions?: ('create' | 'modify' | 'remove' | 'up' | 'down' | 'action')[];
11
11
  filterMethod?: (keyword: string, item: IExplorerListItem) => boolean;
12
12
  emptyText?: string;
13
13
  loading?: boolean;
@@ -20,4 +20,6 @@ export interface IExplorerListEmits {
20
20
  (e: 'create', value: string | number, item: IExplorerListItem): void;
21
21
  (e: 'modify', value: string | number, item: IExplorerListItem): void;
22
22
  (e: 'remove', value: string | number, item: IExplorerListItem): void;
23
+ (e: 'up', value: string | number, node: Node): void;
24
+ (e: 'down', value: string | number, node: Node): void;
23
25
  }
@@ -1,6 +1,6 @@
1
1
  import './index.css'
2
2
  import '../../chunk/By7FMB3I.mjs';
3
- import { defineComponent, ref, computed, createBlock, openBlock, withCtx, createElementBlock, createCommentVNode, Fragment, renderList, unref, normalizeClass, createElementVNode, renderSlot, createTextVNode, toDisplayString, createVNode } from 'vue';
3
+ import { defineComponent, ref, computed, createBlock, openBlock, withCtx, withDirectives, createElementBlock, createCommentVNode, createElementVNode, Fragment, renderList, unref, normalizeClass, renderSlot, createTextVNode, toDisplayString, mergeProps, vShow, createVNode } from 'vue';
4
4
  import { Loading } from '@element-plus/icons-vue';
5
5
  import { C as Component$3 } from '../button/button.mjs';
6
6
  import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
@@ -24,12 +24,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
24
24
  return { msg: `确定要删除 ${item.label} 吗?` };
25
25
  } }
26
26
  },
27
- emits: ["itemClick", "create", "modify", "remove"],
27
+ emits: ["itemClick", "create", "modify", "remove", "up", "down"],
28
28
  setup(__props, { expose: __expose, emit: __emit }) {
29
29
  const props = __props;
30
30
  const emits = __emit;
31
31
  const { filterKeyword } = injectExplorerPanelState();
32
32
  const actived = ref();
33
+ const actionsMapping = {
34
+ create: { title: "新增", type: "primary", icon: "Plus" },
35
+ modify: { title: "修改", type: "primary", icon: "Edit" },
36
+ remove: { title: "删除", type: "danger", icon: "Delete" },
37
+ up: { title: "上移", type: "success", icon: "Top" },
38
+ down: { title: "下移", type: "success", icon: "Bottom" }
39
+ };
33
40
  const filterMethod = props.filterMethod || ((keyword, item) => {
34
41
  return item.label.toLowerCase().includes(keyword.toLowerCase());
35
42
  });
@@ -53,67 +60,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
53
60
  const _component_ElIcon = ElIcon;
54
61
  return openBlock(), createBlock(Component$1, { always: "" }, {
55
62
  default: withCtx(() => [
56
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(myData), (item, index) => {
57
- return openBlock(), createElementBlock("div", {
58
- key: item.value,
59
- class: normalizeClass([_ctx.$style.item, { [_ctx.$style.active]: unref(actived) === item.value }]),
60
- onClick: (e) => handleClick(item, e)
61
- }, [
62
- createElementVNode("div", {
63
- class: normalizeClass(_ctx.$style.label)
64
- }, [
65
- renderSlot(_ctx.$slots, "default", {
66
- data: item,
67
- index
68
- }, () => [
69
- item.icon ? (openBlock(), createBlock(Component$2, {
70
- key: 0,
71
- name: item.icon,
72
- class: normalizeClass(_ctx.$style.icon)
73
- }, null, 8, ["name", "class"])) : createCommentVNode("", true),
74
- createTextVNode(toDisplayString(item.label), 1)
75
- ])
76
- ], 2),
77
- __props.actions.length ? (openBlock(), createElementBlock("div", {
78
- key: 0,
79
- class: normalizeClass(_ctx.$style.actions)
63
+ withDirectives(createElementVNode("div", null, [
64
+ (openBlock(true), createElementBlock(Fragment, null, renderList(unref(myData), (item, index) => {
65
+ return openBlock(), createElementBlock("div", {
66
+ key: item.value,
67
+ class: normalizeClass([_ctx.$style.item, { [_ctx.$style.active]: unref(actived) === item.value }]),
68
+ onClick: (e) => handleClick(item, e)
80
69
  }, [
81
- __props.actions.includes("create") ? (openBlock(), createBlock(Component$3, {
70
+ createElementVNode("div", {
71
+ class: normalizeClass(_ctx.$style.label)
72
+ }, [
73
+ renderSlot(_ctx.$slots, "default", {
74
+ data: item,
75
+ index
76
+ }, () => [
77
+ item.icon ? (openBlock(), createBlock(Component$2, {
78
+ key: 0,
79
+ name: item.icon,
80
+ class: normalizeClass(_ctx.$style.icon)
81
+ }, null, 8, ["name", "class"])) : createCommentVNode("", true),
82
+ createTextVNode(toDisplayString(item.label), 1)
83
+ ])
84
+ ], 2),
85
+ __props.actions.length ? (openBlock(), createElementBlock("div", {
82
86
  key: 0,
83
- title: "新增",
84
- type: "success",
85
- link: "",
86
- icon: { type: "el", name: "Plus" },
87
- stop: "",
88
- onClick: ($event) => emits("create", item.value, item)
89
- }, null, 8, ["onClick"])) : createCommentVNode("", true),
90
- __props.actions.includes("modify") ? (openBlock(), createBlock(Component$3, {
91
- key: 1,
92
- title: "修改",
93
- type: "primary",
94
- link: "",
95
- icon: { type: "el", name: "Edit" },
96
- stop: "",
97
- onClick: ($event) => emits("modify", item.value, item)
98
- }, null, 8, ["onClick"])) : createCommentVNode("", true),
99
- renderSlot(_ctx.$slots, "action", {
100
- data: item,
101
- index
102
- }),
103
- __props.actions.includes("remove") ? (openBlock(), createBlock(Component$3, {
104
- key: 2,
105
- title: "删除",
106
- type: "danger",
107
- link: "",
108
- icon: { type: "el", name: "Delete" },
109
- confirm: __props.confirmParams(item),
110
- stop: "",
111
- class: normalizeClass(_ctx.$style.remove),
112
- onClick: ($event) => emits("remove", item.value, item)
113
- }, null, 8, ["confirm", "class", "onClick"])) : createCommentVNode("", true)
114
- ], 2)) : createCommentVNode("", true)
115
- ], 10, _hoisted_1);
116
- }), 128)),
87
+ class: normalizeClass(_ctx.$style.actions)
88
+ }, [
89
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action) => {
90
+ return openBlock(), createElementBlock(Fragment, { key: action }, [
91
+ action === "action" ? renderSlot(_ctx.$slots, "action", {
92
+ key: 0,
93
+ data: item,
94
+ index
95
+ }) : (openBlock(), createBlock(Component$3, mergeProps({
96
+ key: 1,
97
+ ref_for: true
98
+ }, actionsMapping[action], {
99
+ confirm: action === "remove" ? __props.confirmParams(item) : void 0,
100
+ link: "",
101
+ icon: { type: "el", name: actionsMapping[action].icon },
102
+ stop: "",
103
+ onClick: ($event) => emits(action, item.value, item)
104
+ }), null, 16, ["confirm", "icon", "onClick"]))
105
+ ], 64);
106
+ }), 128))
107
+ ], 2)) : createCommentVNode("", true)
108
+ ], 10, _hoisted_1);
109
+ }), 128))
110
+ ], 512), [
111
+ [vShow, !__props.loading]
112
+ ]),
117
113
  unref(isEmpty) && !__props.loading ? (openBlock(), createElementBlock("div", {
118
114
  key: 0,
119
115
  class: normalizeClass(_ctx.$style.empty)
@@ -137,14 +133,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
137
133
  }
138
134
  });
139
135
 
140
- /* unplugin-vue-components disabled */const item = "_item_5dblq_1";
141
- const actions = "_actions_5dblq_16";
142
- const active = "_active_5dblq_20";
143
- const label = "_label_5dblq_25";
144
- const icon = "_icon_5dblq_31";
145
- const remove = "_remove_5dblq_44";
146
- const empty = "_empty_5dblq_48";
147
- const loading = "_loading_5dblq_49";
136
+ /* unplugin-vue-components disabled */const item = "_item_1xqvz_1";
137
+ const actions = "_actions_1xqvz_16";
138
+ const active = "_active_1xqvz_20";
139
+ const label = "_label_1xqvz_25";
140
+ const icon = "_icon_1xqvz_31";
141
+ const remove = "_remove_1xqvz_48";
142
+ const empty = "_empty_1xqvz_52";
143
+ const loading = "_loading_1xqvz_53";
148
144
  const style0 = {
149
145
  item: item,
150
146
  actions: actions,
@@ -21,18 +21,22 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerListProps,
21
21
  create: (value: string | number, item: IExplorerListItem<any>) => any;
22
22
  modify: (value: string | number, item: IExplorerListItem<any>) => any;
23
23
  remove: (value: string | number, item: IExplorerListItem<any>) => any;
24
+ up: (value: string | number, node: Node) => any;
25
+ down: (value: string | number, node: Node) => any;
24
26
  itemClick: (value: string | number, item: IExplorerListItem<any>, event: MouseEvent) => any;
25
27
  }, string, import('vue').PublicProps, Readonly<IExplorerListProps> & Readonly<{
26
28
  onCreate?: ((value: string | number, item: IExplorerListItem<any>) => any) | undefined;
27
29
  onModify?: ((value: string | number, item: IExplorerListItem<any>) => any) | undefined;
28
30
  onRemove?: ((value: string | number, item: IExplorerListItem<any>) => any) | undefined;
31
+ onUp?: ((value: string | number, node: Node) => any) | undefined;
32
+ onDown?: ((value: string | number, node: Node) => any) | undefined;
29
33
  onItemClick?: ((value: string | number, item: IExplorerListItem<any>, event: MouseEvent) => any) | undefined;
30
34
  }>, {
31
35
  data: IExplorerListItem[];
32
36
  loadingText: string;
33
37
  emptyText: string;
34
38
  highlightCurrent: boolean;
35
- actions: ("create" | "modify" | "remove")[];
39
+ actions: ("create" | "modify" | "remove" | "up" | "down" | "action")[];
36
40
  confirmParams: (item: IExplorerListItem) => import('../button/button').IButtonProps["confirm"];
37
41
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
38
42
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,5 +1,5 @@
1
1
  /* source: src/components/explorer-list/explorer-list.vue */
2
- ._item_5dblq_1 {
2
+ ._item_1xqvz_1 {
3
3
  padding: 4px 8px;
4
4
  cursor: pointer;
5
5
  display: flex;
@@ -11,38 +11,42 @@
11
11
  box-sizing: border-box;
12
12
  line-height: 1;
13
13
  }
14
- ._item_5dblq_1:hover {
14
+ ._item_1xqvz_1:hover {
15
15
  background-color: var(--el-color-primary-light-9);
16
16
  }
17
- ._item_5dblq_1:hover ._actions_5dblq_16 {
17
+ ._item_1xqvz_1:hover ._actions_1xqvz_16 {
18
18
  display: inline-flex;
19
19
  align-items: flex-start;
20
20
  }
21
- ._item_5dblq_1._active_5dblq_20 {
21
+ ._item_1xqvz_1._active_1xqvz_20 {
22
22
  color: var(--el-color-primary);
23
23
  background-color: var(--el-color-primary-light-9);
24
24
  }
25
- ._label_5dblq_25 {
25
+ ._label_1xqvz_25 {
26
26
  overflow: hidden;
27
27
  text-overflow: ellipsis;
28
28
  white-space: nowrap;
29
29
  }
30
- ._icon_5dblq_31 {
30
+ ._icon_1xqvz_31 {
31
31
  margin-right: 4px;
32
32
  }
33
- ._actions_5dblq_16 {
33
+ ._actions_1xqvz_16 {
34
34
  display: none;
35
35
  column-gap: 4px;
36
36
  }
37
- ._actions_5dblq_16 > button {
37
+ ._actions_1xqvz_16 > button {
38
38
  margin-left: 0 !important;
39
39
  font-size: 1.2em;
40
+ border: 1px solid var(--el-border-color-light) !important;
40
41
  }
41
- ._remove_5dblq_44 {
42
+ ._actions_1xqvz_16 > button:hover {
43
+ border-color: var(--el-border-color-dark) !important;
44
+ }
45
+ ._remove_1xqvz_48 {
42
46
  transform: translateY(-1px);
43
47
  }
44
- ._empty_5dblq_48,
45
- ._loading_5dblq_49 {
48
+ ._empty_1xqvz_52,
49
+ ._loading_1xqvz_53 {
46
50
  padding: 4px 8px;
47
51
  display: flex;
48
52
  align-items: center;
@@ -4,7 +4,7 @@ import { ComponentInternalInstance } from 'vue';
4
4
  import { IButtonProps } from '../button/button';
5
5
  export interface IExplorerTreeProps {
6
6
  data?: TreeComponentProps['data'];
7
- actions?: ('create' | 'modify' | 'remove')[];
7
+ actions?: ('create' | 'modify' | 'remove' | 'up' | 'down' | 'action')[];
8
8
  treeProps?: TreeComponentProps;
9
9
  emptyText?: string;
10
10
  defaultExpandAll?: boolean;
@@ -19,4 +19,6 @@ export interface IExplorerTreeEmits {
19
19
  (e: 'create', value: string | number, node: Node): void;
20
20
  (e: 'modify', value: string | number, node: Node): void;
21
21
  (e: 'remove', value: string | number, node: Node): void;
22
+ (e: 'up', value: string | number, node: Node): void;
23
+ (e: 'down', value: string | number, node: Node): void;
22
24
  }
@@ -3,7 +3,7 @@ import '../../chunk/By7FMB3I.mjs';
3
3
  import { E as ElTree } from '../../chunk/DYKOYbzT.mjs';
4
4
  import '../../chunk/DSt2uDNE.mjs';
5
5
  import '../../chunk/DTbnchOm.mjs';
6
- import { defineComponent, useTemplateRef, computed, watch, createBlock, openBlock, withCtx, withDirectives, createElementBlock, createCommentVNode, createVNode, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, vShow } from 'vue';
6
+ import { defineComponent, useTemplateRef, computed, watch, createBlock, openBlock, withCtx, withDirectives, createElementBlock, createCommentVNode, createVNode, mergeProps, unref, createElementVNode, normalizeClass, renderSlot, createTextVNode, toDisplayString, Fragment, renderList, vShow } from 'vue';
7
7
  import { Loading } from '@element-plus/icons-vue';
8
8
  import { C as Component$3 } from '../button/button.mjs';
9
9
  import { i as injectExplorerPanelState } from '../explorer-panel/explorer-panel2.mjs';
@@ -28,12 +28,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  filterMethod: {},
29
29
  highlightCurrent: { type: Boolean, default: true }
30
30
  },
31
- emits: ["nodeClick", "create", "modify", "remove"],
31
+ emits: ["nodeClick", "create", "modify", "remove", "up", "down"],
32
32
  setup(__props, { expose: __expose, emit: __emit }) {
33
33
  const props = __props;
34
34
  const emits = __emit;
35
35
  const treeRef = useTemplateRef("treeRef");
36
36
  const { filterKeyword } = injectExplorerPanelState();
37
+ const actionsMapping = {
38
+ create: { title: "新增", type: "primary", icon: "Plus" },
39
+ modify: { title: "修改", type: "primary", icon: "Edit" },
40
+ remove: { title: "删除", type: "danger", icon: "Delete" },
41
+ up: { title: "上移", type: "success", icon: "Top" },
42
+ down: { title: "下移", type: "success", icon: "Bottom" }
43
+ };
37
44
  const treeProps = computed(() => ({
38
45
  data: props.data,
39
46
  emptyText: props.emptyText,
@@ -98,39 +105,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
98
105
  key: 0,
99
106
  class: normalizeClass(["vc-actions", [_ctx.$style.actions]])
100
107
  }, [
101
- __props.actions.includes("create") ? (openBlock(), createBlock(Component$3, {
102
- key: 0,
103
- title: "新增",
104
- type: "success",
105
- link: "",
106
- icon: { type: "el", name: "Plus" },
107
- stop: "",
108
- onClick: ($event) => emits("create", node.data.value, node)
109
- }, null, 8, ["onClick"])) : createCommentVNode("", true),
110
- __props.actions.includes("modify") ? (openBlock(), createBlock(Component$3, {
111
- key: 1,
112
- title: "修改",
113
- type: "primary",
114
- link: "",
115
- icon: { type: "el", name: "Edit" },
116
- stop: "",
117
- onClick: ($event) => emits("modify", node.data.value, node)
118
- }, null, 8, ["onClick"])) : createCommentVNode("", true),
119
- renderSlot(_ctx.$slots, "action", {
120
- data: node.data,
121
- index: node.index
122
- }),
123
- __props.actions.includes("remove") ? (openBlock(), createBlock(Component$3, {
124
- key: 2,
125
- confirm: __props.confirmParams(node),
126
- title: "删除",
127
- type: "danger",
128
- link: "",
129
- icon: { type: "el", name: "Delete" },
130
- stop: "",
131
- class: normalizeClass(_ctx.$style.remove),
132
- onClick: ($event) => emits("remove", node.data.value, node)
133
- }, null, 8, ["confirm", "class", "onClick"])) : createCommentVNode("", true)
108
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.actions, (action) => {
109
+ return openBlock(), createElementBlock(Fragment, { key: action }, [
110
+ action === "action" ? renderSlot(_ctx.$slots, "action", {
111
+ key: 0,
112
+ data: node.data,
113
+ index: node.index
114
+ }) : (openBlock(), createBlock(Component$3, mergeProps({
115
+ key: 1,
116
+ ref_for: true
117
+ }, actionsMapping[action], {
118
+ confirm: action === "remove" ? __props.confirmParams(node) : void 0,
119
+ link: "",
120
+ icon: { type: "el", name: actionsMapping[action].icon },
121
+ stop: "",
122
+ onClick: ($event) => emits(action, node.data.value, node)
123
+ }), null, 16, ["confirm", "icon", "onClick"]))
124
+ ], 64);
125
+ }), 128))
134
126
  ], 2)) : createCommentVNode("", true)
135
127
  ], 2)
136
128
  ]),
@@ -157,13 +149,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
157
149
  }
158
150
  });
159
151
 
160
- /* unplugin-vue-components disabled */const tree = "_tree_1ybks_1";
161
- const node = "_node_1ybks_24";
162
- const label = "_label_1ybks_34";
163
- const icon = "_icon_1ybks_40";
164
- const actions = "_actions_1ybks_44";
165
- const remove = "_remove_1ybks_53";
166
- const loading = "_loading_1ybks_57";
152
+ /* unplugin-vue-components disabled */const tree = "_tree_10nwy_1";
153
+ const node = "_node_10nwy_24";
154
+ const label = "_label_10nwy_34";
155
+ const icon = "_icon_10nwy_40";
156
+ const actions = "_actions_10nwy_44";
157
+ const remove = "_remove_10nwy_57";
158
+ const loading = "_loading_10nwy_61";
167
159
  const style0 = {
168
160
  tree: tree,
169
161
  node: node,
@@ -2037,18 +2037,22 @@ declare const __VLS_component: import('vue').DefineComponent<IExplorerTreeProps,
2037
2037
  create: (value: string | number, node: Node) => any;
2038
2038
  modify: (value: string | number, node: Node) => any;
2039
2039
  remove: (value: string | number, node: Node) => any;
2040
+ up: (value: string | number, node: Node) => any;
2041
+ down: (value: string | number, node: Node) => any;
2040
2042
  nodeClick: (value: string | number, node: Node, instance: ComponentInternalInstance | null, event: MouseEvent) => any;
2041
2043
  }, string, import('vue').PublicProps, Readonly<IExplorerTreeProps> & Readonly<{
2042
2044
  onCreate?: ((value: string | number, node: Node) => any) | undefined;
2043
2045
  onModify?: ((value: string | number, node: Node) => any) | undefined;
2044
2046
  onRemove?: ((value: string | number, node: Node) => any) | undefined;
2047
+ onUp?: ((value: string | number, node: Node) => any) | undefined;
2048
+ onDown?: ((value: string | number, node: Node) => any) | undefined;
2045
2049
  onNodeClick?: ((value: string | number, node: Node, instance: ComponentInternalInstance | null, event: MouseEvent) => any) | undefined;
2046
2050
  }>, {
2047
2051
  loadingText: string;
2048
2052
  emptyText: string;
2049
2053
  highlightCurrent: boolean;
2050
2054
  defaultExpandAll: boolean;
2051
- actions: ("create" | "modify" | "remove")[];
2055
+ actions: ("create" | "modify" | "remove" | "up" | "down" | "action")[];
2052
2056
  confirmParams: (node: Node) => import('../button/button').IButtonProps["confirm"];
2053
2057
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
2054
2058
  treeRef: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<globalThis.ExtractPropTypes<{
@@ -1,27 +1,27 @@
1
1
  /* source: src/components/explorer-tree/explorer-tree.vue */
2
- ._tree_1ybks_1 .el-tree-node__content {
2
+ ._tree_10nwy_1 .el-tree-node__content {
3
3
  display: flex;
4
4
  align-items: center;
5
5
  }
6
- ._tree_1ybks_1 .el-tree-node__content:hover {
6
+ ._tree_10nwy_1 .el-tree-node__content:hover {
7
7
  background-color: var(--el-color-primary-light-9);
8
8
  }
9
- ._tree_1ybks_1 .el-tree-node__content:hover .vc-actions {
9
+ ._tree_10nwy_1 .el-tree-node__content:hover .vc-actions {
10
10
  display: inline-flex;
11
11
  }
12
- ._tree_1ybks_1 .is-current > .el-tree-node__content {
12
+ ._tree_10nwy_1 .is-current > .el-tree-node__content {
13
13
  color: var(--el-color-primary);
14
14
  background-color: var(--el-color-primary-light-9);
15
15
  }
16
- ._tree_1ybks_1 .el-tree__empty-block {
16
+ ._tree_10nwy_1 .el-tree__empty-block {
17
17
  text-align: left;
18
18
  min-height: unset;
19
19
  padding: 4px 8px;
20
20
  }
21
- ._tree_1ybks_1 .el-tree__empty-text {
21
+ ._tree_10nwy_1 .el-tree__empty-text {
22
22
  position: static;
23
23
  }
24
- ._node_1ybks_24 {
24
+ ._node_10nwy_24 {
25
25
  display: flex;
26
26
  justify-content: space-between;
27
27
  align-items: center;
@@ -30,26 +30,30 @@
30
30
  box-sizing: border-box;
31
31
  width: 100px;
32
32
  }
33
- ._label_1ybks_34 {
33
+ ._label_10nwy_34 {
34
34
  overflow: hidden;
35
35
  text-overflow: ellipsis;
36
36
  white-space: nowrap;
37
37
  }
38
- ._icon_1ybks_40 {
38
+ ._icon_10nwy_40 {
39
39
  margin-right: 4px;
40
40
  }
41
- ._actions_1ybks_44 {
41
+ ._actions_10nwy_44 {
42
42
  display: none;
43
43
  column-gap: 4px;
44
44
  }
45
- ._actions_1ybks_44 > button {
45
+ ._actions_10nwy_44 > button {
46
46
  margin-left: 0 !important;
47
47
  font-size: 1.2em;
48
+ border: 1px solid var(--el-border-color-light) !important;
48
49
  }
49
- ._remove_1ybks_53 {
50
+ ._actions_10nwy_44 > button:hover {
51
+ border-color: var(--el-border-color-dark) !important;
52
+ }
53
+ ._remove_10nwy_57 {
50
54
  transform: translateY(-1px);
51
55
  }
52
- ._loading_1ybks_57 {
56
+ ._loading_10nwy_61 {
53
57
  padding: 4px 8px;
54
58
  display: flex;
55
59
  align-items: center;
@@ -1,6 +1,6 @@
1
1
  /* source: src/components/input/input.vue */
2
2
  div._input_1vcoq_1 {
3
- width: var(--v2586680e);
3
+ width: var(--v5b821c9b);
4
4
  display: inline-flex;
5
5
  }
6
6
  div._input_1vcoq_1._block_1vcoq_5 {
@@ -2,4 +2,5 @@ export interface IInputProps {
2
2
  block?: boolean;
3
3
  width?: string;
4
4
  disabled?: boolean;
5
+ clearable?: boolean;
5
6
  }
@@ -10,11 +10,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
10
10
  props: {
11
11
  block: { type: Boolean, default: false },
12
12
  width: {},
13
- disabled: { type: Boolean, default: void 0 }
13
+ disabled: { type: Boolean, default: void 0 },
14
+ clearable: { type: Boolean, default: true }
14
15
  },
15
16
  setup(__props, { expose: __expose }) {
16
17
  useCssVars((_ctx) => ({
17
- "v2586680e": unref(myWidth)
18
+ "v5b821c9b": unref(myWidth)
18
19
  }));
19
20
  const props = __props;
20
21
  const $style = useCssModule();
@@ -34,7 +35,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
35
  ref_key: "inputRef",
35
36
  ref: inputRef,
36
37
  class: normalizeClass(unref(className)),
37
- disabled: unref(formDisabled)
38
+ disabled: unref(formDisabled),
39
+ clearable: __props.clearable
38
40
  }, createSlots({ _: 2 }, [
39
41
  _ctx.$slots.prefix ? {
40
42
  name: "prefix",
@@ -64,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
64
66
  ]),
65
67
  key: "3"
66
68
  } : void 0
67
- ]), 1032, ["class", "disabled"]);
69
+ ]), 1032, ["class", "disabled", "clearable"]);
68
70
  };
69
71
  }
70
72
  });
@@ -825,6 +825,7 @@ declare const __VLS_component: import('vue').DefineComponent<IInputProps, {
825
825
  }) | null>>;
826
826
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IInputProps> & Readonly<{}>, {
827
827
  disabled: boolean;
828
+ clearable: boolean;
828
829
  block: boolean;
829
830
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
830
831
  inputRef: ({
@@ -9,30 +9,12 @@ import { E as ElSpace } from '../../chunk/w7VqVeWU.mjs';
9
9
  import { defineComponent, ref, computed, watch, createBlock, unref, openBlock, withCtx, createElementBlock, Fragment, renderList, mergeProps, createTextVNode, toDisplayString, createVNode, createCommentVNode, normalizeClass, isRef, withDirectives, withKeys } from 'vue';
10
10
  import { useFormDisabled } from 'element-plus';
11
11
  import Draggable from 'vuedraggable-es-fix';
12
+ import { v as vFocus } from '../../chunk/CL65DvCP.mjs';
12
13
  import { C as Component$1 } from '../button/button.mjs';
13
14
  import { E as ElTag } from '../../chunk/DhGcJR5p.mjs';
14
15
  import { E as ElPopover } from '../../chunk/DQK0ezHm.mjs';
15
16
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
16
17
 
17
- const vFocus = {
18
- mounted: (el) => {
19
- let input;
20
- if (el.tagName === "input") {
21
- input = el;
22
- } else {
23
- const elInput = el.getElementsByTagName("input");
24
- if (elInput.length > 0) {
25
- input = elInput[0];
26
- }
27
- }
28
- if (input) {
29
- setTimeout(() => input.focus(), 0);
30
- const len = input.value.length;
31
- input.setSelectionRange(len, len);
32
- }
33
- }
34
- };
35
-
36
18
  const _sfc_main = /* @__PURE__ */ defineComponent({
37
19
  __name: "tags",
38
20
  props: {
@@ -298,8 +280,8 @@ const cssModules = {
298
280
  const Component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
299
281
 
300
282
  const __vite_glob_0_50 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
301
- __proto__: null,
302
- default: Component
283
+ __proto__: null,
284
+ default: Component
303
285
  }, Symbol.toStringTag, { value: 'Module' }));
304
286
 
305
287
  export { Component as C, __vite_glob_0_50 as _ };
@@ -1,42 +1,10 @@
1
1
  import './index.css'
2
2
  import { defineComponent, useTemplateRef, computed, ref, watch, nextTick, withDirectives, createCommentVNode, unref, createBlock, openBlock, mergeProps, isRef, createSlots, withCtx, renderSlot } from 'vue';
3
- import { i as index } from '../../chunk/BaJ7k5Lg.mjs';
4
- import '../../chunk/D9iEroQw.mjs';
3
+ import { t as thousand } from '../../chunk/Mq_fqKb4.mjs';
5
4
  import { C as Component$1 } from '../input/input.mjs';
6
5
  import { i as isEqual } from '../../chunk/q2jRgbir.mjs';
7
6
  import { _ as _export_sfc } from '../../chunk/pcqpp-6-.mjs';
8
7
 
9
- const thousand = {
10
- mounted: async (el, binding) => {
11
- const elInput = el.getElementsByTagName("input")[binding.value?.elInputIndex || 0] || el.getElementsByTagName("input")[0];
12
- elInput.style.textAlign = "right";
13
- elInput.style.fontFamily = "Pathway Gothic One";
14
- const disabled = elInput.disabled;
15
- elInput.disabled = true;
16
- const Cleave = await index.loadCdnSingle("cleave");
17
- const option = { decimalScale: 2, integerScale: 0, prefix: "", ...binding.value };
18
- elInput.cleave = new Cleave(elInput, {
19
- numeral: true,
20
- numeralThousandsGroupStyle: "thousand",
21
- numeralDecimalScale: option.decimalScale,
22
- numeralIntegerScale: option.integerScale,
23
- prefix: option.prefix
24
- });
25
- elInput.value = elInput.cleave?.properties?.result || "";
26
- elInput.disabled = disabled;
27
- },
28
- updated: (el, binding) => {
29
- setTimeout(() => {
30
- const event = new Event("input", { bubbles: true });
31
- const elInput = el.getElementsByTagName("input")[binding.value?.elInputIndex || 0] || el.getElementsByTagName("input")[0];
32
- elInput.dispatchEvent(event);
33
- if (elInput.cleave) {
34
- elInput.value = elInput.cleave?.properties?.result || "";
35
- }
36
- }, 0);
37
- }
38
- };
39
-
40
8
  const _sfc_main = /* @__PURE__ */ defineComponent({
41
9
  __name: "thousand-input",
42
10
  props: {
@@ -153,8 +121,8 @@ const cssModules = {
153
121
  const Component = /* @__PURE__ */ _export_sfc(_sfc_main, [["__cssModules", cssModules]]);
154
122
 
155
123
  const __vite_glob_0_52 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
156
- __proto__: null,
157
- default: Component
124
+ __proto__: null,
125
+ default: Component
158
126
  }, Symbol.toStringTag, { value: 'Module' }));
159
127
 
160
128
  export { Component as C, __vite_glob_0_52 as _ };
@@ -13,6 +13,7 @@ declare function __VLS_template(): {
13
13
  readonly block?: boolean | undefined;
14
14
  readonly width?: string | undefined;
15
15
  readonly disabled?: boolean | undefined;
16
+ readonly clearable?: boolean | undefined;
16
17
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
17
18
  $attrs: {
18
19
  [x: string]: unknown;
@@ -842,6 +843,7 @@ declare function __VLS_template(): {
842
843
  }) | null>>;
843
844
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
844
845
  disabled: boolean;
846
+ clearable: boolean;
845
847
  block: boolean;
846
848
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
847
849
  beforeCreate?: (() => void) | (() => void)[];
@@ -865,8 +867,9 @@ declare function __VLS_template(): {
865
867
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
866
868
  } & Readonly<{
867
869
  disabled: boolean;
870
+ clearable: boolean;
868
871
  block: boolean;
869
- }> & Omit<Readonly<import('../input/input').IInputProps> & Readonly<{}>, "inputRef" | ("disabled" | "block")> & import('vue').ShallowUnwrapRef<{
872
+ }> & Omit<Readonly<import('../input/input').IInputProps> & Readonly<{}>, "inputRef" | ("disabled" | "clearable" | "block")> & import('vue').ShallowUnwrapRef<{
870
873
  inputRef: Readonly<globalThis.ShallowRef<({
871
874
  $: import('vue').ComponentInternalInstance;
872
875
  $data: {};
@@ -1305,6 +1308,7 @@ declare const __VLS_component: import('vue').DefineComponent<IThousandInputProps
1305
1308
  readonly block?: boolean | undefined;
1306
1309
  readonly width?: string | undefined;
1307
1310
  readonly disabled?: boolean | undefined;
1311
+ readonly clearable?: boolean | undefined;
1308
1312
  } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
1309
1313
  $attrs: {
1310
1314
  [x: string]: unknown;
@@ -2134,6 +2138,7 @@ declare const __VLS_component: import('vue').DefineComponent<IThousandInputProps
2134
2138
  }) | null>>;
2135
2139
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
2136
2140
  disabled: boolean;
2141
+ clearable: boolean;
2137
2142
  block: boolean;
2138
2143
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
2139
2144
  beforeCreate?: (() => void) | (() => void)[];
@@ -2157,8 +2162,9 @@ declare const __VLS_component: import('vue').DefineComponent<IThousandInputProps
2157
2162
  $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
2158
2163
  } & Readonly<{
2159
2164
  disabled: boolean;
2165
+ clearable: boolean;
2160
2166
  block: boolean;
2161
- }> & Omit<Readonly<import('../input/input').IInputProps> & Readonly<{}>, "inputRef" | ("disabled" | "block")> & import('vue').ShallowUnwrapRef<{
2167
+ }> & Omit<Readonly<import('../input/input').IInputProps> & Readonly<{}>, "inputRef" | ("disabled" | "clearable" | "block")> & import('vue').ShallowUnwrapRef<{
2162
2168
  inputRef: Readonly<globalThis.ShallowRef<({
2163
2169
  $: import('vue').ComponentInternalInstance;
2164
2170
  $data: {};
@@ -0,0 +1,4 @@
1
+ import '../../chunk/BaJ7k5Lg.mjs';
2
+ import 'vue';
3
+ import '../../chunk/D9iEroQw.mjs';
4
+ export { c as default } from '../../chunk/DRLHgORP.mjs';
@@ -0,0 +1 @@
1
+ export { v as default } from '../../chunk/CL65DvCP.mjs';
@@ -0,0 +1,16 @@
1
+ import { _ as __vite_glob_0_0 } from '../chunk/DRLHgORP.mjs';
2
+ import { _ as __vite_glob_0_1 } from '../chunk/CL65DvCP.mjs';
3
+ import { _ as __vite_glob_0_2 } from '../chunk/Mq_fqKb4.mjs';
4
+
5
+ const modules = /* #__PURE__ */ Object.assign({"./cleave/index.ts": __vite_glob_0_0,"./focus/index.ts": __vite_glob_0_1,"./thousand/index.ts": __vite_glob_0_2});
6
+ function setupDirectives(app) {
7
+ Object.keys(modules).forEach((key) => {
8
+ const [, name] = key.match(/\/([a-z\-\d]+)\//) || [];
9
+ if (!name) {
10
+ return;
11
+ }
12
+ app.directive(name, modules[key].default);
13
+ });
14
+ }
15
+
16
+ export { setupDirectives as default };
@@ -0,0 +1,4 @@
1
+ import '../../chunk/BaJ7k5Lg.mjs';
2
+ import 'vue';
3
+ import '../../chunk/D9iEroQw.mjs';
4
+ export { t as default } from '../../chunk/Mq_fqKb4.mjs';
@@ -54,6 +54,9 @@ export { default as VcThousandInput } from './components/thousand-input/thousand
54
54
  export { default as VcTinymce } from './components/tinymce/tinymce.vue';
55
55
  export { default as VcTreePicker } from './components/tree-picker/tree-picker.vue';
56
56
  export { default as VcUploadFile } from './components/upload-file/upload-file.vue';
57
+ export { default as VcVCleave } from './directives/cleave';
58
+ export { default as VcVFocus } from './directives/focus';
59
+ export { default as VcVThousand } from './directives/thousand';
57
60
  declare function install(Vue: any): void;
58
61
  declare const _default: {
59
62
  version: string;
package/dist/es/index.mjs CHANGED
@@ -101,6 +101,9 @@ import { _ as __vite_glob_0_54 } from './components/tree-picker/tree-picker.mjs'
101
101
  export { C as VcTreePicker } from './components/tree-picker/tree-picker.mjs';
102
102
  import { _ as __vite_glob_0_55 } from './components/upload-file/upload-file.mjs';
103
103
  export { C as VcUploadFile } from './components/upload-file/upload-file.mjs';
104
+ export { c as VcVCleave } from './chunk/DRLHgORP.mjs';
105
+ export { v as VcVFocus } from './chunk/CL65DvCP.mjs';
106
+ export { t as VcVThousand } from './chunk/Mq_fqKb4.mjs';
104
107
 
105
108
  const __vite_glob_0_0 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
106
109
  __proto__: null,
@@ -147,7 +150,7 @@ const __vite_glob_0_46 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.definePr
147
150
  default: _sfc_main$8
148
151
  }, Symbol.toStringTag, { value: 'Module' }));
149
152
 
150
- const version = "1.5.2";
153
+ const version = "1.6.0";
151
154
 
152
155
  const modules = /* #__PURE__ */ Object.assign({"./components/awesome-icon/awesome-icon.vue": __vite_glob_0_0,"./components/backbottom/backbottom.vue": __vite_glob_0_1,"./components/button/button.vue": __vite_glob_0_2,"./components/chat-container/chat-container.vue": __vite_glob_0_3,"./components/choice-boolean/choice-boolean.vue": __vite_glob_0_4,"./components/choice/choice.vue": __vite_glob_0_5,"./components/color-switcher/color-switcher.vue": __vite_glob_0_6,"./components/config-provider/config-provider.vue": __vite_glob_0_7,"./components/cropper/cropper.vue": __vite_glob_0_8,"./components/currency/currency.vue": __vite_glob_0_9,"./components/dark-switcher/dark-switcher.vue": __vite_glob_0_10,"./components/daterange-picker/daterange-picker.vue": __vite_glob_0_11,"./components/dialog-camera-upload/dialog-camera-upload.vue": __vite_glob_0_12,"./components/dialog-map-point/dialog-map-point.vue": __vite_glob_0_13,"./components/dialog-upload-images/dialog-upload-images.vue": __vite_glob_0_14,"./components/dialog/dialog.vue": __vite_glob_0_15,"./components/drag-verify/drag-verify.vue": __vite_glob_0_16,"./components/drawer/drawer.vue": __vite_glob_0_17,"./components/easy-pagination/easy-pagination.vue": __vite_glob_0_18,"./components/el-icon/el-icon.vue": __vite_glob_0_19,"./components/explorer-column-table/explorer-column-table.vue": __vite_glob_0_20,"./components/explorer-container/explorer-container.vue": __vite_glob_0_21,"./components/explorer-filter/explorer-filter.vue": __vite_glob_0_22,"./components/explorer-footer/explorer-footer.vue": __vite_glob_0_23,"./components/explorer-form/explorer-form.vue": __vite_glob_0_24,"./components/explorer-list/explorer-list.vue": __vite_glob_0_25,"./components/explorer-panel/explorer-panel.vue": __vite_glob_0_26,"./components/explorer-query/explorer-query.vue": __vite_glob_0_27,"./components/explorer-table/explorer-table.vue": __vite_glob_0_28,"./components/explorer-tools/explorer-tools.vue": __vite_glob_0_29,"./components/explorer-tree/explorer-tree.vue": __vite_glob_0_30,"./components/explorer/explorer.vue": __vite_glob_0_31,"./components/flag/flag.vue": __vite_glob_0_32,"./components/icon-picker/icon-picker.vue": __vite_glob_0_33,"./components/icon/icon.vue": __vite_glob_0_34,"./components/iconify-icon/iconify-icon.vue": __vite_glob_0_35,"./components/image/image.vue": __vite_glob_0_36,"./components/input-number/input-number.vue": __vite_glob_0_37,"./components/input/input.vue": __vite_glob_0_38,"./components/pca-picker/pca-picker.vue": __vite_glob_0_39,"./components/qr-code/qr-code.vue": __vite_glob_0_40,"./components/screenfull/screenfull.vue": __vite_glob_0_41,"./components/scrollbar/scrollbar.vue": __vite_glob_0_42,"./components/select/select.vue": __vite_glob_0_43,"./components/single-player/single-player.vue": __vite_glob_0_44,"./components/splitter-panel/splitter-panel.vue": __vite_glob_0_45,"./components/splitter/splitter.vue": __vite_glob_0_46,"./components/svg-icon/svg-icon.vue": __vite_glob_0_47,"./components/switch/switch.vue": __vite_glob_0_48,"./components/sync-scroll-container/sync-scroll-container.vue": __vite_glob_0_49,"./components/tags/tags.vue": __vite_glob_0_50,"./components/text-ellipsis/text-ellipsis.vue": __vite_glob_0_51,"./components/thousand-input/thousand-input.vue": __vite_glob_0_52,"./components/tinymce/tinymce.vue": __vite_glob_0_53,"./components/tree-picker/tree-picker.vue": __vite_glob_0_54,"./components/upload-file/upload-file.vue": __vite_glob_0_55});
153
156
  const upper = (_, letter) => letter.toUpperCase();
package/dist/global.d.ts CHANGED
@@ -58,5 +58,10 @@ declare module 'vue' {
58
58
  VcTreePicker: typeof import('@wfrog/vc-ui')['VcTreePicker']
59
59
  VcUploadFile: typeof import('@wfrog/vc-ui')['VcUploadFile']
60
60
  }
61
+ export interface GlobalDirectives {
62
+ vCleave: typeof import('@wfrog/vc-ui')['VcVCleave']
63
+ vFocus: typeof import('@wfrog/vc-ui')['VcVFocus']
64
+ vThousand: typeof import('@wfrog/vc-ui')['VcVThousand']
65
+ }
61
66
  }
62
67
  export {}
package/dist/index.css CHANGED
@@ -650,7 +650,7 @@ div._main_m9nss_1 ._header_m9nss_48 {
650
650
  margin-left: 0 !important;
651
651
  }
652
652
  /* source: src/components/explorer-list/explorer-list.vue */
653
- ._item_5dblq_1 {
653
+ ._item_1xqvz_1 {
654
654
  padding: 4px 8px;
655
655
  cursor: pointer;
656
656
  display: flex;
@@ -662,38 +662,42 @@ div._main_m9nss_1 ._header_m9nss_48 {
662
662
  box-sizing: border-box;
663
663
  line-height: 1;
664
664
  }
665
- ._item_5dblq_1:hover {
665
+ ._item_1xqvz_1:hover {
666
666
  background-color: var(--el-color-primary-light-9);
667
667
  }
668
- ._item_5dblq_1:hover ._actions_5dblq_16 {
668
+ ._item_1xqvz_1:hover ._actions_1xqvz_16 {
669
669
  display: inline-flex;
670
670
  align-items: flex-start;
671
671
  }
672
- ._item_5dblq_1._active_5dblq_20 {
672
+ ._item_1xqvz_1._active_1xqvz_20 {
673
673
  color: var(--el-color-primary);
674
674
  background-color: var(--el-color-primary-light-9);
675
675
  }
676
- ._label_5dblq_25 {
676
+ ._label_1xqvz_25 {
677
677
  overflow: hidden;
678
678
  text-overflow: ellipsis;
679
679
  white-space: nowrap;
680
680
  }
681
- ._icon_5dblq_31 {
681
+ ._icon_1xqvz_31 {
682
682
  margin-right: 4px;
683
683
  }
684
- ._actions_5dblq_16 {
684
+ ._actions_1xqvz_16 {
685
685
  display: none;
686
686
  column-gap: 4px;
687
687
  }
688
- ._actions_5dblq_16 > button {
688
+ ._actions_1xqvz_16 > button {
689
689
  margin-left: 0 !important;
690
690
  font-size: 1.2em;
691
+ border: 1px solid var(--el-border-color-light) !important;
691
692
  }
692
- ._remove_5dblq_44 {
693
+ ._actions_1xqvz_16 > button:hover {
694
+ border-color: var(--el-border-color-dark) !important;
695
+ }
696
+ ._remove_1xqvz_48 {
693
697
  transform: translateY(-1px);
694
698
  }
695
- ._empty_5dblq_48,
696
- ._loading_5dblq_49 {
699
+ ._empty_1xqvz_52,
700
+ ._loading_1xqvz_53 {
697
701
  padding: 4px 8px;
698
702
  display: flex;
699
703
  align-items: center;
@@ -831,29 +835,29 @@ div._main_m9nss_1 ._header_m9nss_48 {
831
835
  z-index: 9999 !important;
832
836
  }
833
837
  /* source: src/components/explorer-tree/explorer-tree.vue */
834
- ._tree_1ybks_1 .el-tree-node__content {
838
+ ._tree_10nwy_1 .el-tree-node__content {
835
839
  display: flex;
836
840
  align-items: center;
837
841
  }
838
- ._tree_1ybks_1 .el-tree-node__content:hover {
842
+ ._tree_10nwy_1 .el-tree-node__content:hover {
839
843
  background-color: var(--el-color-primary-light-9);
840
844
  }
841
- ._tree_1ybks_1 .el-tree-node__content:hover .vc-actions {
845
+ ._tree_10nwy_1 .el-tree-node__content:hover .vc-actions {
842
846
  display: inline-flex;
843
847
  }
844
- ._tree_1ybks_1 .is-current > .el-tree-node__content {
848
+ ._tree_10nwy_1 .is-current > .el-tree-node__content {
845
849
  color: var(--el-color-primary);
846
850
  background-color: var(--el-color-primary-light-9);
847
851
  }
848
- ._tree_1ybks_1 .el-tree__empty-block {
852
+ ._tree_10nwy_1 .el-tree__empty-block {
849
853
  text-align: left;
850
854
  min-height: unset;
851
855
  padding: 4px 8px;
852
856
  }
853
- ._tree_1ybks_1 .el-tree__empty-text {
857
+ ._tree_10nwy_1 .el-tree__empty-text {
854
858
  position: static;
855
859
  }
856
- ._node_1ybks_24 {
860
+ ._node_10nwy_24 {
857
861
  display: flex;
858
862
  justify-content: space-between;
859
863
  align-items: center;
@@ -862,26 +866,30 @@ div._main_m9nss_1 ._header_m9nss_48 {
862
866
  box-sizing: border-box;
863
867
  width: 100px;
864
868
  }
865
- ._label_1ybks_34 {
869
+ ._label_10nwy_34 {
866
870
  overflow: hidden;
867
871
  text-overflow: ellipsis;
868
872
  white-space: nowrap;
869
873
  }
870
- ._icon_1ybks_40 {
874
+ ._icon_10nwy_40 {
871
875
  margin-right: 4px;
872
876
  }
873
- ._actions_1ybks_44 {
877
+ ._actions_10nwy_44 {
874
878
  display: none;
875
879
  column-gap: 4px;
876
880
  }
877
- ._actions_1ybks_44 > button {
881
+ ._actions_10nwy_44 > button {
878
882
  margin-left: 0 !important;
879
883
  font-size: 1.2em;
884
+ border: 1px solid var(--el-border-color-light) !important;
885
+ }
886
+ ._actions_10nwy_44 > button:hover {
887
+ border-color: var(--el-border-color-dark) !important;
880
888
  }
881
- ._remove_1ybks_53 {
889
+ ._remove_10nwy_57 {
882
890
  transform: translateY(-1px);
883
891
  }
884
- ._loading_1ybks_57 {
892
+ ._loading_10nwy_61 {
885
893
  padding: 4px 8px;
886
894
  display: flex;
887
895
  align-items: center;
@@ -1082,7 +1090,7 @@ div._el-input-number_1piks_18 .el-input__inner {
1082
1090
  }
1083
1091
  /* source: src/components/input/input.vue */
1084
1092
  div._input_1vcoq_1 {
1085
- width: var(--v2586680e);
1093
+ width: var(--v5b821c9b);
1086
1094
  display: inline-flex;
1087
1095
  }
1088
1096
  div._input_1vcoq_1._block_1vcoq_5 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wfrog/vc-ui",
3
- "version": "1.5.3",
3
+ "version": "1.6.0",
4
4
  "packageManager": "pnpm@10.20.0",
5
5
  "description": "vue3 组件库 vc-ui",
6
6
  "author": "wellfrog",
@@ -22,10 +22,19 @@
22
22
  "types": "./dist/es/components/*/index.d.ts",
23
23
  "default": "./dist/es/components/*/index.mjs"
24
24
  },
25
+ "./es/directives/*/type": "./dist/es/directives/*/index.d.ts",
26
+ "./es/directives/*": {
27
+ "types": "./dist/es/directives/*/index.d.ts",
28
+ "default": "./dist/es/directives/*/index.mjs"
29
+ },
25
30
  "./resolver": {
26
31
  "types": "./dist/es/utils/resolver.d.ts",
27
32
  "default": "./dist/es/utils/resolver.mjs"
28
33
  },
34
+ "./directives": {
35
+ "types": "./dist/es/directives/index.d.ts",
36
+ "default": "./dist/es/directives/index.mjs"
37
+ },
29
38
  "./*": "./dist/*"
30
39
  },
31
40
  "main": "dist/es/index.mjs",
@@ -1,14 +0,0 @@
1
- declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<{
2
- data: {
3
- type: ObjectConstructor;
4
- default: () => {};
5
- };
6
- }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
7
- data: {
8
- type: ObjectConstructor;
9
- default: () => {};
10
- };
11
- }>> & Readonly<{}>, {
12
- data: Record<string, any>;
13
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
14
- export default _default;
@@ -1,19 +0,0 @@
1
- declare function __VLS_template(): {
2
- attrs: Partial<{}>;
3
- slots: {
4
- default?(_: {
5
- direction: string;
6
- }): any;
7
- };
8
- refs: {};
9
- rootEl: any;
10
- };
11
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
13
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
14
- export default _default;
15
- type __VLS_WithTemplateSlots<T, S> = T & {
16
- new (): {
17
- $slots: S;
18
- };
19
- };