@gct-paas/v-ben 0.1.4-dev.10 → 0.1.4-dev.11

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 (56) hide show
  1. package/dist/index.esm.min.mjs +793 -2
  2. package/dist/index.min.cjs +1 -1
  3. package/dist/index.min.css +1 -0
  4. package/dist/index.system.min.js +1 -1
  5. package/es/_virtual/_plugin-vue_export-helper.mjs +9 -0
  6. package/es/components/index.d.ts +3 -0
  7. package/es/components/v-ben-button/index.d.ts +133 -0
  8. package/es/components/v-ben-button/index.mjs +9 -0
  9. package/es/components/v-ben-button/src/BasicButton.vue.d.ts +75 -0
  10. package/es/components/v-ben-button/src/BasicButton.vue.mjs +40 -0
  11. package/es/components/v-ben-button/src/BasicButton.vue2.mjs +5 -0
  12. package/es/components/v-ben-button/src/PopConfirmButton.vue.d.ts +24 -0
  13. package/es/components/v-ben-button/src/PopConfirmButton.vue.mjs +46 -0
  14. package/es/components/v-ben-button/src/PopConfirmButton.vue2.mjs +5 -0
  15. package/es/components/v-ben-button/src/custom-button.css +64 -0
  16. package/es/components/v-ben-button/src/custom-button.vue.d.ts +27 -0
  17. package/es/components/v-ben-button/src/custom-button.vue.mjs +7 -0
  18. package/es/components/v-ben-button/src/custom-button.vue3.mjs +32 -0
  19. package/es/components/v-ben-button/src/props.d.ts +38 -0
  20. package/es/components/v-ben-button/src/props.mjs +29 -0
  21. package/es/components/v-ben-dropdown/index.d.ts +85 -0
  22. package/es/components/v-ben-dropdown/index.mjs +5 -0
  23. package/es/components/v-ben-dropdown/src/Dropdown.vue.d.ts +66 -0
  24. package/es/components/v-ben-dropdown/src/Dropdown.vue.mjs +113 -0
  25. package/es/components/v-ben-dropdown/src/Dropdown.vue2.mjs +5 -0
  26. package/es/components/v-ben-dropdown/src/typing.d.ts +10 -0
  27. package/es/components/v-ben-table/index.d.ts +3 -0
  28. package/es/components/v-ben-table/src/BasicTable.vue.d.ts +410 -0
  29. package/es/components/v-ben-table/src/BasicTable.vue.mjs +53 -0
  30. package/es/components/v-ben-table/src/BasicTable.vue2.mjs +48 -0
  31. package/es/components/v-ben-table/src/components/HeaderCell.vue.d.ts +20 -0
  32. package/es/components/v-ben-table/src/components/HeaderCell.vue.mjs +10 -0
  33. package/es/components/v-ben-table/src/components/HeaderCell.vue2.mjs +20 -0
  34. package/es/components/v-ben-table/src/components/TableAction.css +37 -0
  35. package/es/components/v-ben-table/src/components/TableAction.vue.d.ts +61 -0
  36. package/es/components/v-ben-table/src/components/TableAction.vue.mjs +174 -0
  37. package/es/components/v-ben-table/src/components/TableAction.vue3.mjs +6 -0
  38. package/es/components/v-ben-table/src/components/TableActionAuto.css +37 -0
  39. package/es/components/v-ben-table/src/components/TableActionAuto.vue.d.ts +61 -0
  40. package/es/components/v-ben-table/src/components/TableActionAuto.vue.mjs +181 -0
  41. package/es/components/v-ben-table/src/components/TableActionAuto.vue3.mjs +6 -0
  42. package/es/components/v-ben-table/src/props.d.ts +186 -0
  43. package/es/components/v-ben-table/src/props.mjs +136 -0
  44. package/es/components/v-ben-table/src/types/column.d.ts +164 -0
  45. package/es/components/v-ben-table/src/types/componentType.d.ts +1 -0
  46. package/es/components/v-ben-table/src/types/pagination.d.ts +93 -0
  47. package/es/components/v-ben-table/src/types/table.d.ts +356 -0
  48. package/es/components/v-ben-table/src/types/tableAction.d.ts +24 -0
  49. package/es/hooks/useDesign.d.ts +5 -0
  50. package/es/hooks/useDesign.mjs +9 -0
  51. package/es/index.d.ts +2 -0
  52. package/es/index.mjs +10 -0
  53. package/es/types/index.d.ts +18 -0
  54. package/es/utils/is.d.ts +23 -0
  55. package/es/utils/is.mjs +78 -0
  56. package/package.json +8 -5
