jky-component-lib 0.0.122 → 0.0.125

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 (127) hide show
  1. package/dist/es/add-input/AddInput.vue.d.ts +27 -0
  2. package/dist/es/add-input/index.d.ts +5 -0
  3. package/dist/es/amap/AMap.vue.d.ts +61 -0
  4. package/dist/es/amap/AMarker.vue.d.ts +38 -0
  5. package/dist/es/amap/ATrackPlayback.vue.d.ts +69 -0
  6. package/dist/es/amap/index.d.ts +9 -0
  7. package/dist/es/amap/style.css +2 -13
  8. package/dist/es/amap/style2.css +6 -2
  9. package/dist/es/amap/style3.css +12 -5
  10. package/dist/es/button/Button.vue.d.ts +33 -0
  11. package/dist/es/button/index.d.ts +4 -0
  12. package/dist/es/button-nav/ButtonNav.vue.d.ts +36 -0
  13. package/dist/es/button-nav/index.d.ts +4 -0
  14. package/dist/es/code-mirror-editor/CodeMirrorEditor.vue.d.ts +25 -0
  15. package/dist/es/code-mirror-editor/index.d.ts +5 -0
  16. package/dist/es/components.d.ts +18 -0
  17. package/dist/es/form/Form.vue.d.ts +461 -0
  18. package/dist/es/form/Form.vue.js +15 -24
  19. package/dist/es/form/FormItem.vue.d.ts +6 -0
  20. package/dist/es/form/FormItem.vue.js +49 -7
  21. package/dist/es/form/SelectTable.vue.d.ts +38 -0
  22. package/dist/es/form/index.d.ts +5 -0
  23. package/dist/es/index.d.ts +8 -0
  24. package/dist/es/menu/Menu.vue.d.ts +23 -0
  25. package/dist/es/menu/MenuItem.vue.d.ts +7 -0
  26. package/dist/es/menu/index.d.ts +5 -0
  27. package/dist/es/modal/Footer.vue.d.ts +10 -0
  28. package/dist/es/modal/Header.vue.d.ts +37 -0
  29. package/dist/es/modal/Modal.vue.d.ts +75 -0
  30. package/dist/es/modal/index.d.ts +5 -0
  31. package/dist/es/package.json.js +1 -1
  32. package/dist/es/page-header/PageHeader.vue.d.ts +31 -0
  33. package/dist/es/page-header/PopoverMenu.vue.d.ts +13 -0
  34. package/dist/es/page-header/index.d.ts +5 -0
  35. package/dist/es/page-layout/PageLayout.vue.d.ts +18 -0
  36. package/dist/es/page-layout/index.d.ts +5 -0
  37. package/dist/es/page-table/ActionColumn.vue.d.ts +11 -0
  38. package/dist/es/page-table/ActionColumn.vue.js +12 -6
  39. package/dist/es/page-table/PageTable.vue.d.ts +5579 -0
  40. package/dist/es/page-table/PageTable.vue.js +11 -4
  41. package/dist/es/page-table/PageTableColumn.vue.d.ts +36 -0
  42. package/dist/es/page-table/Toolbar.vue.d.ts +33 -0
  43. package/dist/es/page-table/index.d.ts +9 -0
  44. package/dist/es/page-table-v2/PageTableV2.vue.d.ts +1026 -0
  45. package/dist/es/page-table-v2/index.d.ts +4 -0
  46. package/dist/es/resolver.d.ts +2 -0
  47. package/dist/es/rich-editor/RichEditor.vue.d.ts +78 -0
  48. package/dist/es/rich-editor/index.d.ts +5 -0
  49. package/dist/es/say-hello/SayHello.vue.d.ts +5 -0
  50. package/dist/es/say-hello/index.d.ts +4 -0
  51. package/dist/es/style.css +32 -0
  52. package/dist/es/tabs/ContextMenu.vue.d.ts +30 -0
  53. package/dist/es/tabs/Tabs.vue.d.ts +13 -0
  54. package/dist/es/tabs/config.d.ts +2 -0
  55. package/dist/es/tabs/createTabsGuard.d.ts +5 -0
  56. package/dist/es/tabs/index.d.ts +7 -0
  57. package/dist/es/tabs/useTabsStore.d.ts +6 -0
  58. package/dist/es/utils/index.d.ts +5 -0
  59. package/dist/es/utils/installer.d.ts +13 -0
  60. package/dist/es/utils/responsive-toolbar.d.ts +78 -0
  61. package/dist/es/utils/string.d.ts +18 -0
  62. package/dist/es/utils/types.d.ts +12 -0
  63. package/dist/es/utils/with-install.d.ts +2 -0
  64. package/dist/lib/add-input/AddInput.vue.d.ts +27 -0
  65. package/dist/lib/add-input/index.d.ts +5 -0
  66. package/dist/lib/amap/AMap.vue.d.ts +61 -0
  67. package/dist/lib/amap/AMarker.vue.d.ts +38 -0
  68. package/dist/lib/amap/ATrackPlayback.vue.d.ts +69 -0
  69. package/dist/lib/amap/index.d.ts +9 -0
  70. package/dist/lib/amap/style.css +2 -13
  71. package/dist/lib/amap/style2.css +6 -2
  72. package/dist/lib/amap/style3.css +12 -5
  73. package/dist/lib/button/Button.vue.d.ts +33 -0
  74. package/dist/lib/button/index.d.ts +4 -0
  75. package/dist/lib/button-nav/ButtonNav.vue.d.ts +36 -0
  76. package/dist/lib/button-nav/index.d.ts +4 -0
  77. package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue.d.ts +25 -0
  78. package/dist/lib/code-mirror-editor/index.d.ts +5 -0
  79. package/dist/lib/components.d.ts +18 -0
  80. package/dist/lib/form/Form.vue.d.ts +461 -0
  81. package/dist/lib/form/Form.vue.js +15 -24
  82. package/dist/lib/form/FormItem.vue.d.ts +6 -0
  83. package/dist/lib/form/FormItem.vue.js +49 -7
  84. package/dist/lib/form/SelectTable.vue.d.ts +38 -0
  85. package/dist/lib/form/index.d.ts +5 -0
  86. package/dist/lib/index.d.ts +8 -0
  87. package/dist/lib/menu/Menu.vue.d.ts +23 -0
  88. package/dist/lib/menu/MenuItem.vue.d.ts +7 -0
  89. package/dist/lib/menu/index.d.ts +5 -0
  90. package/dist/lib/modal/Footer.vue.d.ts +10 -0
  91. package/dist/lib/modal/Header.vue.d.ts +37 -0
  92. package/dist/lib/modal/Modal.vue.d.ts +75 -0
  93. package/dist/lib/modal/index.d.ts +5 -0
  94. package/dist/lib/package.json.js +1 -1
  95. package/dist/lib/page-header/PageHeader.vue.d.ts +31 -0
  96. package/dist/lib/page-header/PopoverMenu.vue.d.ts +13 -0
  97. package/dist/lib/page-header/index.d.ts +5 -0
  98. package/dist/lib/page-layout/PageLayout.vue.d.ts +18 -0
  99. package/dist/lib/page-layout/index.d.ts +5 -0
  100. package/dist/lib/page-table/ActionColumn.vue.d.ts +11 -0
  101. package/dist/lib/page-table/ActionColumn.vue.js +12 -6
  102. package/dist/lib/page-table/PageTable.vue.d.ts +5579 -0
  103. package/dist/lib/page-table/PageTable.vue.js +11 -4
  104. package/dist/lib/page-table/PageTableColumn.vue.d.ts +36 -0
  105. package/dist/lib/page-table/Toolbar.vue.d.ts +33 -0
  106. package/dist/lib/page-table/index.d.ts +9 -0
  107. package/dist/lib/page-table-v2/PageTableV2.vue.d.ts +1026 -0
  108. package/dist/lib/page-table-v2/index.d.ts +4 -0
  109. package/dist/lib/resolver.d.ts +2 -0
  110. package/dist/lib/rich-editor/RichEditor.vue.d.ts +78 -0
  111. package/dist/lib/rich-editor/index.d.ts +5 -0
  112. package/dist/lib/say-hello/SayHello.vue.d.ts +5 -0
  113. package/dist/lib/say-hello/index.d.ts +4 -0
  114. package/dist/lib/style.css +32 -0
  115. package/dist/lib/tabs/ContextMenu.vue.d.ts +30 -0
  116. package/dist/lib/tabs/Tabs.vue.d.ts +13 -0
  117. package/dist/lib/tabs/config.d.ts +2 -0
  118. package/dist/lib/tabs/createTabsGuard.d.ts +5 -0
  119. package/dist/lib/tabs/index.d.ts +7 -0
  120. package/dist/lib/tabs/useTabsStore.d.ts +6 -0
  121. package/dist/lib/utils/index.d.ts +5 -0
  122. package/dist/lib/utils/installer.d.ts +13 -0
  123. package/dist/lib/utils/responsive-toolbar.d.ts +78 -0
  124. package/dist/lib/utils/string.d.ts +18 -0
  125. package/dist/lib/utils/types.d.ts +12 -0
  126. package/dist/lib/utils/with-install.d.ts +2 -0
  127. package/package.json +2 -2
