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.
- package/dist/es/add-input/AddInput.vue.d.ts +27 -0
- package/dist/es/add-input/index.d.ts +5 -0
- package/dist/es/amap/AMap.vue.d.ts +61 -0
- package/dist/es/amap/AMarker.vue.d.ts +38 -0
- package/dist/es/amap/ATrackPlayback.vue.d.ts +69 -0
- package/dist/es/amap/index.d.ts +9 -0
- package/dist/es/amap/style.css +2 -13
- package/dist/es/amap/style2.css +6 -2
- package/dist/es/amap/style3.css +12 -5
- package/dist/es/button/Button.vue.d.ts +33 -0
- package/dist/es/button/index.d.ts +4 -0
- package/dist/es/button-nav/ButtonNav.vue.d.ts +36 -0
- package/dist/es/button-nav/index.d.ts +4 -0
- package/dist/es/code-mirror-editor/CodeMirrorEditor.vue.d.ts +25 -0
- package/dist/es/code-mirror-editor/index.d.ts +5 -0
- package/dist/es/components.d.ts +18 -0
- package/dist/es/form/Form.vue.d.ts +461 -0
- package/dist/es/form/Form.vue.js +15 -24
- package/dist/es/form/FormItem.vue.d.ts +6 -0
- package/dist/es/form/FormItem.vue.js +49 -7
- package/dist/es/form/SelectTable.vue.d.ts +38 -0
- package/dist/es/form/index.d.ts +5 -0
- package/dist/es/index.d.ts +8 -0
- package/dist/es/menu/Menu.vue.d.ts +23 -0
- package/dist/es/menu/MenuItem.vue.d.ts +7 -0
- package/dist/es/menu/index.d.ts +5 -0
- package/dist/es/modal/Footer.vue.d.ts +10 -0
- package/dist/es/modal/Header.vue.d.ts +37 -0
- package/dist/es/modal/Modal.vue.d.ts +75 -0
- package/dist/es/modal/index.d.ts +5 -0
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-header/PageHeader.vue.d.ts +31 -0
- package/dist/es/page-header/PopoverMenu.vue.d.ts +13 -0
- package/dist/es/page-header/index.d.ts +5 -0
- package/dist/es/page-layout/PageLayout.vue.d.ts +18 -0
- package/dist/es/page-layout/index.d.ts +5 -0
- package/dist/es/page-table/ActionColumn.vue.d.ts +11 -0
- package/dist/es/page-table/ActionColumn.vue.js +12 -6
- package/dist/es/page-table/PageTable.vue.d.ts +5579 -0
- package/dist/es/page-table/PageTable.vue.js +11 -4
- package/dist/es/page-table/PageTableColumn.vue.d.ts +36 -0
- package/dist/es/page-table/Toolbar.vue.d.ts +33 -0
- package/dist/es/page-table/index.d.ts +9 -0
- package/dist/es/page-table-v2/PageTableV2.vue.d.ts +1026 -0
- package/dist/es/page-table-v2/index.d.ts +4 -0
- package/dist/es/resolver.d.ts +2 -0
- package/dist/es/rich-editor/RichEditor.vue.d.ts +78 -0
- package/dist/es/rich-editor/index.d.ts +5 -0
- package/dist/es/say-hello/SayHello.vue.d.ts +5 -0
- package/dist/es/say-hello/index.d.ts +4 -0
- package/dist/es/style.css +32 -0
- package/dist/es/tabs/ContextMenu.vue.d.ts +30 -0
- package/dist/es/tabs/Tabs.vue.d.ts +13 -0
- package/dist/es/tabs/config.d.ts +2 -0
- package/dist/es/tabs/createTabsGuard.d.ts +5 -0
- package/dist/es/tabs/index.d.ts +7 -0
- package/dist/es/tabs/useTabsStore.d.ts +6 -0
- package/dist/es/utils/index.d.ts +5 -0
- package/dist/es/utils/installer.d.ts +13 -0
- package/dist/es/utils/responsive-toolbar.d.ts +78 -0
- package/dist/es/utils/string.d.ts +18 -0
- package/dist/es/utils/types.d.ts +12 -0
- package/dist/es/utils/with-install.d.ts +2 -0
- package/dist/lib/add-input/AddInput.vue.d.ts +27 -0
- package/dist/lib/add-input/index.d.ts +5 -0
- package/dist/lib/amap/AMap.vue.d.ts +61 -0
- package/dist/lib/amap/AMarker.vue.d.ts +38 -0
- package/dist/lib/amap/ATrackPlayback.vue.d.ts +69 -0
- package/dist/lib/amap/index.d.ts +9 -0
- package/dist/lib/amap/style.css +2 -13
- package/dist/lib/amap/style2.css +6 -2
- package/dist/lib/amap/style3.css +12 -5
- package/dist/lib/button/Button.vue.d.ts +33 -0
- package/dist/lib/button/index.d.ts +4 -0
- package/dist/lib/button-nav/ButtonNav.vue.d.ts +36 -0
- package/dist/lib/button-nav/index.d.ts +4 -0
- package/dist/lib/code-mirror-editor/CodeMirrorEditor.vue.d.ts +25 -0
- package/dist/lib/code-mirror-editor/index.d.ts +5 -0
- package/dist/lib/components.d.ts +18 -0
- package/dist/lib/form/Form.vue.d.ts +461 -0
- package/dist/lib/form/Form.vue.js +15 -24
- package/dist/lib/form/FormItem.vue.d.ts +6 -0
- package/dist/lib/form/FormItem.vue.js +49 -7
- package/dist/lib/form/SelectTable.vue.d.ts +38 -0
- package/dist/lib/form/index.d.ts +5 -0
- package/dist/lib/index.d.ts +8 -0
- package/dist/lib/menu/Menu.vue.d.ts +23 -0
- package/dist/lib/menu/MenuItem.vue.d.ts +7 -0
- package/dist/lib/menu/index.d.ts +5 -0
- package/dist/lib/modal/Footer.vue.d.ts +10 -0
- package/dist/lib/modal/Header.vue.d.ts +37 -0
- package/dist/lib/modal/Modal.vue.d.ts +75 -0
- package/dist/lib/modal/index.d.ts +5 -0
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-header/PageHeader.vue.d.ts +31 -0
- package/dist/lib/page-header/PopoverMenu.vue.d.ts +13 -0
- package/dist/lib/page-header/index.d.ts +5 -0
- package/dist/lib/page-layout/PageLayout.vue.d.ts +18 -0
- package/dist/lib/page-layout/index.d.ts +5 -0
- package/dist/lib/page-table/ActionColumn.vue.d.ts +11 -0
- package/dist/lib/page-table/ActionColumn.vue.js +12 -6
- package/dist/lib/page-table/PageTable.vue.d.ts +5579 -0
- package/dist/lib/page-table/PageTable.vue.js +11 -4
- package/dist/lib/page-table/PageTableColumn.vue.d.ts +36 -0
- package/dist/lib/page-table/Toolbar.vue.d.ts +33 -0
- package/dist/lib/page-table/index.d.ts +9 -0
- package/dist/lib/page-table-v2/PageTableV2.vue.d.ts +1026 -0
- package/dist/lib/page-table-v2/index.d.ts +4 -0
- package/dist/lib/resolver.d.ts +2 -0
- package/dist/lib/rich-editor/RichEditor.vue.d.ts +78 -0
- package/dist/lib/rich-editor/index.d.ts +5 -0
- package/dist/lib/say-hello/SayHello.vue.d.ts +5 -0
- package/dist/lib/say-hello/index.d.ts +4 -0
- package/dist/lib/style.css +32 -0
- package/dist/lib/tabs/ContextMenu.vue.d.ts +30 -0
- package/dist/lib/tabs/Tabs.vue.d.ts +13 -0
- package/dist/lib/tabs/config.d.ts +2 -0
- package/dist/lib/tabs/createTabsGuard.d.ts +5 -0
- package/dist/lib/tabs/index.d.ts +7 -0
- package/dist/lib/tabs/useTabsStore.d.ts +6 -0
- package/dist/lib/utils/index.d.ts +5 -0
- package/dist/lib/utils/installer.d.ts +13 -0
- package/dist/lib/utils/responsive-toolbar.d.ts +78 -0
- package/dist/lib/utils/string.d.ts +18 -0
- package/dist/lib/utils/types.d.ts +12 -0
- package/dist/lib/utils/with-install.d.ts +2 -0
- package/package.json +2 -2
|
@@ -86,6 +86,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
86
86
|
model: {},
|
|
87
87
|
readonly: { type: [Boolean, Function], default: false },
|
|
88
88
|
disabled: { type: Boolean, default: false },
|
|
89
|
+
span: {},
|
|
89
90
|
label: {},
|
|
90
91
|
labelWidth: {},
|
|
91
92
|
labelPosition: {},
|
|
@@ -103,6 +104,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
103
104
|
const props = __props;
|
|
104
105
|
const loading = ref(false);
|
|
105
106
|
const componentProps = ref({});
|
|
107
|
+
const rules = ref(null);
|
|
106
108
|
function loadComponentProps() {
|
|
107
109
|
return __async(this, null, function* () {
|
|
108
110
|
const configProps = props.config.componentProps;
|
|
@@ -130,14 +132,43 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
130
132
|
componentProps.value = configProps;
|
|
131
133
|
});
|
|
132
134
|
}
|
|
135
|
+
function loadRules() {
|
|
136
|
+
return __async(this, null, function* () {
|
|
137
|
+
const configRules = props.config.rules;
|
|
138
|
+
if (!configRules) {
|
|
139
|
+
rules.value = null;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
if (typeof configRules === "function") {
|
|
143
|
+
loading.value = true;
|
|
144
|
+
try {
|
|
145
|
+
const result = yield configRules({
|
|
146
|
+
model: props.model,
|
|
147
|
+
field: props.field,
|
|
148
|
+
$form: props.model
|
|
149
|
+
});
|
|
150
|
+
rules.value = result || null;
|
|
151
|
+
} catch (error) {
|
|
152
|
+
console.error("Failed to load rules:", error);
|
|
153
|
+
rules.value = null;
|
|
154
|
+
} finally {
|
|
155
|
+
loading.value = false;
|
|
156
|
+
}
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
rules.value = configRules;
|
|
160
|
+
});
|
|
161
|
+
}
|
|
133
162
|
watch(
|
|
134
163
|
() => props.model,
|
|
135
164
|
() => {
|
|
136
165
|
loadComponentProps();
|
|
166
|
+
loadRules();
|
|
137
167
|
},
|
|
138
168
|
{ deep: true }
|
|
139
169
|
);
|
|
140
170
|
loadComponentProps();
|
|
171
|
+
loadRules();
|
|
141
172
|
const modelValue = computed({
|
|
142
173
|
get: () => props.model[props.field],
|
|
143
174
|
set: (val) => {
|
|
@@ -263,11 +294,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
263
294
|
return h(ElAutocomplete, autocompleteProps, _componentSlotsObj);
|
|
264
295
|
}
|
|
265
296
|
case "datepicker":
|
|
266
|
-
return h(ElDatePicker, __spreadValues(__spreadValues({
|
|
297
|
+
return h(ElDatePicker, __spreadValues(__spreadValues({
|
|
298
|
+
startPlaceholder: "开始日期",
|
|
299
|
+
endPlaceholder: "结束日期"
|
|
300
|
+
}, commonProps), componentProps.value), _componentSlotsObj);
|
|
267
301
|
case "datetime-picker":
|
|
268
|
-
return h(ElDatePicker, __spreadValues(__spreadValues({
|
|
302
|
+
return h(ElDatePicker, __spreadValues(__spreadValues({
|
|
303
|
+
startPlaceholder: "开始日期",
|
|
304
|
+
endPlaceholder: "结束日期"
|
|
305
|
+
}, commonProps), componentProps.value), _componentSlotsObj);
|
|
269
306
|
case "time-picker":
|
|
270
|
-
return h(ElTimePicker, __spreadValues(__spreadValues({
|
|
307
|
+
return h(ElTimePicker, __spreadValues(__spreadValues({
|
|
308
|
+
startPlaceholder: "开始时间",
|
|
309
|
+
endPlaceholder: "结束时间"
|
|
310
|
+
}, commonProps), componentProps.value), _componentSlotsObj);
|
|
271
311
|
case "time-select":
|
|
272
312
|
return h(ElTimeSelect, __spreadValues(__spreadValues({}, commonProps), componentProps.value), _componentSlotsObj);
|
|
273
313
|
case "radio-group": {
|
|
@@ -507,7 +547,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
507
547
|
return (_ctx, _cache) => {
|
|
508
548
|
return isHidden.value ? (openBlock(), createElementBlock("div", _hoisted_1)) : __props.config.title && !__props.config.label ? (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
509
549
|
key: 1,
|
|
510
|
-
prop: __props.field
|
|
550
|
+
prop: __props.field,
|
|
551
|
+
rules: rules.value
|
|
511
552
|
}, __spreadValues(__spreadValues({}, formItemProps.value), _ctx.$attrs), {
|
|
512
553
|
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]],
|
|
513
554
|
style: [__props.config.customStyle]
|
|
@@ -523,10 +564,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
523
564
|
__props.config.help && !__props.config.help.tooltip ? (openBlock(), createBlock(resolveDynamicComponent(renderHelpText()), { key: 0 })) : createCommentVNode("", true)
|
|
524
565
|
]),
|
|
525
566
|
_: 1
|
|
526
|
-
}, 16, ["prop", "class", "style"])) : (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
567
|
+
}, 16, ["prop", "rules", "class", "style"])) : (openBlock(), createBlock(unref(ElFormItem), mergeProps({
|
|
527
568
|
key: 2,
|
|
528
569
|
label: __props.config.label,
|
|
529
|
-
prop: __props.field
|
|
570
|
+
prop: __props.field,
|
|
571
|
+
rules: rules.value
|
|
530
572
|
}, __spreadValues(__spreadValues({}, formItemProps.value), _ctx.$attrs), {
|
|
531
573
|
class: ["jky-form-item", [__props.config.class]]
|
|
532
574
|
}), createSlots({
|
|
@@ -550,7 +592,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
550
592
|
]),
|
|
551
593
|
key: "0"
|
|
552
594
|
} : void 0
|
|
553
|
-
]), 1040, ["label", "prop", "class"]));
|
|
595
|
+
]), 1040, ["label", "prop", "rules", "class"]));
|
|
554
596
|
};
|
|
555
597
|
}
|
|
556
598
|
}));
|
|
@@ -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,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
|
+
};
|
package/dist/es/package.json.js
CHANGED
|
@@ -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;
|
|
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
|
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
import { defineComponent, computed, openBlock, createElementBlock, Fragment, renderList, createBlock, unref, normalizeClass, withCtx, createTextVNode, toDisplayString, createVNode, createElementVNode, createCommentVNode } from "vue";
|
|
21
21
|
import { ElButton, ElDropdown, ElDropdownMenu, ElDropdownItem } from "element-plus";
|
|
22
|
-
const _hoisted_1 = { class: "jky-action-column flex
|
|
22
|
+
const _hoisted_1 = { class: "jky-action-column flex items-center justify-center" };
|
|
23
23
|
const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({}, {
|
|
24
24
|
name: "JkyActionColumn"
|
|
25
25
|
}), {
|
|
@@ -70,11 +70,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
70
70
|
}
|
|
71
71
|
emit("click", button, props.row, props.index);
|
|
72
72
|
}
|
|
73
|
+
function getButtonLabel(button) {
|
|
74
|
+
if (typeof button.label === "function") {
|
|
75
|
+
return button.label(props.row, props.index);
|
|
76
|
+
}
|
|
77
|
+
return button.label;
|
|
78
|
+
}
|
|
73
79
|
return (_ctx, _cache) => {
|
|
74
80
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
75
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(displayButtons.value, (button) => {
|
|
81
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(displayButtons.value, (button, i) => {
|
|
76
82
|
return openBlock(), createBlock(unref(ElButton), {
|
|
77
|
-
key:
|
|
83
|
+
key: i,
|
|
78
84
|
type: button.type || "primary",
|
|
79
85
|
size: button.size || "small",
|
|
80
86
|
disabled: button.disabled,
|
|
@@ -85,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
85
91
|
onClick: ($event) => handleButtonClick(button)
|
|
86
92
|
}, {
|
|
87
93
|
default: withCtx(() => [
|
|
88
|
-
createTextVNode(toDisplayString(button
|
|
94
|
+
createTextVNode(toDisplayString(getButtonLabel(button)), 1)
|
|
89
95
|
]),
|
|
90
96
|
_: 2
|
|
91
97
|
}, 1032, ["type", "size", "disabled", "icon", "plain", "class", "onClick"]);
|
|
@@ -99,12 +105,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent(__spreadProps(__spreadValues({
|
|
|
99
105
|
default: withCtx(() => [
|
|
100
106
|
(openBlock(true), createElementBlock(Fragment, null, renderList(collapsedButtons.value, (button) => {
|
|
101
107
|
return openBlock(), createBlock(unref(ElDropdownItem), {
|
|
102
|
-
key: button.label,
|
|
108
|
+
key: typeof button.label === "function" ? button.label(__props.row, __props.index) : button.label,
|
|
103
109
|
disabled: button.disabled,
|
|
104
110
|
onClick: ($event) => handleButtonClick(button)
|
|
105
111
|
}, {
|
|
106
112
|
default: withCtx(() => [
|
|
107
|
-
createTextVNode(toDisplayString(button
|
|
113
|
+
createTextVNode(toDisplayString(getButtonLabel(button)), 1)
|
|
108
114
|
]),
|
|
109
115
|
_: 2
|
|
110
116
|
}, 1032, ["disabled", "onClick"]);
|