ele-admin-plus 1.6.0-beta.1 → 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.
- package/es/ele-admin-layout/components/layout-tabs.d.ts +5 -5
- package/es/ele-admin-layout/index.d.ts +6 -4
- package/es/ele-admin-layout/index.js +12 -12
- package/es/ele-admin-layout/props.d.ts +3 -1
- package/es/ele-admin-layout/props.js +2 -0
- package/es/ele-autocomplete/index.js +2 -0
- package/es/ele-basic-select/components/select-view.d.ts +3 -3
- package/es/ele-basic-select/index.d.ts +3 -3
- package/es/ele-breadcrumb/index.d.ts +2 -2
- package/es/ele-breadcrumb/props.d.ts +1 -1
- package/es/ele-cascader/index.js +4 -0
- package/es/ele-chat/index.js +7 -7
- package/es/ele-checkbox-group/index.d.ts +14 -14
- package/es/ele-checkbox-group/props.d.ts +6 -6
- package/es/ele-crud/components/edit-modal.d.ts +13 -1
- package/es/ele-crud/components/edit-modal.js +36 -2
- package/es/ele-crud/components/table-extra.d.ts +13 -1
- package/es/ele-crud/components/table-extra.js +22 -3
- package/es/ele-crud/index.d.ts +2 -0
- package/es/ele-crud/index.js +14 -0
- package/es/ele-crud/props.d.ts +3 -1
- package/es/ele-crud/props.js +2 -0
- package/es/ele-crud/types.d.ts +8 -0
- package/es/ele-crud-builder/util.js +20 -1
- package/es/ele-data-table/index.d.ts +3 -3
- package/es/ele-data-table/util.d.ts +1 -1
- package/es/ele-drawer/index.d.ts +59 -59
- package/es/ele-drawer/props.d.ts +21 -21
- package/es/ele-dropdown/components/pro-dropdown.d.ts +42 -42
- package/es/ele-dropdown/index.d.ts +42 -42
- package/es/ele-dropdown/props.d.ts +13 -13
- package/es/ele-dropdown-provider/util.d.ts +1 -1
- package/es/ele-icon/index.d.ts +2 -2
- package/es/ele-icon/props.d.ts +1 -1
- package/es/ele-icon-select/index.d.ts +1 -1
- package/es/ele-image-viewer/index.d.ts +20 -20
- package/es/ele-image-viewer/props.d.ts +9 -9
- package/es/ele-menus/components/menu-items.js +1 -1
- package/es/ele-menus/index.d.ts +30 -30
- package/es/ele-menus/props.d.ts +12 -12
- package/es/ele-modal/index.d.ts +52 -48
- package/es/ele-modal/props.d.ts +16 -16
- package/es/ele-pagination/index.d.ts +25 -25
- package/es/ele-pagination/props.d.ts +11 -11
- package/es/ele-popconfirm/index.d.ts +45 -45
- package/es/ele-popconfirm/props.d.ts +18 -18
- package/es/ele-popover/index.d.ts +47 -47
- package/es/ele-popover/props.d.ts +19 -19
- package/es/ele-pro-form/index.d.ts +19 -19
- package/es/ele-pro-form/props.d.ts +7 -7
- package/es/ele-pro-form-builder/style/index.scss +3 -3
- package/es/ele-pro-layout/index.d.ts +8 -6
- package/es/ele-pro-layout/index.js +2 -1
- package/es/ele-pro-layout/props.d.ts +1 -0
- package/es/ele-pro-layout/util.d.ts +5 -0
- package/es/ele-pro-layout/util.js +10 -3
- package/es/ele-pro-table/index.d.ts +4 -4
- package/es/ele-pro-table/style/index.scss +1 -0
- package/es/ele-qr-code-svg/qrcodegen.js +1 -1
- package/es/ele-radio-group/index.d.ts +21 -21
- package/es/ele-radio-group/props.d.ts +9 -9
- package/es/ele-select/index.d.ts +73 -73
- package/es/ele-select/props.d.ts +29 -29
- package/es/ele-select-tree/index.d.ts +91 -91
- package/es/ele-select-tree/props.d.ts +36 -36
- package/es/ele-steps/index.d.ts +18 -18
- package/es/ele-steps/props.d.ts +7 -7
- package/es/ele-tab-tool/index.d.ts +1 -1
- package/es/ele-table-select/index.d.ts +5 -5
- package/es/ele-tabs/index.d.ts +23 -23
- package/es/ele-tabs/props.d.ts +5 -5
- package/es/ele-tool/index.d.ts +1 -1
- package/es/ele-tooltip/index.d.ts +46 -46
- package/es/ele-tooltip/props.d.ts +18 -18
- package/es/ele-transfer/index.d.ts +20 -20
- package/es/ele-transfer/props.d.ts +9 -9
- package/es/ele-tree-select/index.d.ts +5 -5
- package/es/ele-upload-list/components/list-item.d.ts +2 -2
- package/es/ele-virtual-table/components/body-cell.d.ts +6 -6
- package/es/ele-virtual-table/components/cell-filter.d.ts +1 -1
- package/es/ele-virtual-table/components/header-cell.d.ts +2 -2
- package/es/ele-virtual-table/index.d.ts +6 -6
- package/es/utils/common.js +1 -1
- package/es/utils/hook.d.ts +7 -0
- package/es/utils/modal-hook.d.ts +1 -1
- package/es/utils/theme-util.d.ts +4 -0
- package/lib/ele-admin-layout/components/layout-tabs.d.ts +5 -5
- package/lib/ele-admin-layout/index.cjs +12 -12
- package/lib/ele-admin-layout/index.d.ts +6 -4
- package/lib/ele-admin-layout/props.cjs +2 -0
- package/lib/ele-admin-layout/props.d.ts +3 -1
- package/lib/ele-autocomplete/index.cjs +2 -0
- package/lib/ele-basic-select/components/select-view.d.ts +3 -3
- package/lib/ele-basic-select/index.d.ts +3 -3
- package/lib/ele-breadcrumb/index.d.ts +2 -2
- package/lib/ele-breadcrumb/props.d.ts +1 -1
- package/lib/ele-cascader/index.cjs +4 -0
- package/lib/ele-chat/index.cjs +6 -6
- package/lib/ele-checkbox-group/index.d.ts +14 -14
- package/lib/ele-checkbox-group/props.d.ts +6 -6
- package/lib/ele-crud/components/edit-modal.cjs +36 -2
- package/lib/ele-crud/components/edit-modal.d.ts +13 -1
- package/lib/ele-crud/components/table-extra.cjs +22 -3
- package/lib/ele-crud/components/table-extra.d.ts +13 -1
- package/lib/ele-crud/index.cjs +14 -0
- package/lib/ele-crud/index.d.ts +2 -0
- package/lib/ele-crud/props.cjs +2 -0
- package/lib/ele-crud/props.d.ts +3 -1
- package/lib/ele-crud/types.d.ts +8 -0
- package/lib/ele-crud-builder/util.cjs +20 -1
- package/lib/ele-data-table/index.d.ts +3 -3
- package/lib/ele-data-table/util.d.ts +1 -1
- package/lib/ele-drawer/index.d.ts +59 -59
- package/lib/ele-drawer/props.d.ts +21 -21
- package/lib/ele-dropdown/components/pro-dropdown.d.ts +42 -42
- package/lib/ele-dropdown/index.d.ts +42 -42
- package/lib/ele-dropdown/props.d.ts +13 -13
- package/lib/ele-dropdown-provider/util.d.ts +1 -1
- package/lib/ele-icon/index.d.ts +2 -2
- package/lib/ele-icon/props.d.ts +1 -1
- package/lib/ele-icon-select/index.d.ts +1 -1
- package/lib/ele-image-viewer/index.d.ts +20 -20
- package/lib/ele-image-viewer/props.d.ts +9 -9
- package/lib/ele-menus/components/menu-items.cjs +1 -1
- package/lib/ele-menus/index.d.ts +30 -30
- package/lib/ele-menus/props.d.ts +12 -12
- package/lib/ele-modal/index.d.ts +52 -48
- package/lib/ele-modal/props.d.ts +16 -16
- package/lib/ele-pagination/index.d.ts +25 -25
- package/lib/ele-pagination/props.d.ts +11 -11
- package/lib/ele-popconfirm/index.d.ts +45 -45
- package/lib/ele-popconfirm/props.d.ts +18 -18
- package/lib/ele-popover/index.d.ts +47 -47
- package/lib/ele-popover/props.d.ts +19 -19
- package/lib/ele-pro-form/index.d.ts +19 -19
- package/lib/ele-pro-form/props.d.ts +7 -7
- package/lib/ele-pro-form-builder/style/index.scss +3 -3
- package/lib/ele-pro-layout/index.cjs +2 -1
- package/lib/ele-pro-layout/index.d.ts +8 -6
- package/lib/ele-pro-layout/props.d.ts +1 -0
- package/lib/ele-pro-layout/util.cjs +10 -3
- package/lib/ele-pro-layout/util.d.ts +5 -0
- package/lib/ele-pro-table/index.d.ts +4 -4
- package/lib/ele-pro-table/style/index.scss +1 -0
- package/lib/ele-qr-code-svg/qrcodegen.cjs +1 -1
- package/lib/ele-radio-group/index.d.ts +21 -21
- package/lib/ele-radio-group/props.d.ts +9 -9
- package/lib/ele-select/index.d.ts +73 -73
- package/lib/ele-select/props.d.ts +29 -29
- package/lib/ele-select-tree/index.d.ts +91 -91
- package/lib/ele-select-tree/props.d.ts +36 -36
- package/lib/ele-steps/index.d.ts +18 -18
- package/lib/ele-steps/props.d.ts +7 -7
- package/lib/ele-tab-tool/index.d.ts +1 -1
- package/lib/ele-table-select/index.d.ts +5 -5
- package/lib/ele-tabs/index.d.ts +23 -23
- package/lib/ele-tabs/props.d.ts +5 -5
- package/lib/ele-tool/index.d.ts +1 -1
- package/lib/ele-tooltip/index.d.ts +46 -46
- package/lib/ele-tooltip/props.d.ts +18 -18
- package/lib/ele-transfer/index.d.ts +20 -20
- package/lib/ele-transfer/props.d.ts +9 -9
- package/lib/ele-tree-select/index.d.ts +5 -5
- package/lib/ele-upload-list/components/list-item.d.ts +2 -2
- package/lib/ele-virtual-table/components/body-cell.d.ts +6 -6
- package/lib/ele-virtual-table/components/cell-filter.d.ts +1 -1
- package/lib/ele-virtual-table/components/header-cell.d.ts +2 -2
- package/lib/ele-virtual-table/index.d.ts +6 -6
- package/lib/utils/common.cjs +1 -1
- package/lib/utils/hook.d.ts +7 -0
- package/lib/utils/modal-hook.d.ts +1 -1
- package/lib/utils/theme-util.d.ts +4 -0
- package/package.json +45 -4
|
@@ -10,7 +10,7 @@ declare function __VLS_template(): {
|
|
|
10
10
|
tabTitle?(_: {
|
|
11
11
|
item: TabPaneItem;
|
|
12
12
|
label: string | undefined;
|
|
13
|
-
active: import('element-plus/es/utils/
|
|
13
|
+
active: import('element-plus/es/utils/vue/props/types').EpPropMergeType<readonly [StringConstructor, NumberConstructor], unknown, unknown> | undefined;
|
|
14
14
|
}): any;
|
|
15
15
|
tabExtra?(_: {
|
|
16
16
|
active: string | undefined;
|
|
@@ -36,10 +36,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
36
36
|
/** 是否支持拖动排序 */
|
|
37
37
|
tabSortable: BooleanConstructor;
|
|
38
38
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
39
|
-
tabContextMenu: (_option: TabEventOption) => void;
|
|
40
|
-
tabSortChange: (_data: TabPaneItem[]) => void;
|
|
41
39
|
tabClick: (_option: TabEventOption) => void;
|
|
42
40
|
tabRemove: (_name: string) => void;
|
|
41
|
+
tabContextMenu: (_option: TabEventOption) => void;
|
|
42
|
+
tabSortChange: (_data: TabPaneItem[]) => void;
|
|
43
43
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
44
44
|
/** 页签数据 */
|
|
45
45
|
tabs: PropType<TabPaneItem[]>;
|
|
@@ -60,10 +60,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
60
60
|
/** 是否支持拖动排序 */
|
|
61
61
|
tabSortable: BooleanConstructor;
|
|
62
62
|
}>> & Readonly<{
|
|
63
|
-
onTabContextMenu?: ((_option: TabEventOption) => any) | undefined;
|
|
64
|
-
onTabSortChange?: ((_data: TabPaneItem[]) => any) | undefined;
|
|
65
63
|
onTabClick?: ((_option: TabEventOption) => any) | undefined;
|
|
66
64
|
onTabRemove?: ((_name: string) => any) | undefined;
|
|
65
|
+
onTabContextMenu?: ((_option: TabEventOption) => any) | undefined;
|
|
66
|
+
onTabSortChange?: ((_data: TabPaneItem[]) => any) | undefined;
|
|
67
67
|
}>, {
|
|
68
68
|
fixedHome: boolean;
|
|
69
69
|
isHome: boolean;
|
|
@@ -41,6 +41,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
41
41
|
type: import('vue').PropType<boolean | import('../ele-app/plus').EleBreadcrumbProps>;
|
|
42
42
|
default: boolean;
|
|
43
43
|
};
|
|
44
|
+
breadcrumbStyle: import('vue').PropType<import('../ele-app/types').StyleValues>;
|
|
44
45
|
backTop: {
|
|
45
46
|
type: import('vue').PropType<boolean | import('../ele-app/plus').EleBacktopProps>;
|
|
46
47
|
default: boolean;
|
|
@@ -130,10 +131,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
130
131
|
sideboxMenuRef: import('vue').ShallowRef<EleMenusInstance, EleMenusInstance>;
|
|
131
132
|
getContentEl: () => HTMLElement | null;
|
|
132
133
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
133
|
-
tabContextMenu: (_option: TabEventOption) => void;
|
|
134
|
-
tabSortChange: (_data: TabPaneItem[]) => void;
|
|
135
134
|
tabClick: (_option: TabEventOption) => void;
|
|
136
135
|
tabRemove: (_name: string) => void;
|
|
136
|
+
tabContextMenu: (_option: TabEventOption) => void;
|
|
137
|
+
tabSortChange: (_data: TabPaneItem[]) => void;
|
|
137
138
|
"update:collapse": (_collapse: boolean) => void;
|
|
138
139
|
logoClick: (_e: MouseEvent) => void;
|
|
139
140
|
headMenuOpen: (_index: string, _indexPath: string[]) => void;
|
|
@@ -179,6 +180,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
179
180
|
type: import('vue').PropType<boolean | import('../ele-app/plus').EleBreadcrumbProps>;
|
|
180
181
|
default: boolean;
|
|
181
182
|
};
|
|
183
|
+
breadcrumbStyle: import('vue').PropType<import('../ele-app/types').StyleValues>;
|
|
182
184
|
backTop: {
|
|
183
185
|
type: import('vue').PropType<boolean | import('../ele-app/plus').EleBacktopProps>;
|
|
184
186
|
default: boolean;
|
|
@@ -264,10 +266,10 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
264
266
|
};
|
|
265
267
|
mobile: BooleanConstructor;
|
|
266
268
|
}>> & Readonly<{
|
|
267
|
-
onTabContextMenu?: ((_option: TabEventOption) => any) | undefined;
|
|
268
|
-
onTabSortChange?: ((_data: TabPaneItem[]) => any) | undefined;
|
|
269
269
|
onTabClick?: ((_option: TabEventOption) => any) | undefined;
|
|
270
270
|
onTabRemove?: ((_name: string) => any) | undefined;
|
|
271
|
+
onTabContextMenu?: ((_option: TabEventOption) => any) | undefined;
|
|
272
|
+
onTabSortChange?: ((_data: TabPaneItem[]) => any) | undefined;
|
|
271
273
|
"onUpdate:collapse"?: ((_collapse: boolean) => any) | undefined;
|
|
272
274
|
onLogoClick?: ((_e: MouseEvent) => any) | undefined;
|
|
273
275
|
onHeadMenuOpen?: ((_index: string, _indexPath: string[]) => any) | undefined;
|
|
@@ -13,16 +13,12 @@ const _hoisted_2 = {
|
|
|
13
13
|
class: "ele-admin-tools"
|
|
14
14
|
};
|
|
15
15
|
const _hoisted_3 = {
|
|
16
|
-
key: 2,
|
|
17
|
-
class: "ele-admin-breadcrumb"
|
|
18
|
-
};
|
|
19
|
-
const _hoisted_4 = {
|
|
20
16
|
key: 5,
|
|
21
17
|
class: "ele-admin-tools"
|
|
22
18
|
};
|
|
19
|
+
const _hoisted_4 = ["src"];
|
|
23
20
|
const _hoisted_5 = ["src"];
|
|
24
|
-
const _hoisted_6 = ["
|
|
25
|
-
const _hoisted_7 = ["data-id"];
|
|
21
|
+
const _hoisted_6 = ["data-id"];
|
|
26
22
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
27
23
|
...{ name: "EleAdminLayout" },
|
|
28
24
|
__name: "index",
|
|
@@ -323,11 +319,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
323
319
|
_ctx.$slots.left ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
324
320
|
renderSlot(_ctx.$slots, "left")
|
|
325
321
|
])) : createCommentVNode("", true),
|
|
326
|
-
_ctx.breadcrumb ? (openBlock(), createElementBlock("div",
|
|
322
|
+
_ctx.breadcrumb ? (openBlock(), createElementBlock("div", {
|
|
323
|
+
key: 2,
|
|
324
|
+
class: "ele-admin-breadcrumb",
|
|
325
|
+
style: normalizeStyle(_ctx.breadcrumbStyle)
|
|
326
|
+
}, [
|
|
327
327
|
renderSlot(_ctx.$slots, "breadcrumb", {}, () => [
|
|
328
328
|
_ctx.levels && _ctx.levels.length ? (openBlock(), createBlock(EleBreadcrumb, mergeProps({ key: 0 }, _ctx.breadcrumb === true ? {} : _ctx.breadcrumb, { items: _ctx.levels }), null, 16, ["items"])) : createCommentVNode("", true)
|
|
329
329
|
])
|
|
330
|
-
])) : createCommentVNode("", true),
|
|
330
|
+
], 4)) : createCommentVNode("", true),
|
|
331
331
|
renderSlot(_ctx.$slots, "center"),
|
|
332
332
|
!showHeaderTabs.value || showHeaderMenus.value ? (openBlock(), createElementBlock("div", {
|
|
333
333
|
key: 3,
|
|
@@ -393,7 +393,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
393
393
|
};
|
|
394
394
|
})
|
|
395
395
|
]), 1032, ["tabs", "active", "fixedHome", "homePath", "isHome", "tabStyle", "tabContextMenu", "tabContextMenus", "tabSortable", "class", "style"])) : createCommentVNode("", true),
|
|
396
|
-
_ctx.$slots.right ? (openBlock(), createElementBlock("div",
|
|
396
|
+
_ctx.$slots.right ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
397
397
|
renderSlot(_ctx.$slots, "right")
|
|
398
398
|
])) : createCommentVNode("", true)
|
|
399
399
|
], 38)) : createCommentVNode("", true)
|
|
@@ -433,7 +433,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
433
433
|
onClick: handleLogoClick
|
|
434
434
|
}, [
|
|
435
435
|
renderSlot(_ctx.$slots, "logo", {}, () => [
|
|
436
|
-
createElementVNode("img", { src: _ctx.logoSrc }, null, 8,
|
|
436
|
+
createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_4)
|
|
437
437
|
])
|
|
438
438
|
], 4)) : createCommentVNode("", true),
|
|
439
439
|
renderSlot(_ctx.$slots, "boxTop"),
|
|
@@ -507,7 +507,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
507
507
|
onClick: handleLogoClick
|
|
508
508
|
}, [
|
|
509
509
|
_ctx.logoSrc || _ctx.$slots.logo ? renderSlot(_ctx.$slots, "logo", { key: 0 }, () => [
|
|
510
|
-
createElementVNode("img", { src: _ctx.logoSrc }, null, 8,
|
|
510
|
+
createElementVNode("img", { src: _ctx.logoSrc }, null, 8, _hoisted_5)
|
|
511
511
|
]) : createCommentVNode("", true),
|
|
512
512
|
_ctx.logoTitle || _ctx.$slots.logoTitle ? renderSlot(_ctx.$slots, "logoTitle", { key: 1 }, () => [
|
|
513
513
|
createElementVNode("h1", null, toDisplayString(_ctx.logoTitle), 1)
|
|
@@ -611,7 +611,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
611
611
|
ref: modalsRef,
|
|
612
612
|
class: "ele-admin-modals",
|
|
613
613
|
"data-id": param?.key
|
|
614
|
-
}, null, 8,
|
|
614
|
+
}, null, 8, _hoisted_6)
|
|
615
615
|
]),
|
|
616
616
|
default: withCtx(() => [
|
|
617
617
|
createElementVNode("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType, ExtractPropTypes, InjectionKey } from 'vue';
|
|
2
|
-
import { StyleValue, ClassValues } from '../ele-app/types';
|
|
2
|
+
import { StyleValue, StyleValues, ClassValues } from '../ele-app/types';
|
|
3
3
|
import { EleMenusProps, EleBreadcrumbProps, EleBacktopProps, EleDropdownProps } from '../ele-app/plus';
|
|
4
4
|
import { MenuItem, MenuItemClickType } from '../ele-menus/types';
|
|
5
5
|
import { BreadcrumbItem } from '../ele-breadcrumb/types';
|
|
@@ -49,6 +49,8 @@ export declare const adminLayoutProps: {
|
|
|
49
49
|
type: PropType<boolean | EleBreadcrumbProps>;
|
|
50
50
|
default: boolean;
|
|
51
51
|
};
|
|
52
|
+
/** 面包屑导航样式 */
|
|
53
|
+
breadcrumbStyle: PropType<StyleValues>;
|
|
52
54
|
/** 是否需要返回顶部 */
|
|
53
55
|
backTop: {
|
|
54
56
|
type: PropType<boolean | EleBacktopProps>;
|
|
@@ -14,6 +14,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
14
14
|
placement: {},
|
|
15
15
|
popperClass: {},
|
|
16
16
|
popperStyle: { type: [Boolean, null, String, Object, Array] },
|
|
17
|
+
popperOptions: {},
|
|
18
|
+
showArrow: { type: Boolean },
|
|
17
19
|
triggerOnFocus: { type: Boolean },
|
|
18
20
|
selectWhenUnmatched: { type: Boolean },
|
|
19
21
|
hideLoading: { type: Boolean },
|
|
@@ -89,9 +89,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
89
89
|
focus: (_e: FocusEvent) => void;
|
|
90
90
|
blur: (_e: FocusEvent) => void;
|
|
91
91
|
clear: () => void;
|
|
92
|
+
removeTag: (_item: SelectedItem) => void;
|
|
92
93
|
"update:visible": (_visible: boolean) => void;
|
|
93
94
|
filterChange: (_value: string) => void;
|
|
94
|
-
removeTag: (_item: SelectedItem) => void;
|
|
95
95
|
inputClick: (_e: MouseEvent) => void;
|
|
96
96
|
wrapClick: (_isCustom?: boolean | undefined) => void;
|
|
97
97
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -151,9 +151,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
151
151
|
onFocus?: ((_e: FocusEvent) => any) | undefined;
|
|
152
152
|
onBlur?: ((_e: FocusEvent) => any) | undefined;
|
|
153
153
|
onClear?: (() => any) | undefined;
|
|
154
|
+
onRemoveTag?: ((_item: SelectedItem) => any) | undefined;
|
|
154
155
|
"onUpdate:visible"?: ((_visible: boolean) => any) | undefined;
|
|
155
156
|
onFilterChange?: ((_value: string) => any) | undefined;
|
|
156
|
-
onRemoveTag?: ((_item: SelectedItem) => any) | undefined;
|
|
157
157
|
onInputClick?: ((_e: MouseEvent) => any) | undefined;
|
|
158
158
|
onWrapClick?: ((_isCustom?: boolean | undefined) => any) | undefined;
|
|
159
159
|
}>, {
|
|
@@ -161,7 +161,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
161
161
|
disabled: boolean;
|
|
162
162
|
clearable: boolean;
|
|
163
163
|
visible: boolean;
|
|
164
|
-
placement: import('element-plus/es/utils/
|
|
164
|
+
placement: import('element-plus/es/utils/vue/props/types').EpPropMergeType<StringConstructor, import('element-plus').Placement, unknown> | undefined;
|
|
165
165
|
persistent: boolean;
|
|
166
166
|
transition: string;
|
|
167
167
|
teleported: boolean;
|
|
@@ -69,9 +69,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
69
69
|
clear: () => void;
|
|
70
70
|
blur: (_e: FocusEvent) => void;
|
|
71
71
|
focus: (_e: FocusEvent) => void;
|
|
72
|
+
removeTag: (_item: SelectedItem) => void;
|
|
72
73
|
"update:visible": (_visible: boolean) => void;
|
|
73
74
|
filterChange: (_value: string) => void;
|
|
74
|
-
removeTag: (_item: SelectedItem) => void;
|
|
75
75
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
76
76
|
value: {
|
|
77
77
|
type: import('vue').PropType<import('./types').SelectValue>;
|
|
@@ -129,15 +129,15 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
129
129
|
onClear?: (() => any) | undefined;
|
|
130
130
|
onBlur?: ((_e: FocusEvent) => any) | undefined;
|
|
131
131
|
onFocus?: ((_e: FocusEvent) => any) | undefined;
|
|
132
|
+
onRemoveTag?: ((_item: SelectedItem) => any) | undefined;
|
|
132
133
|
"onUpdate:visible"?: ((_visible: boolean) => any) | undefined;
|
|
133
134
|
onFilterChange?: ((_value: string) => any) | undefined;
|
|
134
|
-
onRemoveTag?: ((_item: SelectedItem) => any) | undefined;
|
|
135
135
|
}>, {
|
|
136
136
|
transition: string;
|
|
137
137
|
disabled: boolean;
|
|
138
138
|
clearable: boolean;
|
|
139
139
|
visible: boolean;
|
|
140
|
-
placement: import('element-plus/es/utils/
|
|
140
|
+
placement: import('element-plus/es/utils/vue/props/types').EpPropMergeType<StringConstructor, import('element-plus').Placement, unknown> | undefined;
|
|
141
141
|
persistent: boolean;
|
|
142
142
|
teleported: boolean;
|
|
143
143
|
value: import('./types').SelectValue;
|
|
@@ -13,7 +13,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
13
13
|
required: boolean;
|
|
14
14
|
};
|
|
15
15
|
separatorIcon: {
|
|
16
|
-
readonly type: import('vue').PropType<import('element-plus/es/utils/
|
|
16
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/vue/props/types').EpPropMergeType<(new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component) | (((new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component)) | null)[], unknown, unknown>>;
|
|
17
17
|
readonly required: false;
|
|
18
18
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
19
19
|
__epPropKey: true;
|
|
@@ -30,7 +30,7 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
30
30
|
required: boolean;
|
|
31
31
|
};
|
|
32
32
|
separatorIcon: {
|
|
33
|
-
readonly type: import('vue').PropType<import('element-plus/es/utils/
|
|
33
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/vue/props/types').EpPropMergeType<(new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component) | (((new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component)) | null)[], unknown, unknown>>;
|
|
34
34
|
readonly required: false;
|
|
35
35
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
36
36
|
__epPropKey: true;
|
|
@@ -15,7 +15,7 @@ export declare const breadcrumbProps: {
|
|
|
15
15
|
required: boolean;
|
|
16
16
|
};
|
|
17
17
|
separatorIcon: {
|
|
18
|
-
readonly type: PropType<import('element-plus/es/utils/
|
|
18
|
+
readonly type: PropType<import('element-plus/es/utils/vue/props/types').EpPropMergeType<(new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component) | (((new (...args: any[]) => (string | import('vue').Component) & {}) | (() => string | import('vue').Component)) | null)[], unknown, unknown>>;
|
|
19
19
|
readonly required: false;
|
|
20
20
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
21
21
|
__epPropKey: true;
|
package/es/ele-cascader/index.js
CHANGED
|
@@ -37,8 +37,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
37
37
|
showCheckedStrategy: {},
|
|
38
38
|
checkOnClickNode: { type: Boolean },
|
|
39
39
|
showPrefix: { type: Boolean },
|
|
40
|
+
fitInputWidth: { type: [Boolean, Number] },
|
|
40
41
|
modelValue: {},
|
|
41
42
|
props: {},
|
|
43
|
+
virtualScroll: { type: Boolean },
|
|
44
|
+
itemSize: {},
|
|
45
|
+
height: {},
|
|
42
46
|
emptyValues: {},
|
|
43
47
|
valueOnClear: { type: [String, Number, Boolean, Function, null] }
|
|
44
48
|
},
|
package/es/ele-chat/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, computed, watch, onBeforeUnmount, shallowReactive, provide,
|
|
1
|
+
import { defineComponent, ref, computed, watch, onBeforeUnmount, shallowReactive, provide, openBlock, createElementBlock, normalizeClass, unref, normalizeStyle, createElementVNode, renderSlot, createCommentVNode, toDisplayString, createVNode, withCtx, createBlock, mergeProps, createTextVNode, createSlots, renderList, normalizeProps, guardReactiveProps, Fragment } from "vue";
|
|
2
2
|
import { ElIcon, ElButton } from "element-plus";
|
|
3
3
|
import { SideFoldOutlined, MessageAddOutlined, SideExpandOutlined, ArrowDown } from "../icons/index";
|
|
4
4
|
import { findTree } from "../utils/common";
|
|
@@ -9,6 +9,7 @@ import { useDropdownProviderPro } from "../ele-dropdown-provider/util";
|
|
|
9
9
|
import { useResponsive } from "../ele-pro-layout/util";
|
|
10
10
|
import EleImageViewer from "../ele-image-viewer/index";
|
|
11
11
|
import EleTooltip from "../ele-tooltip/index";
|
|
12
|
+
import EleDropdown from "../ele-dropdown/index";
|
|
12
13
|
import MainContent from "../ele-loading/components/main-content";
|
|
13
14
|
import ChatConversations from "./components/chat-conversations";
|
|
14
15
|
import ChatBubble from "./components/chat-bubble";
|
|
@@ -336,7 +337,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
336
337
|
removeTooltip
|
|
337
338
|
});
|
|
338
339
|
return (_ctx, _cache) => {
|
|
339
|
-
const _component_EleDropdown = resolveComponent("EleDropdown");
|
|
340
340
|
return openBlock(), createElementBlock("div", {
|
|
341
341
|
class: normalizeClass(["ele-chat ele-chat-wrapper", {
|
|
342
342
|
"is-collapse": sideCollapse.value,
|
|
@@ -492,8 +492,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
492
492
|
}, [
|
|
493
493
|
renderSlot(_ctx.$slots, "content"),
|
|
494
494
|
createVNode(MainContent, { class: "ele-chat-bubble-list" }, {
|
|
495
|
-
default: withCtx((
|
|
496
|
-
_ctx.messages?.length &&
|
|
495
|
+
default: withCtx((contentProps) => [
|
|
496
|
+
_ctx.messages?.length && contentProps?.["size"] == 1 ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(_ctx.messages, (item) => {
|
|
497
497
|
return openBlock(), createBlock(ChatBubble, {
|
|
498
498
|
key: item.key ?? item.content,
|
|
499
499
|
item,
|
|
@@ -514,8 +514,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
514
514
|
renderList(Object.keys(_ctx.$slots), (name) => {
|
|
515
515
|
return {
|
|
516
516
|
name,
|
|
517
|
-
fn: withCtx((
|
|
518
|
-
renderSlot(_ctx.$slots, name, mergeProps({ ref_for: true },
|
|
517
|
+
fn: withCtx((slotProps) => [
|
|
518
|
+
renderSlot(_ctx.$slots, name, mergeProps({ ref_for: true }, slotProps || {}))
|
|
519
519
|
])
|
|
520
520
|
};
|
|
521
521
|
})
|
|
@@ -588,7 +588,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
588
588
|
modelValue: previewVisible.value,
|
|
589
589
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => previewVisible.value = $event)
|
|
590
590
|
}), null, 16, ["modelValue"])) : createCommentVNode("", true),
|
|
591
|
-
unref(dropdownVirtualRef) ? (openBlock(), createBlock(
|
|
591
|
+
unref(dropdownVirtualRef) ? (openBlock(), createBlock(EleDropdown, mergeProps({ key: 2 }, unref(dropdownMergedProps), {
|
|
592
592
|
ref_key: "dropdownRef",
|
|
593
593
|
ref: dropdownRef,
|
|
594
594
|
persistent: false,
|
|
@@ -6,21 +6,21 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
6
6
|
type: import('vue').PropType<import('./types').CheckboxType>;
|
|
7
7
|
options: import('vue').PropType<CheckboxOption[] | import('./types').CheckboxOptionFunction>;
|
|
8
8
|
ariaLabel: StringConstructor;
|
|
9
|
-
modelValue: import('element-plus/es/utils/
|
|
10
|
-
disabled: import('element-plus/es/utils/
|
|
9
|
+
modelValue: import('element-plus/es/utils/vue/props/types').EpPropFinalized<(new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType) | (((new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType)) | null)[], unknown, unknown, () => never[], boolean>;
|
|
10
|
+
disabled: import('element-plus/es/utils/vue/props/types').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
11
11
|
min: NumberConstructor;
|
|
12
12
|
max: NumberConstructor;
|
|
13
13
|
size: {
|
|
14
|
-
readonly type: import('vue').PropType<import('element-plus/es/utils/
|
|
14
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/vue/props/types').EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
15
15
|
readonly required: false;
|
|
16
16
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
17
17
|
__epPropKey: true;
|
|
18
18
|
};
|
|
19
19
|
fill: StringConstructor;
|
|
20
20
|
textColor: StringConstructor;
|
|
21
|
-
tag: import('element-plus/es/utils/
|
|
22
|
-
validateEvent: import('element-plus/es/utils/
|
|
23
|
-
props: import('element-plus/es/utils/
|
|
21
|
+
tag: import('element-plus/es/utils/vue/props/types').EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
22
|
+
validateEvent: import('element-plus/es/utils/vue/props/types').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
23
|
+
props: import('element-plus/es/utils/vue/props/types').EpPropFinalized<(new (...args: any[]) => {
|
|
24
24
|
value?: string;
|
|
25
25
|
label?: string;
|
|
26
26
|
disabled?: string;
|
|
@@ -51,21 +51,21 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
51
51
|
type: import('vue').PropType<import('./types').CheckboxType>;
|
|
52
52
|
options: import('vue').PropType<CheckboxOption[] | import('./types').CheckboxOptionFunction>;
|
|
53
53
|
ariaLabel: StringConstructor;
|
|
54
|
-
modelValue: import('element-plus/es/utils/
|
|
55
|
-
disabled: import('element-plus/es/utils/
|
|
54
|
+
modelValue: import('element-plus/es/utils/vue/props/types').EpPropFinalized<(new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType) | (((new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType)) | null)[], unknown, unknown, () => never[], boolean>;
|
|
55
|
+
disabled: import('element-plus/es/utils/vue/props/types').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
56
56
|
min: NumberConstructor;
|
|
57
57
|
max: NumberConstructor;
|
|
58
58
|
size: {
|
|
59
|
-
readonly type: import('vue').PropType<import('element-plus/es/utils/
|
|
59
|
+
readonly type: import('vue').PropType<import('element-plus/es/utils/vue/props/types').EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
60
60
|
readonly required: false;
|
|
61
61
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
62
62
|
__epPropKey: true;
|
|
63
63
|
};
|
|
64
64
|
fill: StringConstructor;
|
|
65
65
|
textColor: StringConstructor;
|
|
66
|
-
tag: import('element-plus/es/utils/
|
|
67
|
-
validateEvent: import('element-plus/es/utils/
|
|
68
|
-
props: import('element-plus/es/utils/
|
|
66
|
+
tag: import('element-plus/es/utils/vue/props/types').EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
67
|
+
validateEvent: import('element-plus/es/utils/vue/props/types').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
68
|
+
props: import('element-plus/es/utils/vue/props/types').EpPropFinalized<(new (...args: any[]) => {
|
|
69
69
|
value?: string;
|
|
70
70
|
label?: string;
|
|
71
71
|
disabled?: string;
|
|
@@ -90,9 +90,9 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
90
90
|
onChange?: ((val: import('element-plus').CheckboxValueType[]) => any) | undefined;
|
|
91
91
|
"onUpdate:modelValue"?: ((val: import('element-plus').CheckboxGroupValueType) => any) | undefined;
|
|
92
92
|
}>, {
|
|
93
|
-
disabled: import('element-plus/es/utils/
|
|
93
|
+
disabled: import('element-plus/es/utils/vue/props/types').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
94
94
|
modelValue: import('element-plus').CheckboxGroupValueType;
|
|
95
|
-
validateEvent: import('element-plus/es/utils/
|
|
95
|
+
validateEvent: import('element-plus/es/utils/vue/props/types').EpPropMergeType<BooleanConstructor, unknown, unknown>;
|
|
96
96
|
props: {
|
|
97
97
|
value?: string;
|
|
98
98
|
label?: string;
|
|
@@ -11,21 +11,21 @@ export declare const checkboxGroupProps: {
|
|
|
11
11
|
/** 选项数据 */
|
|
12
12
|
options: PropType<CheckboxOption[] | CheckboxOptionFunction>;
|
|
13
13
|
ariaLabel: StringConstructor;
|
|
14
|
-
modelValue: import('element-plus/es/utils/
|
|
15
|
-
disabled: import('element-plus/es/utils/
|
|
14
|
+
modelValue: import('element-plus/es/utils/vue/props/types').EpPropFinalized<(new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType) | (((new (...args: any[]) => import('element-plus').CheckboxGroupValueType) | (() => import('element-plus').CheckboxGroupValueType)) | null)[], unknown, unknown, () => never[], boolean>;
|
|
15
|
+
disabled: import('element-plus/es/utils/vue/props/types').EpPropFinalized<BooleanConstructor, unknown, unknown, undefined, boolean>;
|
|
16
16
|
min: NumberConstructor;
|
|
17
17
|
max: NumberConstructor;
|
|
18
18
|
size: {
|
|
19
|
-
readonly type: PropType<import('element-plus/es/utils/
|
|
19
|
+
readonly type: PropType<import('element-plus/es/utils/vue/props/types').EpPropMergeType<StringConstructor, "" | "default" | "small" | "large", never>>;
|
|
20
20
|
readonly required: false;
|
|
21
21
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
22
22
|
__epPropKey: true;
|
|
23
23
|
};
|
|
24
24
|
fill: StringConstructor;
|
|
25
25
|
textColor: StringConstructor;
|
|
26
|
-
tag: import('element-plus/es/utils/
|
|
27
|
-
validateEvent: import('element-plus/es/utils/
|
|
28
|
-
props: import('element-plus/es/utils/
|
|
26
|
+
tag: import('element-plus/es/utils/vue/props/types').EpPropFinalized<StringConstructor, unknown, unknown, "div", boolean>;
|
|
27
|
+
validateEvent: import('element-plus/es/utils/vue/props/types').EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
28
|
+
props: import('element-plus/es/utils/vue/props/types').EpPropFinalized<(new (...args: any[]) => {
|
|
29
29
|
value?: string;
|
|
30
30
|
label?: string;
|
|
31
31
|
disabled?: string;
|
|
@@ -2,7 +2,7 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { UserComponent } from '../../ele-app/types';
|
|
3
3
|
import { DataItem } from '../../ele-data-table/types';
|
|
4
4
|
import { ProFormItemTypeData, ScreenSize } from '../../ele-pro-form/types';
|
|
5
|
-
import { EditConfig, CrudField, EditApi, GetFieldsFormItemsFunction, GetAndCacheCodeFunction } from '../types';
|
|
5
|
+
import { EditConfig, ListConfig, CrudField, EditApi, DetailApi, GetFieldsFormItemsFunction, GetAndCacheCodeFunction } from '../types';
|
|
6
6
|
|
|
7
7
|
declare function __VLS_template(): Partial<Record<string, (_: any) => any>> & Partial<Record<string, (_: any) => any>>;
|
|
8
8
|
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
@@ -14,6 +14,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
14
14
|
title: StringConstructor;
|
|
15
15
|
/** 编辑配置 */
|
|
16
16
|
editConfig: PropType<EditConfig>;
|
|
17
|
+
/** 列表配置 */
|
|
18
|
+
listConfig: PropType<ListConfig>;
|
|
17
19
|
/** 字段数据 */
|
|
18
20
|
fields: PropType<CrudField[]>;
|
|
19
21
|
/** 获取字段数据对应的表单项的方法 */
|
|
@@ -27,6 +29,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
27
29
|
proFormComponent: PropType<UserComponent>;
|
|
28
30
|
/** 修改数据接口 */
|
|
29
31
|
editApi: PropType<EditApi | string>;
|
|
32
|
+
/** 详情接口 */
|
|
33
|
+
detailApi: PropType<DetailApi | string>;
|
|
30
34
|
/** 高级表单组件类型数据 */
|
|
31
35
|
itemTypeData: PropType<ProFormItemTypeData[]>;
|
|
32
36
|
/** 远程数据源请求工具 */
|
|
@@ -37,6 +41,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
37
41
|
"update:modelValue": (_visible?: boolean | undefined) => void;
|
|
38
42
|
editError: (_e: Error) => void;
|
|
39
43
|
editDone: (_msg?: string | undefined) => void;
|
|
44
|
+
detailError: (_e: Error) => void;
|
|
45
|
+
detailDone: (_data?: DataItem | undefined) => void;
|
|
40
46
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
41
47
|
/** 弹窗是否打开 */
|
|
42
48
|
modelValue: PropType<boolean>;
|
|
@@ -46,6 +52,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
46
52
|
title: StringConstructor;
|
|
47
53
|
/** 编辑配置 */
|
|
48
54
|
editConfig: PropType<EditConfig>;
|
|
55
|
+
/** 列表配置 */
|
|
56
|
+
listConfig: PropType<ListConfig>;
|
|
49
57
|
/** 字段数据 */
|
|
50
58
|
fields: PropType<CrudField[]>;
|
|
51
59
|
/** 获取字段数据对应的表单项的方法 */
|
|
@@ -59,6 +67,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
59
67
|
proFormComponent: PropType<UserComponent>;
|
|
60
68
|
/** 修改数据接口 */
|
|
61
69
|
editApi: PropType<EditApi | string>;
|
|
70
|
+
/** 详情接口 */
|
|
71
|
+
detailApi: PropType<DetailApi | string>;
|
|
62
72
|
/** 高级表单组件类型数据 */
|
|
63
73
|
itemTypeData: PropType<ProFormItemTypeData[]>;
|
|
64
74
|
/** 远程数据源请求工具 */
|
|
@@ -69,6 +79,8 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
69
79
|
"onUpdate:modelValue"?: ((_visible?: boolean | undefined) => any) | undefined;
|
|
70
80
|
onEditError?: ((_e: Error) => any) | undefined;
|
|
71
81
|
onEditDone?: ((_msg?: string | undefined) => any) | undefined;
|
|
82
|
+
onDetailError?: ((_e: Error) => any) | undefined;
|
|
83
|
+
onDetailDone?: ((_data?: DataItem | undefined) => any) | undefined;
|
|
72
84
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
73
85
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
74
86
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, reactive, computed, watch, openBlock, createBlock, mergeProps, createSlots, withCtx, resolveDynamicComponent, renderList, unref, renderSlot, normalizeProps, guardReactiveProps, createVNode } from "vue";
|
|
2
2
|
import { getSlotsMap } from "../../utils/common";
|
|
3
|
+
import { getValue } from "../../ele-data-table/util";
|
|
3
4
|
import EleModal from "../../ele-modal/index";
|
|
4
5
|
import EleProForm from "../../ele-pro-form/index";
|
|
5
6
|
import { setValue, mergeValue, getFormInitValue } from "../../ele-pro-form/util";
|
|
@@ -17,6 +18,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
title: String,
|
|
18
19
|
/** 编辑配置 */
|
|
19
20
|
editConfig: Object,
|
|
21
|
+
/** 列表配置 */
|
|
22
|
+
listConfig: Object,
|
|
20
23
|
/** 字段数据 */
|
|
21
24
|
fields: Array,
|
|
22
25
|
/** 获取字段数据对应的表单项的方法 */
|
|
@@ -30,6 +33,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
30
33
|
proFormComponent: [String, Object, Function],
|
|
31
34
|
/** 修改数据接口 */
|
|
32
35
|
editApi: [Function, String],
|
|
36
|
+
/** 详情接口 */
|
|
37
|
+
detailApi: [Function, String],
|
|
33
38
|
/** 高级表单组件类型数据 */
|
|
34
39
|
itemTypeData: Array,
|
|
35
40
|
/** 远程数据源请求工具 */
|
|
@@ -43,7 +48,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
43
48
|
/** 编辑保存失败事件 */
|
|
44
49
|
editError: (_e) => true,
|
|
45
50
|
/** 编辑保存成功事件 */
|
|
46
|
-
editDone: (_msg) => true
|
|
51
|
+
editDone: (_msg) => true,
|
|
52
|
+
/** 详情查询失败事件 */
|
|
53
|
+
detailError: (_e) => true,
|
|
54
|
+
/** 详情查询成功事件 */
|
|
55
|
+
detailDone: (_data) => true
|
|
47
56
|
},
|
|
48
57
|
setup(__props, { emit: __emit }) {
|
|
49
58
|
const props = __props;
|
|
@@ -127,11 +136,36 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
127
136
|
}
|
|
128
137
|
return items;
|
|
129
138
|
});
|
|
139
|
+
const queryDetailData = () => {
|
|
140
|
+
if (!props.detailApi) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const detailApiFunc = typeof props.detailApi === "function" ? props.detailApi : props.detailApi.startsWith(codeStringPrefix) ? props.getAndCacheCode(props.detailApi) : void 0;
|
|
144
|
+
if (!detailApiFunc) {
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
loading.value = true;
|
|
148
|
+
const rowKey = props.listConfig?.tableProps?.rowKey;
|
|
149
|
+
const dataKey = rowKey ? getValue(props.data, rowKey) : void 0;
|
|
150
|
+
detailApiFunc(dataKey, props.data).then((data) => {
|
|
151
|
+
loading.value = false;
|
|
152
|
+
handleResetEditForm(data);
|
|
153
|
+
emit("detailDone", data);
|
|
154
|
+
}).catch((e) => {
|
|
155
|
+
loading.value = false;
|
|
156
|
+
emit("detailError", e);
|
|
157
|
+
});
|
|
158
|
+
};
|
|
130
159
|
watch(
|
|
131
160
|
() => props.modelValue,
|
|
132
161
|
(visible) => {
|
|
133
162
|
if (visible) {
|
|
134
|
-
|
|
163
|
+
if (!props.detailApi) {
|
|
164
|
+
handleResetEditForm(props.data);
|
|
165
|
+
} else {
|
|
166
|
+
handleResetEditForm();
|
|
167
|
+
queryDetailData();
|
|
168
|
+
}
|
|
135
169
|
}
|
|
136
170
|
}
|
|
137
171
|
);
|