@@ -88,6 +88,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
88
88
  model: {},
89
89
  readonly: { type: [Boolean, Function], default: false },
90
90
  disabled: { type: Boolean, default: false },
91
+ span: {},
91
92
  label: {},
92
93
  labelWidth: {},
93
94
  labelPosition: {},
@@ -105,6 +106,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
105
106
  const props = __props;
106
107
  const loading = vue.ref(false);
107
108
  const componentProps = vue.ref({});
109
+ const rules = vue.ref(null);
108
110
  function loadComponentProps() {
109
111
  return __async(this, null, function* () {
110
112
  const configProps = props.config.componentProps;
@@ -132,14 +134,43 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
132
134
  componentProps.value = configProps;
133
135
  });
134
136
  }
137
+ function loadRules() {
138
+ return __async(this, null, function* () {
139
+ const configRules = props.config.rules;
140
+ if (!configRules) {
141
+ rules.value = null;
142
+ return;
143
+ }
144
+ if (typeof configRules === "function") {
145
+ loading.value = true;
146
+ try {
147
+ const result = yield configRules({
148
+ model: props.model,
149
+ field: props.field,
150
+ $form: props.model
151
+ });
152
+ rules.value = result || null;
153
+ } catch (error) {
154
+ console.error("Failed to load rules:", error);
155
+ rules.value = null;
156
+ } finally {
157
+ loading.value = false;
158
+ }
159
+ return;
160
+ }
161
+ rules.value = configRules;
162
+ });
163
+ }
135
164
  vue.watch(
136
165
  () => props.model,
137
166
  () => {
138
167
  loadComponentProps();
168
+ loadRules();
139
169
  },
140
170
  { deep: true }
141
171
  );