@@ -0,0 +1,85 @@
1
+ export * from './src/typing';
2
+ export declare const Dropdown: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
4
+ popconfirm: BooleanConstructor;
5
+ trigger: {
6
+ type: import('vue').PropType<("contextmenu" | "click" | "hover")[]>;
7
+ default: () => string[];
8
+ };
9
+ dropMenuList: {
10
+ type: import('vue').PropType<(import('.').DropMenu & IObject)[]>;
11
+ default: () => never[];
12
+ };
13
+ selectedKeys: {
14
+ type: import('vue').PropType<string[]>;
15
+ default: () => never[];
16
+ };
17
+ }>> & Readonly<{
18
+ onMenuEvent?: ((...args: any[]) => any) | undefined;
19
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ menuEvent: (...args: any[]) => void;
21
+ }, import('vue').PublicProps, {
22
+ trigger: ("hover" | "click" | "contextmenu")[];
23
+ popconfirm: boolean;
24
+ dropMenuList: (import('.').DropMenu & IObject)[];
25
+ selectedKeys: string[];
26
+ }, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
27
+ P: {};
28
+ B: {};
29
+ D: {};
30
+ C: {};
31
+ M: {};
32
+ Defaults: {};
33
+ }, Readonly<import('vue').ExtractPropTypes<{
34
+ popconfirm: BooleanConstructor;
35
+ trigger: {
36
+ type: import('vue').PropType<("contextmenu" | "click" | "hover")[]>;
37
+ default: () => string[];
38
+ };
39
+ dropMenuList: {
40
+ type: import('vue').PropType<(import('.').DropMenu & IObject)[]>;
41
+ default: () => never[];
42
+ };
43
+ selectedKeys: {
44
+ type: import('vue').PropType<string[]>;
45
+ default: () => never[];
46
+ };
47
+ }>> & Readonly<{
48
+ onMenuEvent?: ((...args: any[]) => any) | undefined;
49
+ }>, {}, {}, {}, {}, {
50
+ trigger: ("hover" | "click" | "contextmenu")[];
51
+ popconfirm: boolean;
52
+ dropMenuList: (import('.').DropMenu & IObject)[];
53
+ selectedKeys: string[];
54
+ }>;
55
+ __isFragment?: never;
56
+ __isTeleport?: never;
57
+ __isSuspense?: never;
58
+ } & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
59
+ popconfirm: BooleanConstructor;
60
+ trigger: {
61
+ type: import('vue').PropType<("contextmenu" | "click" | "hover")[]>;
62
+ default: () => string[];
63
+ };
64
+ dropMenuList: {
65
+ type: import('vue').PropType<(import('.').DropMenu & IObject)[]>;
66
+ default: () => never[];
67
+ };
68
+ selectedKeys: {
69
+ type: import('vue').PropType<string[]>;
70
+ default: () => never[];
71
+ };
72
+ }>> & Readonly<{
73
+ onMenuEvent?: ((...args: any[]) => any) | undefined;
74
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
75
+ menuEvent: (...args: any[]) => void;
76
+ }, string, {
77
+ trigger: ("hover" | "click" | "contextmenu")[];
78
+ popconfirm: boolean;
79
+ dropMenuList: (import('.').DropMenu & IObject)[];
80
+ selectedKeys: string[];
81
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
82
+ $slots: {
83
+ default?(_: {}): any;
84
+ };
85
+ });
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './src/Dropdown.vue.mjs';
2
+
3
+ const Dropdown = _sfc_main;
4
+
5
+ export { Dropdown };
@@ -0,0 +1,66 @@
1
+ import { PropType } from 'vue';
2
+ import { DropMenu } from './typing';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: {
6
+ default?(_: {}): 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').ExtractPropTypes<{
13
+ popconfirm: BooleanConstructor;
14
+ /**
15
+ * the trigger mode which executes the drop-down action
16
+ * @default ['hover']
17
+ * @type string[]
18
+ */
19
+ trigger: {
20
+ type: PropType<("contextmenu" | "click" | "hover")[]>;
21
+ default: () => string[];
22
+ };
23
+ dropMenuList: {
24
+ type: PropType<(DropMenu & IObject)[]>;
25
+ default: () => never[];
26
+ };
27
+ selectedKeys: {
28
+ type: PropType<string[]>;
29
+ default: () => never[];
30
+ };
31
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
32
+ menuEvent: (...args: any[]) => void;
33
+ }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
34
+ popconfirm: BooleanConstructor;
35
+ /**
36
+ * the trigger mode which executes the drop-down action
37
+ * @default ['hover']
38
+ * @type string[]
39
+ */
40
+ trigger: {
41
+ type: PropType<("contextmenu" | "click" | "hover")[]>;
42
+ default: () => string[];
43
+ };
44
+ dropMenuList: {
45
+ type: PropType<(DropMenu & IObject)[]>;
46
+ default: () => never[];
47
+ };
48
+ selectedKeys: {
49
+ type: PropType<string[]>;
50
+ default: () => never[];
51
+ };
52
+ }>> & Readonly<{
53
+ onMenuEvent?: ((...args: any[]) => any) | undefined;
54
+ }>, {
55
+ trigger: ("hover" | "click" | "contextmenu")[];
56
+ popconfirm: boolean;
57
+ dropMenuList: (DropMenu & IObject)[];
58
+ selectedKeys: string[];
59
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
60
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
61
+ export default _default;
62
+ type __VLS_WithTemplateSlots<T, S> = T & {
63
+ new (): {
64
+ $slots: S;
65
+ };
66
+ };
@@ -0,0 +1,113 @@
1
+ import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, renderSlot, createTextVNode, toDisplayString, createVNode, createElementBlock, Fragment, renderList, createCommentVNode } from 'vue';
2
+ import { Menu, Dropdown, Popconfirm } from 'ant-design-vue';
3
+ import { omit } from 'lodash-es';
4
+ import { isFunction } from '../../../utils/is.mjs';
5
+
6
+ const _hoisted_1 = { class: "ml-1" };
7
+ const _hoisted_2 = {
8
+ key: 1,
9
+ class: "ml-1"
10
+ };
11
+ const _sfc_main = /* @__PURE__ */ defineComponent({
12
+ ...{
13
+ name: "VDropdown"
14
+ },
15
+ __name: "Dropdown",
16
+ props: {
17
+ popconfirm: Boolean,
18
+ /**
19
+ * the trigger mode which executes the drop-down action
20
+ * @default ['hover']
21
+ * @type string[]
22
+ */
23
+ trigger: {
24
+ type: Array,
25
+ default: () => {
26
+ return ["contextmenu"];
27
+ }
28
+ },
29
+ dropMenuList: {
30
+ type: Array,
31
+ default: () => []
32
+ },
33
+ selectedKeys: {
34
+ type: Array,
35
+ default: () => []
36
+ }
37
+ },
38
+ emits: ["menuEvent"],
39
+ setup(__props, { emit: __emit }) {
40
+ const ADropdown = Dropdown;
41
+ const AMenu = Menu;
42
+ const AMenuItem = Menu.Item;
43
+ const AMenuDivider = Menu.Divider;
44
+ const APopconfirm = Popconfirm;
45
+ const props = __props;
46
+ const emit = __emit;
47
+ function handleClickMenu(item) {
48
+ const { event } = item;
49
+ const menu = props.dropMenuList.find((item2) => `${item2.event}` === `${event}`);
50
+ emit("menuEvent", menu);
51
+ item.onClick?.();
52
+ }
53
+ function getPopConfirmAttrs(attrs) {
54
+ const originAttrs = omit(attrs, ["confirm", "cancel", "icon"]);
55
+ if (!attrs.onConfirm && attrs.confirm && isFunction(attrs.confirm))
56
+ originAttrs["onConfirm"] = attrs.confirm;
57
+ if (!attrs.onCancel && attrs.cancel && isFunction(attrs.cancel))
58
+ originAttrs["onCancel"] = attrs.cancel;
59
+ return originAttrs;
60
+ }
61
+ const getAttr = (key) => ({ key });
62
+ return (_ctx, _cache) => {
63
+ return openBlock(), createBlock(unref(ADropdown), mergeProps({ trigger: __props.trigger }, _ctx.$attrs), {
64
+ overlay: withCtx(() => [
65
+ createVNode(unref(AMenu), { "selected-keys": __props.selectedKeys }, {
66
+ default: withCtx(() => [
67
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.dropMenuList, (item) => {
68
+ return openBlock(), createElementBlock(Fragment, {
69
+ key: `${item.event}`
70
+ }, [
71
+ createVNode(unref(AMenuItem), mergeProps({
72
+ class: item.class
73
+ }, { ref_for: true }, getAttr(item.event), {
74
+ disabled: item.disabled,
75
+ onClick: ($event) => handleClickMenu(item)
76
+ }), {
77
+ default: withCtx(() => [
78
+ __props.popconfirm && item.popConfirm ? (openBlock(), createBlock(unref(APopconfirm), mergeProps({
79
+ key: 0,
80
+ ref_for: true
81
+ }, getPopConfirmAttrs(item.popConfirm)), {
82
+ default: withCtx(() => [
83
+ createElementVNode("div", null, [
84
+ createElementVNode("span", _hoisted_1, toDisplayString(item.text), 1)
85
+ ])
86
+ ]),
87
+ _: 2
88
+ }, 1040)) : (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(item.text), 1))
89
+ ]),
90
+ _: 2
91
+ }, 1040, ["class", "disabled", "onClick"]),
92
+ item.divider ? (openBlock(), createBlock(unref(AMenuDivider), {
93
+ key: `d-${item.event}`
94
+ })) : createCommentVNode("", true)
95
+ ], 64);
96
+ }), 128))
97
+ ]),
98
+ _: 1
99
+ }, 8, ["selected-keys"])
100
+ ]),
101
+ default: withCtx(() => [
102
+ createElementVNode("span", null, [
103
+ renderSlot(_ctx.$slots, "default")
104
+ ]),
105
+ createTextVNode(" " + toDisplayString(__props.dropMenuList) + " ", 1)
106
+ ]),
107
+ _: 3
108
+ }, 16, ["trigger"]);
109
+ };
110
+ }
111
+ });
112
+
113
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './Dropdown.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,10 @@
1
+ export interface DropMenu {
2
+ onClick?: Fn;
3
+ to?: string;
4
+ icon?: string;
5
+ event: string | number;
6
+ text: string;
7
+ disabled?: boolean;
8
+ divider?: boolean;
9
+ class?: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ export { default as BasicTable } from './src/BasicTable.vue';
2
+ export { default as TableAction } from './src/components/TableAction.vue';
3
+ export { default as TableActionAuto } from './src/components/TableActionAuto.vue';