wlwy-package 4.0.0-beta.2 → 4.0.0-beta.21
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/style.css +2 -1
- package/dist/types/axios/index.d.ts +6 -0
- package/dist/types/axios/service.d.ts +21 -0
- package/dist/types/axios/types/index.d.ts +32 -0
- package/dist/types/components/antd/index.d.ts +11 -0
- package/dist/types/components/antd/src/button.vue.d.ts +10 -0
- package/dist/types/components/antd/src/datePicker.vue.d.ts +16 -0
- package/dist/types/components/antd/src/descriptions-item.vue.d.ts +9 -0
- package/dist/types/components/antd/src/descriptions.vue.d.ts +6 -0
- package/dist/types/components/antd/src/modal.vue.d.ts +30 -0
- package/dist/types/components/antd/src/rangePicker.vue.d.ts +24 -0
- package/dist/types/components/antd/src/select.vue.d.ts +22 -0
- package/dist/types/components/antd/src/statistic.vue.d.ts +3 -0
- package/dist/types/components/antd/src/upload.vue.d.ts +40 -0
- package/dist/types/components/antd/type.d.ts +188 -0
- package/dist/types/components/common/index.d.ts +20 -0
- package/dist/types/components/common/src/Analysis.vue.d.ts +5 -0
- package/dist/types/components/common/src/Redirect.vue.d.ts +2 -0
- package/dist/types/components/common/src/configProvider.vue.d.ts +13 -0
- package/dist/types/components/common/src/copyable.vue.d.ts +16 -0
- package/dist/types/components/common/src/cropper.vue.d.ts +29 -0
- package/dist/types/components/common/src/dropdown.vue.d.ts +23 -0
- package/dist/types/components/common/src/noData.vue.d.ts +7 -0
- package/dist/types/components/common/src/page.vue.d.ts +38 -0
- package/dist/types/components/common/src/page404.vue.d.ts +11 -0
- package/dist/types/components/common/src/slashHeader.vue.d.ts +7 -0
- package/dist/types/components/common/src/upload-modal.vue.d.ts +43 -0
- package/dist/types/components/common/src/warehouseSelectGate.vue.d.ts +2 -0
- package/dist/types/components/common/type.d.ts +242 -0
- package/dist/types/components/form/business/index.d.ts +8 -0
- package/dist/types/components/form/business/src/channel.vue.d.ts +5 -0
- package/dist/types/components/form/business/src/country.vue.d.ts +3 -0
- package/dist/types/components/form/business/src/customer.vue.d.ts +6 -0
- package/dist/types/components/form/business/src/sku.vue.d.ts +16 -0
- package/dist/types/components/form/business/type.d.ts +39 -0
- package/dist/types/components/form/default/index.d.ts +39 -0
- package/dist/types/components/form/default/src/checkbox.vue.d.ts +22 -0
- package/dist/types/components/form/default/src/custom.vue.d.ts +14 -0
- package/dist/types/components/form/default/src/datePicker.vue.d.ts +5 -0
- package/dist/types/components/form/default/src/dateRange.vue.d.ts +10 -0
- package/dist/types/components/form/default/src/form.vue.d.ts +430 -0
- package/dist/types/components/form/default/src/formCol.vue.d.ts +16 -0
- package/dist/types/components/form/default/src/formItem.vue.d.ts +38 -0
- package/dist/types/components/form/default/src/formItemRest.vue.d.ts +2 -0
- package/dist/types/components/form/default/src/formMultiItem.vue.d.ts +31 -0
- package/dist/types/components/form/default/src/formMultiItemOption.vue.d.ts +14 -0
- package/dist/types/components/form/default/src/input.vue.d.ts +26 -0
- package/dist/types/components/form/default/src/inputI18n.vue.d.ts +14 -0
- package/dist/types/components/form/default/src/inputMatch.vue.d.ts +23 -0
- package/dist/types/components/form/default/src/inputNumber.vue.d.ts +16 -0
- package/dist/types/components/form/default/src/inputPassword.vue.d.ts +16 -0
- package/dist/types/components/form/default/src/inputTags.vue.d.ts +23 -0
- package/dist/types/components/form/default/src/numberRange.vue.d.ts +9 -0
- package/dist/types/components/form/default/src/radio.vue.d.ts +22 -0
- package/dist/types/components/form/default/src/select.vue.d.ts +27 -0
- package/dist/types/components/form/default/src/textarea.vue.d.ts +14 -0
- package/dist/types/components/form/default/src/timePicker.vue.d.ts +6 -0
- package/dist/types/components/form/default/src/upload-image.vue.d.ts +23 -0
- package/dist/types/components/form/default/src/upload.vue.d.ts +12 -0
- package/dist/types/components/form/default/type.d.ts +624 -0
- package/dist/types/components/form/index.d.ts +2 -0
- package/dist/types/components/form/type.d.ts +2 -0
- package/dist/types/components/icon/index.d.ts +4 -0
- package/dist/types/components/icon/src/icon.vue.d.ts +12 -0
- package/dist/types/components/icon/src/index.vue.d.ts +9 -0
- package/dist/types/components/icon/src/switch.vue.d.ts +18 -0
- package/dist/types/components/icon/type.d.ts +41 -0
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/components/layout/blank.vue.d.ts +2 -0
- package/dist/types/components/layout/index.d.ts +7 -0
- package/dist/types/components/layout/index.vue.d.ts +9 -0
- package/dist/types/components/layout/skeleton/button.vue.d.ts +8 -0
- package/dist/types/components/layout/skeleton/descriptions.vue.d.ts +18 -0
- package/dist/types/components/layout/skeleton/form.vue.d.ts +25 -0
- package/dist/types/components/layout/skeleton/list.vue.d.ts +2 -0
- package/dist/types/components/layout/skeleton/switch.vue.d.ts +2 -0
- package/dist/types/components/layout/skeleton/table.vue.d.ts +20 -0
- package/dist/types/components/layout/skeleton/utils.d.ts +88 -0
- package/dist/types/components/layout/src/footer.vue.d.ts +2 -0
- package/dist/types/components/layout/src/header/index.vue.d.ts +10 -0
- package/dist/types/components/layout/src/header/modules/download.vue.d.ts +6 -0
- package/dist/types/components/layout/src/header/modules/language.vue.d.ts +2 -0
- package/dist/types/components/layout/src/header/modules/password-modal.vue.d.ts +9 -0
- package/dist/types/components/layout/src/header/modules/topMenu.vue.d.ts +2 -0
- package/dist/types/components/layout/src/header/modules/warehouse.vue.d.ts +2 -0
- package/dist/types/components/layout/src/logo.vue.d.ts +2 -0
- package/dist/types/components/layout/src/siderMenu.vue.d.ts +2 -0
- package/dist/types/components/layout/src/subMenuItem.vue.d.ts +6 -0
- package/dist/types/components/layout/src/tabsNav.vue.d.ts +2 -0
- package/dist/types/components/layout/type.d.ts +17 -0
- package/dist/types/components/private/inputTags.vue.d.ts +21 -0
- package/dist/types/components/table/constants.d.ts +13 -0
- package/dist/types/components/table/index.d.ts +8 -0
- package/dist/types/components/table/resolveToolbarButtons.d.ts +16 -0
- package/dist/types/components/table/src/action-column.vue.d.ts +11 -0
- package/dist/types/components/table/src/column.vue.d.ts +119 -0
- package/dist/types/components/table/src/detail-search.vue.d.ts +31 -0
- package/dist/types/components/table/src/list-search.vue.d.ts +32 -0
- package/dist/types/components/table/src/pager.vue.d.ts +325 -0
- package/dist/types/components/table/src/search.vue.d.ts +44 -0
- package/dist/types/components/table/src/table.vue.d.ts +948 -0
- package/dist/types/components/table/src/toolbarButtons.vue.d.ts +18 -0
- package/dist/types/components/table/type.d.ts +354 -0
- package/dist/types/components/table/useWTableConfig.d.ts +38 -0
- package/dist/types/components/table/vxeDefaultConfig.d.ts +9 -0
- package/dist/types/components/table/warnDeprecated.d.ts +4 -0
- package/dist/types/config.d.ts +29 -0
- package/dist/types/directive/auth.d.ts +4 -0
- package/dist/types/directive/auths.d.ts +4 -0
- package/dist/types/directive/index.d.ts +6 -0
- package/dist/types/hooks/business/index.d.ts +5 -0
- package/dist/types/hooks/business/src/index.d.ts +5 -0
- package/dist/types/hooks/business/src/useCountryDict.d.ts +41 -0
- package/dist/types/hooks/business/src/useCurrencyDict.d.ts +29 -0
- package/dist/types/hooks/business/src/useCustomerDict.d.ts +41 -0
- package/dist/types/hooks/business/src/useWarehouseSelect.d.ts +15 -0
- package/dist/types/hooks/business/src/useWarehouseZoneDict.d.ts +29 -0
- package/dist/types/hooks/business/useBusinessDict.d.ts +13 -0
- package/dist/types/hooks/business/useDict.d.ts +35 -0
- package/dist/types/hooks/business/useDictRaw.d.ts +14 -0
- package/dist/types/hooks/index.d.ts +2 -0
- package/dist/types/hooks/private/index.d.ts +7 -0
- package/dist/types/hooks/private/src/useFormContext.d.ts +12 -0
- package/dist/types/hooks/private/src/useFormDefaultValue.d.ts +42 -0
- package/dist/types/hooks/private/src/useFormFieldRegister.d.ts +13 -0
- package/dist/types/hooks/private/src/useFormItemProps.d.ts +45 -0
- package/dist/types/hooks/private/src/useKey.d.ts +1 -0
- package/dist/types/hooks/private/src/useRenderCell.d.ts +71 -0
- package/dist/types/hooks/private/src/useTabsNav.d.ts +13 -0
- package/dist/types/hooks/web/index.d.ts +16 -0
- package/dist/types/hooks/web/key.d.ts +4 -0
- package/dist/types/hooks/web/src/useAffix.d.ts +19 -0
- package/dist/types/hooks/web/src/useCatchPreloadError.d.ts +6 -0
- package/dist/types/hooks/web/src/useCookie.d.ts +11 -0
- package/dist/types/hooks/web/src/useDate.d.ts +86 -0
- package/dist/types/hooks/web/src/useEnum.d.ts +28 -0
- package/dist/types/hooks/web/src/useExport.d.ts +4 -0
- package/dist/types/hooks/web/src/useForm.d.ts +1 -0
- package/dist/types/hooks/web/src/useI18n.d.ts +26 -0
- package/dist/types/hooks/web/src/useListPager.d.ts +37 -0
- package/dist/types/hooks/web/src/useLocale.d.ts +6 -0
- package/dist/types/hooks/web/src/useNProgress.d.ts +5 -0
- package/dist/types/hooks/web/src/useNavigate.d.ts +11 -0
- package/dist/types/hooks/web/src/usePageBack.d.ts +19 -0
- package/dist/types/hooks/web/src/useWindowSize.d.ts +8 -0
- package/dist/types/hooks/web/type.d.ts +70 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/keys/index.d.ts +76 -0
- package/dist/types/keys/public.d.ts +0 -0
- package/dist/types/locales/enUs.d.ts +20 -0
- package/dist/types/locales/index.d.ts +4 -0
- package/dist/types/locales/zhCn.d.ts +20 -0
- package/dist/types/plugins/index.d.ts +1 -0
- package/dist/types/plugins/vueI18n/helper.d.ts +1 -0
- package/dist/types/plugins/vueI18n/index.d.ts +14 -0
- package/dist/types/setup/dayjs.d.ts +7 -0
- package/dist/types/setup/index.d.ts +3 -0
- package/dist/types/setup/vxe.d.ts +10 -0
- package/dist/types/store/index.d.ts +9 -0
- package/dist/types/store/modules/common.d.ts +30 -0
- package/dist/types/store/modules/dict.d.ts +126 -0
- package/dist/types/store/modules/language.d.ts +91 -0
- package/dist/types/store/modules/tagsNav.d.ts +83 -0
- package/dist/types/store/modules/userPermission.d.ts +59 -0
- package/dist/types/type.d.ts +53 -0
- package/dist/types/utils/config.d.ts +1 -0
- package/dist/types/utils/createRefInstanceProxy.d.ts +13 -0
- package/dist/types/utils/form.d.ts +9 -0
- package/dist/types/utils/formatCellValue.d.ts +88 -0
- package/dist/types/utils/getPrefixTitle.d.ts +5 -0
- package/dist/types/utils/index.d.ts +50 -0
- package/dist/types/utils/localStorage.d.ts +52 -0
- package/dist/types/utils/resolveDefaultValue.d.ts +12 -0
- package/dist/types/utils/type.d.ts +32 -0
- package/dist/wlwy-package.es.js +2 -10390
- package/package.json +22 -21
- package/dist/charts/index.es.js +0 -4
- package/dist/editor/index.es.js +0 -4
- package/dist/editor-core-BGPSxIdD.js +0 -21080
- package/dist/index-5P9J8Ohq.js +0 -9633
- package/dist/index-nd_lc6wA.js +0 -101
- package/dist/index.vue_vue_type_script_setup_true_lang-BHLjWGpQ.js +0 -73515
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
collapseButtons?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare var __VLS_6: {}, __VLS_44: {};
|
|
5
|
+
type __VLS_Slots = {} & {
|
|
6
|
+
prefix?: (props: typeof __VLS_6) => any;
|
|
7
|
+
} & {
|
|
8
|
+
default?: (props: typeof __VLS_44) => any;
|
|
9
|
+
};
|
|
10
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
11
|
+
collapseButtons: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, __VLS_Slots>;
|
|
13
|
+
export default _default;
|
|
14
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
15
|
+
new (): {
|
|
16
|
+
$slots: S;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import type { FormInstance, FormProps, InputNumberProps, InputProps, SelectProps, TextAreaProps } from 'ant-design-vue';
|
|
2
|
+
import type { VxeColorPickerProps, VxeDatePickerProps, VxeDateRangePickerProps, VxeIconPickerProps, VxeInputProps, VxeNumberInputProps, VxePagerInstance, VxePagerProps, VxeSelectProps, VxeSwitchProps, VxeTableSelectProps, VxeTextareaProps, VxeTreeSelectProps } from 'vxe-pc-ui';
|
|
3
|
+
import type { VxeColumnProps, VxeColumnPropTypes, VxeTableInstance, VxeTableProps, VxeToolbarInstance, VxeToolbarProps } from 'vxe-table';
|
|
4
|
+
import type { RenderCellProps, RenderCellFormatType } from '../../hooks/private';
|
|
5
|
+
import type { ListResult } from '../../type';
|
|
6
|
+
import type { Slot } from 'vue';
|
|
7
|
+
import { WSelectProps } from '../antd/type';
|
|
8
|
+
/**
|
|
9
|
+
* w-toolbar 组件属性
|
|
10
|
+
*/
|
|
11
|
+
export interface WToolbarProps extends Omit<VxeToolbarProps, 'id'> {
|
|
12
|
+
toolid?: string;
|
|
13
|
+
/**
|
|
14
|
+
* `#toolbar-buttons` 中 `w-button` 超过 4 个时折叠进「更多」
|
|
15
|
+
* @default true
|
|
16
|
+
*/
|
|
17
|
+
collapseButtons?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 是否在工具栏展示「已选择 x 项 / 共 y 项」
|
|
20
|
+
* 仅在 `showCheckbox` 为 true 时生效
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showSelectionSummary?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** 多子组件共享,平铺在 WTable 顶层 */
|
|
26
|
+
export type WTableSharedPropKeys = 'loading' | 'size' | 'perfect' | 'border' | 'align';
|
|
27
|
+
export type WToolbarOnlyProps = Omit<WToolbarProps, WTableSharedPropKeys>;
|
|
28
|
+
export type WPagerOnlyProps = Omit<WPagerProps, WTableSharedPropKeys | 'dataSource'>;
|
|
29
|
+
export type WTableOnlyProps<Row = any> = Omit<VxeTableProps<Row>, 'data' | WTableSharedPropKeys>;
|
|
30
|
+
/**
|
|
31
|
+
* w-table 组件属性
|
|
32
|
+
*/
|
|
33
|
+
export interface WTableProps<Row = any> extends WTableOnlyProps<Row>, Partial<Pick<WToolbarProps & WPagerProps, WTableSharedPropKeys>> {
|
|
34
|
+
data?: Row[];
|
|
35
|
+
/**
|
|
36
|
+
* 列表接口结果。
|
|
37
|
+
* 存在时 `records` / `total` / `current` / `size` 优先级高于 `data` 与 `pager` 对应分页字段,并按服务端分页处理。
|
|
38
|
+
*/
|
|
39
|
+
listResult?: Readonly<ListResult<Row>>;
|
|
40
|
+
showPager?: boolean;
|
|
41
|
+
/** 是否显示复选框列 */
|
|
42
|
+
showCheckbox?: boolean;
|
|
43
|
+
/** 是否显示序号列 @default true */
|
|
44
|
+
showSeq?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* 是否显示工具栏。
|
|
47
|
+
* 若存在 `#toolbar-buttons` / `#toolbar-tools`,则以 slot 为准强制显示。
|
|
48
|
+
*/
|
|
49
|
+
showToolbar?: boolean;
|
|
50
|
+
toolbar?: Partial<WToolbarOnlyProps>;
|
|
51
|
+
pager?: Partial<WPagerOnlyProps>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* w-table 插槽
|
|
55
|
+
*/
|
|
56
|
+
export interface WTableSlots {
|
|
57
|
+
'toolbar-buttons'?: Slot;
|
|
58
|
+
'toolbar-tools'?: Slot;
|
|
59
|
+
'pager-left'?: Slot;
|
|
60
|
+
'pager-right'?: Slot;
|
|
61
|
+
default?: Slot;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* w-pager组件示例
|
|
65
|
+
*/
|
|
66
|
+
export interface WPagerInstance extends VxePagerInstance {
|
|
67
|
+
/**
|
|
68
|
+
* 获取分页实例
|
|
69
|
+
*/
|
|
70
|
+
getPagerInstance: () => VxePagerInstance | undefined;
|
|
71
|
+
}
|
|
72
|
+
/** w-table.resetPager 参数 */
|
|
73
|
+
export type ResetPagerParams = {
|
|
74
|
+
currentPage?: number;
|
|
75
|
+
pageSize?: number;
|
|
76
|
+
};
|
|
77
|
+
/** w-table 内部分页快照 */
|
|
78
|
+
export type PagerState = {
|
|
79
|
+
currentPage: number;
|
|
80
|
+
pageSize: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* w-table 组件实例
|
|
84
|
+
*
|
|
85
|
+
* 说明:vxe-table 的 `VxeTableInstance<D>` 未把 `D` 透传到 `TableMethods`,
|
|
86
|
+
* 因此需在此显式覆盖常用返回行数据的方法,使 `Row` 生效。
|
|
87
|
+
*/
|
|
88
|
+
export interface WTableInstance<Row = any> extends VxeTableInstance<Row> {
|
|
89
|
+
/**
|
|
90
|
+
* 获取数据,和 data 的行为一致;也可指定索引获取单行
|
|
91
|
+
*/
|
|
92
|
+
getData: {
|
|
93
|
+
(): Row[];
|
|
94
|
+
(rowIndex: number): Row;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* 获取当前表格数据
|
|
98
|
+
* - fullData:完整全量表体数据
|
|
99
|
+
* - visibleData:处理条件后的全量表体数据
|
|
100
|
+
* - tableData:当前渲染中的表体数据
|
|
101
|
+
* - footerData:当前渲染中的表尾数据
|
|
102
|
+
*/
|
|
103
|
+
getTableData: () => {
|
|
104
|
+
fullData: Row[];
|
|
105
|
+
visibleData: Row[];
|
|
106
|
+
tableData: Row[];
|
|
107
|
+
footerData: Row[][];
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* 获取表格全量数据;开启 tree-config 时返回带层级的树结构
|
|
111
|
+
*/
|
|
112
|
+
getFullData: () => Row[];
|
|
113
|
+
/**
|
|
114
|
+
* 根据行唯一主键获取行
|
|
115
|
+
* @param rowid 行主键
|
|
116
|
+
*/
|
|
117
|
+
getRowById: (rowid: string | number | null) => Row | null;
|
|
118
|
+
/**
|
|
119
|
+
* 用于 type=checkbox,获取已选中的行数据
|
|
120
|
+
* @param isFull 为 true 时包含被筛选掉的已选数据
|
|
121
|
+
*/
|
|
122
|
+
getCheckboxRecords: (isFull?: boolean) => Row[];
|
|
123
|
+
/**
|
|
124
|
+
* 用于 checkbox-config.reserve,获取已保留选中的行数据(不含当前页已选)
|
|
125
|
+
* @param isFull 为 true 时包含被筛选掉的保留选中数据
|
|
126
|
+
*/
|
|
127
|
+
getCheckboxReserveRecords: (isFull?: boolean) => Row[];
|
|
128
|
+
/**
|
|
129
|
+
* 用于 type=checkbox,获取半选状态的行数据
|
|
130
|
+
* @param isFull 为 true 时获取完整半选数据
|
|
131
|
+
*/
|
|
132
|
+
getCheckboxIndeterminateRecords: (isFull?: boolean) => Row[];
|
|
133
|
+
/**
|
|
134
|
+
* 用于 type=radio,获取当前已选中的行数据
|
|
135
|
+
* @param isFull 为 true 时获取完整选中数据
|
|
136
|
+
*/
|
|
137
|
+
getRadioRecord: (isFull?: boolean) => Row | null;
|
|
138
|
+
/**
|
|
139
|
+
* 用于 radio-config.reserve,获取已保留选中的行数据
|
|
140
|
+
* @param isFull 为 true 时获取完整保留选中数据
|
|
141
|
+
*/
|
|
142
|
+
getRadioReserveRecord: (isFull?: boolean) => Row[];
|
|
143
|
+
/**
|
|
144
|
+
* 用于 row-config.isCurrent,获取当前高亮行数据
|
|
145
|
+
*/
|
|
146
|
+
getCurrentRecord: () => Row | null;
|
|
147
|
+
/**
|
|
148
|
+
* 获取待删除(pending)状态的行数据
|
|
149
|
+
*/
|
|
150
|
+
getPendingRecords: () => Row[];
|
|
151
|
+
/**
|
|
152
|
+
* 用于 expand-config,获取已展开的行数据
|
|
153
|
+
*/
|
|
154
|
+
getRowExpandRecords: () => Row[];
|
|
155
|
+
/**
|
|
156
|
+
* 用于 tree-config,获取已展开的树节点
|
|
157
|
+
* 注意:即使父节点被收起,只要该节点仍处于展开状态也能获取到
|
|
158
|
+
*/
|
|
159
|
+
getTreeExpandRecords: () => Row[];
|
|
160
|
+
/**
|
|
161
|
+
* 只对 tree-config 有效,获取指定行的子级
|
|
162
|
+
* @param rowOrRowid 行对象或行主键
|
|
163
|
+
*/
|
|
164
|
+
getTreeRowChildren: (rowOrRowid: any) => Row[];
|
|
165
|
+
/**
|
|
166
|
+
* 只对 tree-config 有效,获取指定行的父级
|
|
167
|
+
* @param rowOrRowid 行对象或行主键
|
|
168
|
+
*/
|
|
169
|
+
getTreeParentRow: (rowOrRowid: any) => Row | null;
|
|
170
|
+
/**
|
|
171
|
+
* 获取内部 VxeTable 实例
|
|
172
|
+
*/
|
|
173
|
+
getTableInstance: () => VxeTableInstance<Row> | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* 获取表格工具栏实例
|
|
176
|
+
*/
|
|
177
|
+
getToolbarInstance: () => VxeToolbarInstance | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* 获取表格分页实例
|
|
180
|
+
*/
|
|
181
|
+
getPagerInstance: () => WPagerInstance | undefined;
|
|
182
|
+
/**
|
|
183
|
+
* 读取内部分页状态(供列表页拼请求参数)
|
|
184
|
+
*/
|
|
185
|
+
getPagerState: () => PagerState;
|
|
186
|
+
/**
|
|
187
|
+
* 更新内部分页状态(默认回到第 1 页;pageSize 不传则保持)
|
|
188
|
+
*/
|
|
189
|
+
resetPager: (params?: ResetPagerParams) => void;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* w-column组件属性
|
|
193
|
+
*/
|
|
194
|
+
export type WColumnProp = Omit<RenderCellProps, 'type' | 'field'> & Pick<VxeColumnProps, 'field' | 'title' | 'fixed' | 'width' | 'minWidth' | 'headerClassName' | 'formatter' | 'showOverflow'> & {
|
|
195
|
+
/**
|
|
196
|
+
* 渲染类型
|
|
197
|
+
*/
|
|
198
|
+
type?: VxeColumnProps['type'] | RenderCellFormatType | 'action';
|
|
199
|
+
/**
|
|
200
|
+
* 编辑渲染器
|
|
201
|
+
*/
|
|
202
|
+
editRender?: WColumnEditRender;
|
|
203
|
+
/**
|
|
204
|
+
* 列是否可排序
|
|
205
|
+
*/
|
|
206
|
+
sortable?: boolean;
|
|
207
|
+
/**
|
|
208
|
+
* 列头提示图标
|
|
209
|
+
* @default 'QuestionCircleOutlined'
|
|
210
|
+
*/
|
|
211
|
+
suffixIcon?: 'QuestionCircleOutlined' | 'InfoCircleOutlined' | 'ExclamationCircleOutlined' | Slot;
|
|
212
|
+
/**
|
|
213
|
+
* 列头提示图标
|
|
214
|
+
* @default 'QuestionCircleOutlined'
|
|
215
|
+
*/
|
|
216
|
+
prefixIcon?: 'QuestionCircleOutlined' | 'InfoCircleOutlined' | 'ExclamationCircleOutlined' | Slot;
|
|
217
|
+
/**
|
|
218
|
+
* 列头提示内容
|
|
219
|
+
*/
|
|
220
|
+
tipsContent?: string | Slot;
|
|
221
|
+
/**
|
|
222
|
+
* 默认值
|
|
223
|
+
*/
|
|
224
|
+
defaultValue?: string;
|
|
225
|
+
};
|
|
226
|
+
/**
|
|
227
|
+
* w-column 编辑渲染器名称
|
|
228
|
+
*/
|
|
229
|
+
export type WColumnEditRenderName =
|
|
230
|
+
/**
|
|
231
|
+
* vxetable自带编辑组件
|
|
232
|
+
*/
|
|
233
|
+
'VxeInput' | 'VxeSelect' | 'VxeSwitch' | 'VxeDatePicker' | 'VxeDateRangePicker' | 'VxeNumberInput' | 'VxeTreeSelect' | 'VxeTableSelect' | 'VxeIconPicker' | 'VxeColorPicker'
|
|
234
|
+
/**
|
|
235
|
+
* 以下是拓展的编辑组件
|
|
236
|
+
*/
|
|
237
|
+
| 'VxeTextarea' | 'ATextarea' | 'AInput' | 'AInputNumber' | 'ASelect' | 'WSelect';
|
|
238
|
+
/**
|
|
239
|
+
* w-column 编辑渲染器 props 映射(key 必须覆盖 WColumnEditRenderName)
|
|
240
|
+
*/
|
|
241
|
+
export type WColumnEditRenderProps = {
|
|
242
|
+
[K in WColumnEditRenderName]: {
|
|
243
|
+
VxeInput: VxeInputProps;
|
|
244
|
+
VxeSelect: VxeSelectProps;
|
|
245
|
+
VxeSwitch: VxeSwitchProps;
|
|
246
|
+
VxeDatePicker: VxeDatePickerProps;
|
|
247
|
+
VxeDateRangePicker: VxeDateRangePickerProps;
|
|
248
|
+
VxeNumberInput: VxeNumberInputProps;
|
|
249
|
+
VxeTreeSelect: VxeTreeSelectProps;
|
|
250
|
+
VxeTableSelect: VxeTableSelectProps;
|
|
251
|
+
VxeIconPicker: VxeIconPickerProps;
|
|
252
|
+
VxeColorPicker: VxeColorPickerProps;
|
|
253
|
+
VxeTextarea: VxeTextareaProps;
|
|
254
|
+
ATextarea: TextAreaProps;
|
|
255
|
+
AInput: InputProps;
|
|
256
|
+
AInputNumber: InputNumberProps;
|
|
257
|
+
ASelect: SelectProps;
|
|
258
|
+
WSelect: WSelectProps;
|
|
259
|
+
}[K];
|
|
260
|
+
};
|
|
261
|
+
/**
|
|
262
|
+
* w-column 编辑渲染器属性(name 与 props 联动)
|
|
263
|
+
*/
|
|
264
|
+
export type WColumnEditRender = {
|
|
265
|
+
[K in WColumnEditRenderName]: Omit<VxeColumnPropTypes.EditRender, 'name' | 'props'> & {
|
|
266
|
+
/**
|
|
267
|
+
* 渲染器名称
|
|
268
|
+
*/
|
|
269
|
+
name?: K;
|
|
270
|
+
/**
|
|
271
|
+
* 目标组件渲染的参数
|
|
272
|
+
*/
|
|
273
|
+
props?: WColumnEditRenderProps[K];
|
|
274
|
+
};
|
|
275
|
+
}[WColumnEditRenderName];
|
|
276
|
+
/**
|
|
277
|
+
* w-pager 组件属性
|
|
278
|
+
*/
|
|
279
|
+
export interface WPagerProps<T = any[]> extends VxePagerProps {
|
|
280
|
+
/**
|
|
281
|
+
* 数据源
|
|
282
|
+
*/
|
|
283
|
+
dataSource?: T;
|
|
284
|
+
}
|
|
285
|
+
/**********************WSearch组件********************** */
|
|
286
|
+
/**
|
|
287
|
+
* WSearch 组件属性
|
|
288
|
+
*/
|
|
289
|
+
export interface WSearchProps extends Pick<FormProps, 'rules' | 'layout'> {
|
|
290
|
+
/**
|
|
291
|
+
* 搜索表单 model(与 v-model:form 二选一;优先 form)
|
|
292
|
+
*/
|
|
293
|
+
model?: Record<string, any>;
|
|
294
|
+
/**
|
|
295
|
+
* 每行几列
|
|
296
|
+
*/
|
|
297
|
+
column?: number;
|
|
298
|
+
/**
|
|
299
|
+
* 列间距
|
|
300
|
+
*/
|
|
301
|
+
gutter?: number;
|
|
302
|
+
/**
|
|
303
|
+
* 查询按钮 loading
|
|
304
|
+
*/
|
|
305
|
+
loading?: boolean;
|
|
306
|
+
/**
|
|
307
|
+
* 为 true 且条件超过一行时收起多余项并显示展开/收起;为 false 时始终展示全部条件且不显示按钮
|
|
308
|
+
*/
|
|
309
|
+
expand?: boolean;
|
|
310
|
+
/**
|
|
311
|
+
* 重置时在子控件字段之外,额外清空的字段名
|
|
312
|
+
* @example 'pageNo' | ['pageNo', 'pageSize']
|
|
313
|
+
*/
|
|
314
|
+
resetKeys?: string | string[];
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* WSearch 组件实例
|
|
318
|
+
*/
|
|
319
|
+
export interface WSearchInstance {
|
|
320
|
+
/**
|
|
321
|
+
* 获取 FormInstance
|
|
322
|
+
*/
|
|
323
|
+
getFormInstance: () => FormInstance | undefined;
|
|
324
|
+
/**
|
|
325
|
+
* 触发重置
|
|
326
|
+
*/
|
|
327
|
+
reset: () => void;
|
|
328
|
+
}
|
|
329
|
+
/**********************WListSearch组件********************** */
|
|
330
|
+
/**
|
|
331
|
+
* WListSearch 组件属性
|
|
332
|
+
*/
|
|
333
|
+
export interface WListSearchProps extends Omit<WSearchProps, 'layout'> {
|
|
334
|
+
/**
|
|
335
|
+
* 卡片 bordered
|
|
336
|
+
*/
|
|
337
|
+
bordered?: boolean;
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* WListSearch 组件实例
|
|
341
|
+
*/
|
|
342
|
+
export interface WListSearchInstance extends WSearchInstance {
|
|
343
|
+
}
|
|
344
|
+
/**********************WDetailSearch组件********************** */
|
|
345
|
+
/**
|
|
346
|
+
* WDetailSearch 组件属性
|
|
347
|
+
*/
|
|
348
|
+
export interface WDetailSearchProps extends Omit<WSearchProps, 'layout'> {
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* WDetailSearch 组件实例
|
|
352
|
+
*/
|
|
353
|
+
export interface WDetailSearchInstance extends WSearchInstance {
|
|
354
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { type ComputedRef, type Slots } from 'vue';
|
|
2
|
+
import type { WPagerOnlyProps, WTableProps, WToolbarOnlyProps } from './type';
|
|
3
|
+
export type WTableResolvedConfig = {
|
|
4
|
+
toolbar: Partial<WToolbarOnlyProps> & {
|
|
5
|
+
toolid?: string;
|
|
6
|
+
};
|
|
7
|
+
pager: Partial<WPagerOnlyProps>;
|
|
8
|
+
table: Record<string, unknown>;
|
|
9
|
+
};
|
|
10
|
+
/** 父组件 vnode 上是否显式传入过该 prop */
|
|
11
|
+
export declare function isPropExplicit(vnodeProps: Record<string, unknown>, key: string): boolean;
|
|
12
|
+
/** 父组件 vnode 上真正传过的 prop(未传的 Boolean 不会出现在这里,避免 Vue 缺省 false 覆盖 setConfig) */
|
|
13
|
+
export declare function pickExplicitProps(props: Record<string, unknown>, vnodeProps: Record<string, unknown> | null | undefined): Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* xe-utils merge 会改写嵌套对象引用;先深拷贝再合并,
|
|
16
|
+
* 避免污染 VxeUI.getConfig() / WTABLE_VXE_DEFAULT_CONFIG。
|
|
17
|
+
*/
|
|
18
|
+
export declare function safeMerge(...sources: Array<object | undefined | null>): Record<string, unknown>;
|
|
19
|
+
export declare function resolveWTableConfig(props: WTableProps, attrs: Record<string, unknown>, vnodeProps?: Record<string, unknown> | null): WTableResolvedConfig;
|
|
20
|
+
export declare function useWTableConfig(props: WTableProps, attrs: Record<string, unknown>): {
|
|
21
|
+
config: ComputedRef<WTableResolvedConfig>;
|
|
22
|
+
};
|
|
23
|
+
export declare function resolveWTableSlots(slots: Slots): {
|
|
24
|
+
hasToolbarButtons: boolean;
|
|
25
|
+
hasToolbarTools: boolean;
|
|
26
|
+
hasPagerLeft: boolean;
|
|
27
|
+
hasPagerRight: boolean;
|
|
28
|
+
hasToolbarSlots: boolean;
|
|
29
|
+
tableSlotNames: string[];
|
|
30
|
+
};
|
|
31
|
+
export declare function useWTableSlots(slots: Slots): ComputedRef<{
|
|
32
|
+
hasToolbarButtons: boolean;
|
|
33
|
+
hasToolbarTools: boolean;
|
|
34
|
+
hasPagerLeft: boolean;
|
|
35
|
+
hasPagerRight: boolean;
|
|
36
|
+
hasToolbarSlots: boolean;
|
|
37
|
+
tableSlotNames: string[];
|
|
38
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VxePagerProps } from 'vxe-pc-ui';
|
|
2
|
+
import type { VxeTableProps, VxeToolbarProps } from 'vxe-table';
|
|
3
|
+
export type WTableVxeDefaultConfig = {
|
|
4
|
+
table: Partial<VxeTableProps>;
|
|
5
|
+
toolbar: Partial<VxeToolbarProps>;
|
|
6
|
+
pager: Partial<VxePagerProps>;
|
|
7
|
+
};
|
|
8
|
+
/** WTable 组件约定的 vxe 全局默认配置 */
|
|
9
|
+
export declare const WTABLE_VXE_DEFAULT_CONFIG: WTableVxeDefaultConfig;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { LayoutHeaderProps } from './components/layout';
|
|
2
|
+
export interface Config extends LayoutHeaderProps {
|
|
3
|
+
exportPagePath?: string;
|
|
4
|
+
logo?: string;
|
|
5
|
+
favicon?: string;
|
|
6
|
+
staticUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const config: {
|
|
9
|
+
exportPagePath?: string | undefined;
|
|
10
|
+
logo?: string | undefined;
|
|
11
|
+
favicon?: string | undefined;
|
|
12
|
+
staticUrl?: string | undefined;
|
|
13
|
+
systemName?: string | undefined;
|
|
14
|
+
userOption?: {
|
|
15
|
+
key: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
label: string;
|
|
18
|
+
href?: string | undefined;
|
|
19
|
+
click?: (() => void) | undefined;
|
|
20
|
+
}[] | undefined;
|
|
21
|
+
showWarehouse?: boolean | undefined;
|
|
22
|
+
showDownload?: boolean | undefined;
|
|
23
|
+
downloadConfig?: {
|
|
24
|
+
getFileUrl?: string | undefined;
|
|
25
|
+
pageUrl?: string | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
};
|
|
28
|
+
export declare function setConfig(options: Config): void;
|
|
29
|
+
export default config;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { DictNameType, DictBasicNameType, DictOptionType } from './useDict';
|
|
2
|
+
export { DICT_PRIVATE_PREFIX, toPrivateDictName } from './useDict';
|
|
3
|
+
export * from './src';
|
|
4
|
+
export { default as useDict } from './useDict';
|
|
5
|
+
export { default as useBusinessDict } from './useBusinessDict';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as useWarehouseZoneDict } from './useWarehouseZoneDict';
|
|
2
|
+
export { default as useCountryDict } from './useCountryDict';
|
|
3
|
+
export { default as useCustomerDict } from './useCustomerDict';
|
|
4
|
+
export { default as useCurrencyDict } from './useCurrencyDict';
|
|
5
|
+
export { default as useWarehouseSelectDict } from './useWarehouseSelect';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ExtendedSuffix } from '../../../type';
|
|
2
|
+
type IdType = ExtendedSuffix<'country'>;
|
|
3
|
+
/**
|
|
4
|
+
* 内置国家字典。也可通过 {@link useBusinessDict}('country') 使用。
|
|
5
|
+
* @param id 缓存 key,默认 `'country'`;同名字典多份缓存时传 `'country_xxx'`
|
|
6
|
+
*/
|
|
7
|
+
export default function useCountryDict(id?: IdType): {
|
|
8
|
+
dict: {
|
|
9
|
+
/**
|
|
10
|
+
* 内置国家字典。也可通过 {@link useBusinessDict}('country') 使用。
|
|
11
|
+
* @param id 缓存 key,默认 `'country'`;同名字典多份缓存时传 `'country_xxx'`
|
|
12
|
+
*/
|
|
13
|
+
key: import("../../../type").KeyType;
|
|
14
|
+
value: import("../../../type").KeyType;
|
|
15
|
+
label: string;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
getDict: (reload?: boolean) => Promise<{
|
|
19
|
+
/**
|
|
20
|
+
* 内置国家字典。也可通过 {@link useBusinessDict}('country') 使用。
|
|
21
|
+
* @param id 缓存 key,默认 `'country'`;同名字典多份缓存时传 `'country_xxx'`
|
|
22
|
+
*/
|
|
23
|
+
key: import("../../../type").KeyType;
|
|
24
|
+
value: import("../../../type").KeyType;
|
|
25
|
+
label: string;
|
|
26
|
+
disabled?: boolean | undefined;
|
|
27
|
+
}[]>;
|
|
28
|
+
getLabelByValue: (value: import("../../../type").KeyType) => string;
|
|
29
|
+
getItemByValue: (value: import("../../../type").KeyType) => {
|
|
30
|
+
/**
|
|
31
|
+
* 内置国家字典。也可通过 {@link useBusinessDict}('country') 使用。
|
|
32
|
+
* @param id 缓存 key,默认 `'country'`;同名字典多份缓存时传 `'country_xxx'`
|
|
33
|
+
*/
|
|
34
|
+
key: import("../../../type").KeyType;
|
|
35
|
+
value: import("../../../type").KeyType;
|
|
36
|
+
label: string;
|
|
37
|
+
disabled?: boolean | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
clearDict: (option?: boolean | import("../../../type").ClearDictOption | undefined) => void;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ExtendedSuffix } from '../../../type';
|
|
2
|
+
type IdType = ExtendedSuffix<'currency'>;
|
|
3
|
+
/**
|
|
4
|
+
* 内置币种字典。也可通过 {@link useBusinessDict}('currency') 使用。
|
|
5
|
+
* @param id 缓存 key,默认 `'currency'`;同名字典多份缓存时传 `'currency_xxx'`
|
|
6
|
+
*/
|
|
7
|
+
export default function useCurrencyDict(id?: IdType): {
|
|
8
|
+
dict: {
|
|
9
|
+
key: import("../../../type").KeyType;
|
|
10
|
+
value: import("../../../type").KeyType;
|
|
11
|
+
label: string;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
}[];
|
|
14
|
+
getDict: (reload?: boolean) => Promise<{
|
|
15
|
+
key: import("../../../type").KeyType;
|
|
16
|
+
value: import("../../../type").KeyType;
|
|
17
|
+
label: string;
|
|
18
|
+
disabled?: boolean | undefined;
|
|
19
|
+
}[]>;
|
|
20
|
+
getLabelByValue: (value: import("../../../type").KeyType) => string;
|
|
21
|
+
getItemByValue: (value: import("../../../type").KeyType) => {
|
|
22
|
+
key: import("../../../type").KeyType;
|
|
23
|
+
value: import("../../../type").KeyType;
|
|
24
|
+
label: string;
|
|
25
|
+
disabled?: boolean | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
clearDict: (option?: boolean | import("../../../type").ClearDictOption | undefined) => void;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ExtendedSuffix } from '../../../type';
|
|
2
|
+
type IdType = ExtendedSuffix<'customer'>;
|
|
3
|
+
/**
|
|
4
|
+
* 内置客户字典。也可通过 {@link useBusinessDict}('customer') 使用。
|
|
5
|
+
* @param id 缓存 key,默认 `'customer'`;同名字典多份缓存时传 `'customer_xxx'`
|
|
6
|
+
*/
|
|
7
|
+
export default function useCustomerDict(id?: IdType): {
|
|
8
|
+
dict: {
|
|
9
|
+
/**
|
|
10
|
+
* 内置客户字典。也可通过 {@link useBusinessDict}('customer') 使用。
|
|
11
|
+
* @param id 缓存 key,默认 `'customer'`;同名字典多份缓存时传 `'customer_xxx'`
|
|
12
|
+
*/
|
|
13
|
+
key: import("../../../type").KeyType;
|
|
14
|
+
value: import("../../../type").KeyType;
|
|
15
|
+
label: string;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
}[];
|
|
18
|
+
getDict: (reload?: boolean) => Promise<{
|
|
19
|
+
/**
|
|
20
|
+
* 内置客户字典。也可通过 {@link useBusinessDict}('customer') 使用。
|
|
21
|
+
* @param id 缓存 key,默认 `'customer'`;同名字典多份缓存时传 `'customer_xxx'`
|
|
22
|
+
*/
|
|
23
|
+
key: import("../../../type").KeyType;
|
|
24
|
+
value: import("../../../type").KeyType;
|
|
25
|
+
label: string;
|
|
26
|
+
disabled?: boolean | undefined;
|
|
27
|
+
}[]>;
|
|
28
|
+
getLabelByValue: (value: import("../../../type").KeyType) => string;
|
|
29
|
+
getItemByValue: (value: import("../../../type").KeyType) => {
|
|
30
|
+
/**
|
|
31
|
+
* 内置客户字典。也可通过 {@link useBusinessDict}('customer') 使用。
|
|
32
|
+
* @param id 缓存 key,默认 `'customer'`;同名字典多份缓存时传 `'customer_xxx'`
|
|
33
|
+
*/
|
|
34
|
+
key: import("../../../type").KeyType;
|
|
35
|
+
value: import("../../../type").KeyType;
|
|
36
|
+
label: string;
|
|
37
|
+
disabled?: boolean | undefined;
|
|
38
|
+
} | undefined;
|
|
39
|
+
clearDict: (option?: boolean | import("../../../type").ClearDictOption | undefined) => void;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ExtendedSuffix, OptionType } from '../../../type';
|
|
2
|
+
import { WarehouseProp } from '@/utils/localStorage';
|
|
3
|
+
type IdType = ExtendedSuffix<'warehouseSelect'>;
|
|
4
|
+
/**
|
|
5
|
+
* 内置仓库选择字典。也可通过 {@link useBusinessDict}('warehouseSelect') 使用。
|
|
6
|
+
* @param id 缓存 key,默认 `'warehouseSelect'`;同名字典多份缓存时传 `'warehouseSelect_xxx'`
|
|
7
|
+
*/
|
|
8
|
+
export default function useWarehouseSelectDict(id?: IdType): {
|
|
9
|
+
dict: OptionType<WarehouseProp>[];
|
|
10
|
+
getDict: (reload?: boolean) => Promise<OptionType<WarehouseProp>[]>;
|
|
11
|
+
getLabelByValue: (value: import("../../../type").KeyType) => string;
|
|
12
|
+
getItemByValue: (value: import("../../../type").KeyType) => OptionType<WarehouseProp> | undefined;
|
|
13
|
+
clearDict: (option?: boolean | import("../../../type").ClearDictOption | undefined) => void;
|
|
14
|
+
};
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ExtendedSuffix } from '../../../type';
|
|
2
|
+
type IdType = ExtendedSuffix<'warehouseZone'>;
|
|
3
|
+
/**
|
|
4
|
+
* 内置库区字典。也可通过 {@link useBusinessDict}('warehouseZone') 使用。
|
|
5
|
+
* @param id 缓存 key,默认 `'warehouseZone'`;同名字典多份缓存时传 `'warehouseZone_xxx'`
|
|
6
|
+
*/
|
|
7
|
+
export default function useWarehouseZoneDict(id?: IdType): {
|
|
8
|
+
dict: {
|
|
9
|
+
key: import("../../../type").KeyType;
|
|
10
|
+
value: import("../../../type").KeyType;
|
|
11
|
+
label: string;
|
|
12
|
+
disabled?: boolean | undefined;
|
|
13
|
+
}[];
|
|
14
|
+
getDict: (reload?: boolean) => Promise<{
|
|
15
|
+
key: import("../../../type").KeyType;
|
|
16
|
+
value: import("../../../type").KeyType;
|
|
17
|
+
label: string;
|
|
18
|
+
disabled?: boolean | undefined;
|
|
19
|
+
}[]>;
|
|
20
|
+
getLabelByValue: (value: import("../../../type").KeyType) => string;
|
|
21
|
+
getItemByValue: (value: import("../../../type").KeyType) => {
|
|
22
|
+
key: import("../../../type").KeyType;
|
|
23
|
+
value: import("../../../type").KeyType;
|
|
24
|
+
label: string;
|
|
25
|
+
disabled?: boolean | undefined;
|
|
26
|
+
} | undefined;
|
|
27
|
+
clearDict: (option?: boolean | import("../../../type").ClearDictOption | undefined) => void;
|
|
28
|
+
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DictBasicNameType } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* 公共组件**内置业务字典**入口。
|
|
4
|
+
*
|
|
5
|
+
* 仅支持 {@link DictBasicNameType}(`warehouseZone` / `country` / `customer` / `currency`),
|
|
6
|
+
* 内部转发至对应的 `useXxxDict`。
|
|
7
|
+
*
|
|
8
|
+
* 业务项目自定义字典请使用 {@link useDict}。
|
|
9
|
+
*
|
|
10
|
+
* @param name 内置字典基础名称
|
|
11
|
+
* @returns 对应内置字典 Hook 的返回值;未找到时返回 `{}`
|
|
12
|
+
*/
|
|
13
|
+
export default function useBusinessDict(name: DictBasicNameType): any;
|