142
172
  loadComponentProps();
173
+ loadRules();
143
174
  const modelValue = vue.computed({
144
175
  get: () => props.model[props.field],
145
176
  set: (val) => {
@@ -265,11 +296,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
265
296
  return vue.h(ElementPlus.ElAutocomplete, autocompleteProps, _componentSlotsObj);
266
297
  }
267
298
  case "datepicker":
268
- return vue.h(ElementPlus.ElDatePicker, __spreadValues(__spreadValues({}, commonProps), componentProps.value), _componentSlotsObj);
299
+ return vue.h(ElementPlus.ElDatePicker, __spreadValues(__spreadValues({
300
+ startPlaceholder: "开始日期",
301
+ endPlaceholder: "结束日期"
302
+ }, commonProps), componentProps.value), _componentSlotsObj);
269
303
  case "datetime-picker":
270
- return vue.h(ElementPlus.ElDatePicker, __spreadValues(__spreadValues({}, commonProps), componentProps.value), _componentSlotsObj);
304
+ return vue.h(ElementPlus.ElDatePicker, __spreadValues(__spreadValues({
305
+ startPlaceholder: "开始日期",
306
+ endPlaceholder: "结束日期"
307
+ }, commonProps), componentProps.value), _componentSlotsObj);
271
308
  case "time-picker":
272
- return vue.h(ElementPlus.ElTimePicker, __spreadValues(__spreadValues({}, commonProps), componentProps.value), _componentSlotsObj);
309
+ return vue.h(ElementPlus.ElTimePicker, __spreadValues(__spreadValues({
310
+ startPlaceholder: "开始时间",
311
+ endPlaceholder: "结束时间"
312
+ }, commonProps), componentProps.value), _componentSlotsObj);
273
313
  case "time-select":
274
314
  return vue.h(ElementPlus.ElTimeSelect, __spreadValues(__spreadValues({}, commonProps), componentProps.value), _componentSlotsObj);
275
315
  case "radio-group": {
@@ -509,7 +549,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
509
549
  return (_ctx, _cache) => {
510
550
  return isHidden.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1)) : __props.config.title && !__props.config.label ? (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElFormItem), vue.mergeProps({
511
551
  key: 1,
512
- prop: __props.field
552
+ prop: __props.field,
553
+ rules: rules.value
513
554
  }, __spreadValues(__spreadValues({}, formItemProps.value), _ctx.$attrs), {
514
555
  class: ["jky-form-item jky-form-item--no-label", [__props.config.useDefaultBorderClass ? "border-l-4 border-solid border-l-(--el-color-primary) bg-(--el-color-primary)/50 pl-1.5" : "", __props.config.class]],
515
556
  style: [__props.config.customStyle]
@@ -525,10 +566,11 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
525
566
  __props.config.help && !__props.config.help.tooltip ? (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderHelpText()), { key: 0 })) : vue.createCommentVNode("", true)
526
567
  ]),
527
568
  _: 1
528
- }, 16, ["prop", "class", "style"])) : (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElFormItem), vue.mergeProps({
569
+ }, 16, ["prop", "rules", "class", "style"])) : (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElFormItem), vue.mergeProps({
529
570
  key: 2,
530
571
  label: __props.config.label,
531
- prop: __props.field
572
+ prop: __props.field,
573
+ rules: rules.value
532
574
  }, __spreadValues(__spreadValues({}, formItemProps.value), _ctx.$attrs), {
533
575
  class: ["jky-form-item", [__props.config.class]]
534
576
  }), vue.createSlots({
@@ -552,7 +594,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
552
594
  ]),
553
595
  key: "0"
554
596
  } : void 0
555
- ]), 1040, ["label", "prop", "class"]));
597
+ ]), 1040, ["label", "prop", "rules", "class"]));
556
598
  };
557
599
  }
558
600
  }));
@@ -0,0 +1,38 @@
1
+ import { SelectTableProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SelectTableProps>, {
3
+ multiple: boolean;
4
+ labelField: string;
5
+ idField: string;
6
+ readonly: boolean;
7
+ disabled: boolean;
8
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
9
+ "update:modelValue": (value: string | number | (string | number)[]) => any;
10
+ change: (value: string | number | (string | number)[], selectedData: any[]) => any;
11
+ }, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SelectTableProps>, {
12
+ multiple: boolean;
13
+ labelField: string;
14
+ idField: string;
15
+ readonly: boolean;
16
+ disabled: boolean;
17
+ }>>> & Readonly<{
18
+ "onUpdate:modelValue"?: ((value: string | number | (string | number)[]) => any) | undefined;
19
+ onChange?: ((value: string | number | (string | number)[], selectedData: any[]) => any) | undefined;
20
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
+ export default _default;
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
24
+ default: D[K];
25
+ }> : P[K];
26
+ };
27
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
+ type __VLS_TypePropsToOption<T> = {
29
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
30
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
+ } : {
32
+ type: import('vue').PropType<T[K]>;
33
+ required: true;
34
+ };
35
+ };
36
+ type __VLS_PrettifyLocal<T> = {
37
+ [K in keyof T]: T[K];
38
+ } & {};
@@ -0,0 +1,5 @@
1
+ import { InstallWithSFC } from '../utils';
2
+ import { default as Form } from './Form.vue';
3
+ export type { ComponentPropsMap, ComponentPropsType, DynamicComponentProps, FormComponentType, FormItemChildConfig, FormItemConfig, FormItemOption, FormItemProps, FormItemPropsContext, FormProps, FormValidateResult, GridConfig, HelpConfig, HelpType, ResponsiveBreakpoint, ResponsiveConfig, SelectTableComponentProps, SelectTableProps, StaticComponentProps, } from './types';
4
+ export declare const JkyForm: InstallWithSFC<typeof Form>;
5
+ export default JkyForm;
@@ -0,0 +1,8 @@
1
+ import { ElementPlusOptions, InstallerOptions } from './utils/types';
2
+ export * from './components';
3
+ export * from './resolver';
4
+ export type { ElementPlusOptions, InstallerOptions };
5
+ declare const installer: import('./utils/installer').JkyInstaller;
6
+ export declare const install: (app: import('vue').App, options?: InstallerOptions) => void;
7
+ export declare const version: string;
8
+ export default installer;
@@ -0,0 +1,23 @@
1
+ import { MenuProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ default?(_: {}): any;
6
+ };
7
+ refs: {};
8
+ rootEl: any;
9
+ };
10
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
+ declare const __VLS_component: import('vue').DefineComponent<MenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<MenuProps> & Readonly<{}>, {
12
+ levels: number;
13
+ readonly uniqueOpened: boolean;
14
+ readonly menuTrigger: import('element-plus/es/utils').EpPropMergeType<StringConstructor, "click" | "hover", unknown>;
15
+ menuData: import('./types').MenuItem[];
16
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
18
+ export default _default;
19
+ type __VLS_WithTemplateSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -0,0 +1,7 @@
1
+ import { MenuItem as MenuItemType } from './types';
2
+ type __VLS_Props = {
3
+ item: MenuItemType;
4
+ levels?: number;
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
7
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { InstallWithSFC } from '../utils';
2
+ import { default as Menu } from './Menu.vue';
3
+ export type { MenuItem, MenuProps } from './types';
4
+ export declare const JkyMenu: InstallWithSFC<typeof Menu>;
5
+ export default JkyMenu;
@@ -0,0 +1,10 @@
1
+ import { ModalProps } from './types';
2
+ type __VLS_Props = Pick<ModalProps, 'confirmText' | 'cancelText'>;
3
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
4
+ cancel: (...args: any[]) => void;
5
+ confirm: (...args: any[]) => void;
6
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
7
+ onCancel?: ((...args: any[]) => any) | undefined;
8
+ onConfirm?: ((...args: any[]) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
10
+ export default _default;
@@ -0,0 +1,37 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ fullscreen: boolean;
4
+ mode?: 'dialog' | 'drawer';
5
+ drawerDirection?: 'rtl' | 'ltr' | 'ttb' | 'btt';
6
+ };
7
+ declare function __VLS_template(): {
8
+ attrs: Partial<{}>;
9
+ slots: {
10
+ default?(_: {}): any;
11
+ direction?(_: {}): any;
12
+ toggle?(_: {}): any;
13
+ fullscreen?(_: {}): any;
14
+ close?(_: {}): any;
15
+ };
16
+ refs: {};
17
+ rootEl: HTMLDivElement;
18
+ };
19
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
21
+ close: () => any;
22
+ toggle: () => any;
23
+ fullscreen: () => any;
24
+ toggleDirection: () => any;
25
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
26
+ onClose?: (() => any) | undefined;
27
+ onToggle?: (() => any) | undefined;
28
+ onFullscreen?: (() => any) | undefined;
29
+ onToggleDirection?: (() => any) | undefined;
30
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
31
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
32
+ export default _default;
33
+ type __VLS_WithTemplateSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,75 @@
1
+ import { ModalDirection, ModalProps } from './types';
2
+ type __VLS_Props = ModalProps;
3
+ declare function handleTypeChange(): void;
4
+ declare function toggleFullscreen(): void;
5
+ declare function toggleDirection(): void;
6
+ declare function handleClose(): void;
7
+ type __VLS_PublicProps = {
8
+ modelValue?: boolean;
9
+ 'mode'?: 'dialog' | 'drawer';
10
+ 'fullscreen'?: boolean;
11
+ 'direction'?: ModalDirection;
12
+ } & __VLS_Props;
13
+ declare function __VLS_template(): {
14
+ attrs: Partial<{}>;
15
+ slots: {
16
+ header?(_: {
17
+ fullscreen: boolean;
18
+ close: typeof handleClose;
19
+ toggleFullscreen: typeof toggleFullscreen;
20
+ toggleType: typeof handleTypeChange;
21
+ }): any;
22
+ header?(_: {
23
+ fullscreen: boolean;
24
+ close: typeof handleClose;
25
+ toggleFullscreen: typeof toggleFullscreen;
26
+ toggleType: typeof handleTypeChange;
27
+ toggleDirection: typeof toggleDirection;
28
+ }): any;
29
+ default?(_: {}): any;
30
+ default?(_: {}): any;
31
+ footer?(_: {}): any;
32
+ footer?(_: {}): any;
33
+ };
34
+ refs: {};
35
+ rootEl: any;
36
+ };
37
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
38
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
39
+ "update:modelValue": (value: boolean) => any;
40
+ "update:mode": (value: "dialog" | "drawer") => any;
41
+ "update:fullscreen": (value: boolean) => any;
42
+ "update:direction": (value: ModalDirection) => any;
43
+ } & {
44
+ "update:modelValue": (value: boolean) => any;
45
+ cancel: () => any;
46
+ close: () => any;
47
+ open: () => any;
48
+ confirm: () => any;
49
+ opened: () => any;
50
+ closed: () => any;
51
+ typeChange: (type: import('./types').ModalType) => any;
52
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
53
+ "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
54
+ onCancel?: (() => any) | undefined;
55
+ onClose?: (() => any) | undefined;
56
+ onOpen?: (() => any) | undefined;
57
+ onConfirm?: (() => any) | undefined;
58
+ onOpened?: (() => any) | undefined;
59
+ onClosed?: (() => any) | undefined;
60
+ "onUpdate:mode"?: ((value: "dialog" | "drawer") => any) | undefined;
61
+ "onUpdate:fullscreen"?: ((value: boolean) => any) | undefined;
62
+ "onUpdate:direction"?: ((value: ModalDirection) => any) | undefined;
63
+ onTypeChange?: ((type: import('./types').ModalType) => any) | undefined;
64
+ }>, {
65
+ title: string;
66
+ cancelText: string;
67
+ confirmText: string;
68
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
69
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
70
+ export default _default;
71
+ type __VLS_WithTemplateSlots<T, S> = T & {
72
+ new (): {
73
+ $slots: S;
74
+ };
75
+ };
@@ -0,0 +1,5 @@
1
+ import { InstallWithSFC } from '../utils/types';
2
+ import { default as Modal } from './Modal.vue';
3
+ export type { ModalEmits, ModalProps, ModalSlots, ModalType, } from './types';
4
+ export declare const JkyModal: InstallWithSFC<typeof Modal>;
5
+ export default JkyModal;
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "0.0.122";
3
+ const version = "0.0.125";
4
4
  exports.version = version;
@@ -0,0 +1,31 @@
1
+ import { PageHeaderProps } from './types';
2
+ declare function __VLS_template(): {
3
+ attrs: Partial<{}>;
4
+ slots: {
5
+ center?(_: {}): any;
6
+ time?(_: {}): any;
7
+ userIcon?(_: {}): any;
8
+ };
9
+ refs: {};
10
+ rootEl: HTMLElement;
11
+ };
12
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
13
+ declare const __VLS_component: import('vue').DefineComponent<PageHeaderProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
14
+ command: (command: string) => any;
15
+ logout: () => any;
16
+ }, string, import('vue').PublicProps, Readonly<PageHeaderProps> & Readonly<{
17
+ onCommand?: ((command: string) => any) | undefined;
18
+ onLogout?: (() => any) | undefined;
19
+ }>, {
20
+ height: string | number;
21
+ theme: "light" | "dark";
22
+ statusIcons: import('./types').PageHeaderStatusIcon[];
23
+ userDropdownItems: import('./types').PageHeaderUserDropdonItem[];
24
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
25
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
26
+ export default _default;
27
+ type __VLS_WithTemplateSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,13 @@
1
+ import { TooltipTriggerType } from 'element-plus';
2
+ import { Arrayable } from 'element-plus/es/utils';
3
+ import { PageHeaderPopoverMenuItem, PageHeaderPopoverMenuProps } from './types';
4
+ declare const _default: import('vue').DefineComponent<PageHeaderPopoverMenuProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PageHeaderPopoverMenuProps> & Readonly<{}>, {
5
+ width: number;
6
+ placement: import('element-plus').Placement;
7
+ trigger: Arrayable<TooltipTriggerType>;
8
+ theme: "light" | "dark";
9
+ menus: PageHeaderPopoverMenuItem[];
10
+ highlightCurrent: boolean;
11
+ buttonClass: string;
12
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
13
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { InstallWithSFC } from '../utils';
2
+ import { default as PageHeader } from './PageHeader.vue';
3
+ export type { PageHeaderPopoverMenuItem, PageHeaderPopoverMenuProps, PageHeaderProps, PageHeaderStatusIcon, PageHeaderUserDropdonItem, } from './types';
4
+ export declare const JkyPageHeader: InstallWithSFC<typeof PageHeader>;
5
+ export default JkyPageHeader;
@@ -0,0 +1,18 @@
1
+ import { PageLayoutProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<PageLayoutProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<PageLayoutProps> & Readonly<{}>, {
3
+ cachable: boolean;
4
+ roundTabs: boolean;
5
+ showTopMenu: boolean;
6
+ showSideMenu: boolean;
7
+ asideWidth: string;
8
+ asideWithScrollbar: boolean;
9
+ mainWithCard: boolean;
10
+ mainWithScrollbar: boolean;
11
+ transitionName: string;
12
+ tabsWithCard: boolean;
13
+ cardPadding: string;
14
+ topMenuTrigger: "hover" | "click";
15
+ topMenuSingleLevel: boolean;
16
+ sideMenuWithParent: boolean;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
18
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { InstallWithSFC } from '../utils';
2
+ import { default as PageLayout } from './PageLayout.vue';
3
+ export type { BreadcrumbConfig, PageLayoutProps } from './types';
4
+ export declare const JkyPageLayout: InstallWithSFC<typeof PageLayout>;
5
+ export default JkyPageLayout;
@@ -0,0 +1,11 @@
1
+ import { ActionColumnButtonConfig, ActionColumnConfig, ActionColumnProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<ActionColumnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
3
+ click: (button: ActionColumnButtonConfig, row: any, index: number) => any;
4
+ }, string, import('vue').PublicProps, Readonly<ActionColumnProps> & Readonly<{
5
+ onClick?: ((button: ActionColumnButtonConfig, row: any, index: number) => any) | undefined;
6
+ }>, {
7
+ index: number;
8
+ row: any;
9
+ config: ActionColumnConfig;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
@@ -21,7 +21,7 @@ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
21
21
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
22
22
  const vue = require("vue");
23
23
  const ElementPlus = require("element-plus");
24
- const _hoisted_1 = { class: "jky-action-column flex gap-2 items-center" };
24
+ const _hoisted_1 = { class: "jky-action-column flex items-center justify-center" };
25
25
  const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
26
26
  name: "JkyActionColumn"
27
27
  }), {
@@ -72,11 +72,17 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
72
72
  }
73
73
  emit("click", button, props.row, props.index);
74
74
  }
75
+ function getButtonLabel(button) {
76
+ if (typeof button.label === "function") {
77
+ return button.label(props.row, props.index);
78
+ }
79
+ return button.label;
80
+ }
75
81
  return (_ctx, _cache) => {
76
82
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
77
- (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayButtons.value, (button) => {
83
+ (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(displayButtons.value, (button, i) => {
78
84
  return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElButton), {
79
- key: button.label,
85
+ key: i,
80
86
  type: button.type || "primary",
81
87
  size: button.size || "small",
82
88
  disabled: button.disabled,
@@ -87,7 +93,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
87
93
  onClick: ($event) => handleButtonClick(button)
88
94
  }, {
89
95
  default: vue.withCtx(() => [
90
- vue.createTextVNode(vue.toDisplayString(button.label), 1)
96
+ vue.createTextVNode(vue.toDisplayString(getButtonLabel(button)), 1)
91
97
  ]),
92
98
  _: 2
93
99
  }, 1032, ["type", "size", "disabled", "icon", "plain", "class", "onClick"]);
@@ -101,12 +107,12 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValu
101
107
  default: vue.withCtx(() => [
102
108
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(collapsedButtons.value, (button) => {
103
109
  return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElDropdownItem), {
104
- key: button.label,
110
+ key: typeof button.label === "function" ? button.label(__props.row, __props.index) : button.label,
105
111
  disabled: button.disabled,
106
112
  onClick: ($event) => handleButtonClick(button)
107
113
  }, {
108
114
  default: vue.withCtx(() => [
109
- vue.createTextVNode(vue.toDisplayString(button.label), 1)
115
+ vue.createTextVNode(vue.toDisplayString(getButtonLabel(button)), 1)
110
116
  ]),
111
117
  _: 2
112
118
  }, 1032, ["disabled", "onClick"]);