@kp-ui/lowcode-pc 1.0.0-alpha.1 → 1.0.0-alpha.2
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/assets/CustomerModal.mjs +3 -91
- package/assets/install.mjs +197 -41
- package/index.js +6 -2
- package/package.json +3 -3
- package/types/index.d.ts +1 -0
- package/types/pc/install.d.ts +9 -0
- package/types/core/src/components/DragBtn.vue.d.ts +0 -7
- package/types/core/src/components/HttpEditor.vue.d.ts +0 -46
- package/types/core/src/components/common/EventItemEditor.vue.d.ts +0 -12
- package/types/core/src/components/common/LowcodeI18nProvider.vue.d.ts +0 -17
- package/types/core/src/components/common/RenderWidgetList.vue.d.ts +0 -16
- package/types/core/src/components/common/desginer/FormWidgetContainer.vue.d.ts +0 -6
- package/types/core/src/components/common/desginer/RenderDesignerWrapper.vue.d.ts +0 -2
- package/types/core/src/components/common/desginer/WidgetWrapper.vue.d.ts +0 -30
- package/types/core/src/components/common/render/ActionButtonListDialog.vue.d.ts +0 -345
- package/types/core/src/components/common/render/Debugger.vue.d.ts +0 -10
- package/types/core/src/components/common/render/LowcodeRenderProvider.vue.d.ts +0 -26
- package/types/core/src/components/common/render/index.d.ts +0 -6
- package/types/core/src/components/common/render/useFormContext.d.ts +0 -148
- package/types/core/src/components/common/render/useFormDataProcessor.d.ts +0 -10
- package/types/core/src/components/contextMenu/WidgetContextMenu.vue.d.ts +0 -21
- package/types/core/src/components/contextMenu/useWidgetContextMenu.d.ts +0 -25
- package/types/core/src/components/index.d.ts +0 -17
- package/types/core/src/components/layout/LowcodeLayout.vue.d.ts +0 -24
- package/types/core/src/components/property-editor/index.d.ts +0 -3
- package/types/core/src/components/property-editor/propertyRegister.d.ts +0 -199
- package/types/core/src/components/property-editor/useEditor.d.ts +0 -19
- package/types/core/src/components/setting-plane/WidgetSettingPlane.vue.d.ts +0 -2
- package/types/core/src/components/setting-plane/form-crud-setting.vue.d.ts +0 -10
- package/types/core/src/components/setting-plane/form-setting.vue.d.ts +0 -332
- package/types/core/src/components/setting-plane/index.d.ts +0 -3
- package/types/core/src/components/setting-plane/index.vue.d.ts +0 -675
- package/types/core/src/components/settings/PanelItemDrag.vue.d.ts +0 -24
- package/types/core/src/components/settings/WidgetPanel.vue.d.ts +0 -20
- package/types/core/src/components/toolbar-panel/index.vue.d.ts +0 -689
- package/types/core/src/constants/EditorTypeEnum.d.ts +0 -151
- package/types/core/src/constants/LayoutTypeEnum.d.ts +0 -5
- package/types/core/src/constants/WidgetTypeEnum.d.ts +0 -65
- package/types/core/src/constants/index.d.ts +0 -12
- package/types/core/src/hooks/index.d.ts +0 -7
- package/types/core/src/hooks/useAppRef.d.ts +0 -9
- package/types/core/src/hooks/useDataHttp.d.ts +0 -207
- package/types/core/src/hooks/useDesigner.d.ts +0 -22
- package/types/core/src/hooks/useField.d.ts +0 -95
- package/types/core/src/hooks/useFormValidation.d.ts +0 -54
- package/types/core/src/hooks/useInputEvent.d.ts +0 -10
- package/types/core/src/hooks/useLowcode.d.ts +0 -22
- package/types/core/src/hooks/useNativeDragAndDrop.d.ts +0 -34
- package/types/core/src/hooks/useWidget.d.ts +0 -5
- package/types/core/src/lang/en-US.d.ts +0 -564
- package/types/core/src/lang/en-US_extension.d.ts +0 -23
- package/types/core/src/lang/en-US_render.d.ts +0 -38
- package/types/core/src/lang/zh-CN.d.ts +0 -584
- package/types/core/src/lang/zh-CN_extension.d.ts +0 -23
- package/types/core/src/lang/zh-CN_render.d.ts +0 -38
- package/types/core/src/types/button.d.ts +0 -17
- package/types/core/src/types/designer.d.ts +0 -74
- package/types/core/src/types/fileObject.d.ts +0 -7
- package/types/core/src/types/global.d.ts +0 -20
- package/types/core/src/types/index.d.ts +0 -8
- package/types/core/src/types/rowSelectionType.d.ts +0 -12
- package/types/core/src/types/schema.d.ts +0 -169
- package/types/core/src/types/widgetProps.d.ts +0 -8
- package/types/core/src/utils/emitter.d.ts +0 -17
- package/types/core/src/utils/event-bus.d.ts +0 -10
- package/types/core/src/utils/file.d.ts +0 -0
- package/types/core/src/utils/format.d.ts +0 -46
- package/types/core/src/utils/getFileName.d.ts +0 -1
- package/types/core/src/utils/i18n.d.ts +0 -27
- package/types/core/src/utils/index.d.ts +0 -7
- package/types/core/src/utils/insertAssetsToBody.d.ts +0 -3
- package/types/core/src/utils/request/handleAxiosError.d.ts +0 -11
- package/types/core/src/utils/request/http.d.ts +0 -4
- package/types/core/src/utils/smart-vue-i18n/index.d.ts +0 -11
- package/types/core/src/utils/transformWidgetList.d.ts +0 -2
- package/types/core/src/utils/useEmitter.d.ts +0 -31
- package/types/core/src/utils/util.d.ts +0 -81
- package/types/core/src/utils/validators.d.ts +0 -25
- package/types/pc/src/components/desginer/form-widget/container-widget/data-table-widget.vue.d.ts +0 -77
- package/types/pc/src/components/desginer/form-widget/container-widget/grid-col-widget.vue.d.ts +0 -16
- package/types/pc/src/components/desginer/form-widget/container-widget/grid-sub-form-widget.vue.d.ts +0 -5
- package/types/pc/src/components/desginer/form-widget/container-widget/grid-widget.vue.d.ts +0 -5
- package/types/pc/src/components/desginer/form-widget/container-widget/index.d.ts +0 -153
- package/types/pc/src/components/desginer/form-widget/container-widget/tab-widget.vue.d.ts +0 -5
- package/types/pc/src/components/desginer/form-widget/container-widget/useTableWidget.d.ts +0 -274
- package/types/pc/src/components/desginer/form-widget/container-widget/vf-box-widget.vue.d.ts +0 -32
- package/types/pc/src/components/desginer/form-widget/container-widget/vf-collapse-widget.vue.d.ts +0 -33
- package/types/pc/src/components/desginer/form-widget/container-widget/vf-dialog-widget.vue.d.ts +0 -4
- package/types/pc/src/components/desginer/form-widget/index.vue.d.ts +0 -171
- package/types/pc/src/components/desginer/index.vue.d.ts +0 -52
- package/types/pc/src/components/desginer/widget-panel/advanced/bpmn-editor.d.ts +0 -13
- package/types/pc/src/components/desginer/widget-panel/advanced/cascader.d.ts +0 -31
- package/types/pc/src/components/desginer/widget-panel/advanced/code-editor.d.ts +0 -18
- package/types/pc/src/components/desginer/widget-panel/advanced/data-table.d.ts +0 -52
- package/types/pc/src/components/desginer/widget-panel/advanced/diy-compontent.d.ts +0 -10
- package/types/pc/src/components/desginer/widget-panel/advanced/file-upload.d.ts +0 -24
- package/types/pc/src/components/desginer/widget-panel/advanced/index.d.ts +0 -8
- package/types/pc/src/components/desginer/widget-panel/advanced/rich-editor.d.ts +0 -22
- package/types/pc/src/components/desginer/widget-panel/advanced/tree-select.d.ts +0 -33
- package/types/pc/src/components/desginer/widget-panel/advanced/tree.d.ts +0 -27
- package/types/pc/src/components/desginer/widget-panel/advancedFieldsEnums.d.ts +0 -11
- package/types/pc/src/components/desginer/widget-panel/basicFields/button.d.ts +0 -17
- package/types/pc/src/components/desginer/widget-panel/basicFields/buttonList.d.ts +0 -22
- package/types/pc/src/components/desginer/widget-panel/basicFields/checkbox.d.ts +0 -27
- package/types/pc/src/components/desginer/widget-panel/basicFields/color.d.ts +0 -16
- package/types/pc/src/components/desginer/widget-panel/basicFields/date.d.ts +0 -29
- package/types/pc/src/components/desginer/widget-panel/basicFields/dateRange.d.ts +0 -29
- package/types/pc/src/components/desginer/widget-panel/basicFields/divider.d.ts +0 -12
- package/types/pc/src/components/desginer/widget-panel/basicFields/dropdown.d.ts +0 -18
- package/types/pc/src/components/desginer/widget-panel/basicFields/htmlText.d.ts +0 -11
- package/types/pc/src/components/desginer/widget-panel/basicFields/input.d.ts +0 -31
- package/types/pc/src/components/desginer/widget-panel/basicFields/number.d.ts +0 -26
- package/types/pc/src/components/desginer/widget-panel/basicFields/radio.d.ts +0 -38
- package/types/pc/src/components/desginer/widget-panel/basicFields/rate.d.ts +0 -23
- package/types/pc/src/components/desginer/widget-panel/basicFields/select.d.ts +0 -35
- package/types/pc/src/components/desginer/widget-panel/basicFields/slider.d.ts +0 -25
- package/types/pc/src/components/desginer/widget-panel/basicFields/staticText.d.ts +0 -11
- package/types/pc/src/components/desginer/widget-panel/basicFields/switch.d.ts +0 -19
- package/types/pc/src/components/desginer/widget-panel/basicFields/textarea.d.ts +0 -35
- package/types/pc/src/components/desginer/widget-panel/basicFields/time.d.ts +0 -26
- package/types/pc/src/components/desginer/widget-panel/basicFields/timeRange.d.ts +0 -27
- package/types/pc/src/components/desginer/widget-panel/basicFieldsEnums.d.ts +0 -38
- package/types/pc/src/components/desginer/widget-panel/containers/grid-col.d.ts +0 -17
- package/types/pc/src/components/desginer/widget-panel/containers/grid-sub-form.d.ts +0 -8
- package/types/pc/src/components/desginer/widget-panel/containers/grid.d.ts +0 -8
- package/types/pc/src/components/desginer/widget-panel/containers/index.d.ts +0 -8
- package/types/pc/src/components/desginer/widget-panel/containers/tab-pane.d.ts +0 -23
- package/types/pc/src/components/desginer/widget-panel/containers/tab.d.ts +0 -9
- package/types/pc/src/components/desginer/widget-panel/containers/vf-box.d.ts +0 -8
- package/types/pc/src/components/desginer/widget-panel/containers/vf-collapse.d.ts +0 -13
- package/types/pc/src/components/desginer/widget-panel/containers/vf-dialog.d.ts +0 -8
- package/types/pc/src/components/desginer/widget-panel/containersEnums.d.ts +0 -1
- package/types/pc/src/components/desginer/widget-panel/index.vue.d.ts +0 -8
- package/types/pc/src/components/desginer/widget-panel/widgetsConfig.d.ts +0 -28
- package/types/pc/src/components/field-widget/hooks/useSelect.d.ts +0 -72
- package/types/pc/src/components/field-widget/index.d.ts +0 -3
- package/types/pc/src/components/field-widget/useField.d.ts +0 -95
- package/types/pc/src/components/form-render/RenderWigetList.vue.d.ts +0 -27
- package/types/pc/src/components/form-render/container-items/data-table-widget.vue.d.ts +0 -95
- package/types/pc/src/components/form-render/container-items/grid-col-widget.vue.d.ts +0 -36
- package/types/pc/src/components/form-render/container-items/grid-sub-form-widget.vue.d.ts +0 -39
- package/types/pc/src/components/form-render/container-items/grid-widget.vue.d.ts +0 -35
- package/types/pc/src/components/form-render/container-items/index.d.ts +0 -255
- package/types/pc/src/components/form-render/container-items/tab-widget.vue.d.ts +0 -5
- package/types/pc/src/components/form-render/container-items/vf-box-widget.vue.d.ts +0 -32
- package/types/pc/src/components/form-render/container-items/vf-collapse-widget.vue.d.ts +0 -33
- package/types/pc/src/components/index.d.ts +0 -4
- package/types/pc/src/components/public/ActionButtonListRender.vue.d.ts +0 -121
- package/types/pc/src/components/public/ConfigView/CustomPageRender.vue.d.ts +0 -16
- package/types/pc/src/components/public/CustomerModal/CustomerModal.vue.d.ts +0 -14
- package/types/pc/src/components/public/CustomerModal/customerModal.d.ts +0 -6
- package/types/pc/src/components/public/CustomerModal/useCustomerModal.d.ts +0 -7
- package/types/pc/src/components/public/DynamicDialog.vue.d.ts +0 -97
- package/types/pc/src/components/render/index.vue.d.ts +0 -82
- package/types/pc/src/components/render/useRenderWidget.d.ts +0 -3
- package/types/pc/src/designer.d.ts +0 -233
- package/types/pc/src/hooks/useLowcode.d.ts +0 -21
- package/types/pc/src/hooks/useWidget.d.ts +0 -7
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { Widget, FormConfig } from './schema';
|
|
2
|
-
export interface HistoryStep {
|
|
3
|
-
widgetList: Widget[];
|
|
4
|
-
formConfig: FormConfig;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export interface HistoryData {
|
|
8
|
-
index: number;
|
|
9
|
-
maxStep: number;
|
|
10
|
-
steps: HistoryStep[];
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type LayoutType = 'PC' | 'BI' | 'H5';
|
|
14
|
-
|
|
15
|
-
export interface FormDesigner {
|
|
16
|
-
widgetList: Widget[];
|
|
17
|
-
formConfig: FormConfig;
|
|
18
|
-
selectedId: string | null;
|
|
19
|
-
selectedWidget: Widget | null;
|
|
20
|
-
selectedWidgetName: string | null;
|
|
21
|
-
draggingWidget: Widget | null;
|
|
22
|
-
draggingWidget: Widget | null;
|
|
23
|
-
dropPreview: {
|
|
24
|
-
containerList: Widget[] | null;
|
|
25
|
-
index: number;
|
|
26
|
-
rect: { left: number; top: number; width: number; height: number } | null;
|
|
27
|
-
} | null;
|
|
28
|
-
vueInstance: any;
|
|
29
|
-
cssClassList: any[];
|
|
30
|
-
historyData: HistoryData;
|
|
31
|
-
clearDesigner(skipHistoryChange?: boolean): void;
|
|
32
|
-
loadPresetCssCode(preCssCode: string): void;
|
|
33
|
-
getLayoutType(): LayoutType;
|
|
34
|
-
changeLayoutType(newType: LayoutType): void;
|
|
35
|
-
getImportTemplate(): { widgetList: Widget[]; formConfig: FormConfig };
|
|
36
|
-
loadFormJson(formJson: any): boolean;
|
|
37
|
-
setSelected(selected: Widget | null): void;
|
|
38
|
-
updateSelectedWidgetNameAndLabel(
|
|
39
|
-
selectedWidget: Widget,
|
|
40
|
-
newName: string,
|
|
41
|
-
newLabel: string
|
|
42
|
-
): void;
|
|
43
|
-
clearSelected(): void;
|
|
44
|
-
checkWidgetMove(evt: any): boolean;
|
|
45
|
-
getContainerByType(typeName: string): Widget | null;
|
|
46
|
-
getFieldWidgetByType(typeName: string): Widget | null;
|
|
47
|
-
upgradeFormConfig(oldFormConfig: FormConfig): void;
|
|
48
|
-
cloneGridCol(widget: Widget, parentWidget: Widget): void;
|
|
49
|
-
cloneContainer(containWidget: Widget): Widget | null;
|
|
50
|
-
moveUpWidget(parentList: Widget[], indexOfParentList: number): void;
|
|
51
|
-
moveDownWidget(parentList: Widget[], indexOfParentList: number): void;
|
|
52
|
-
removeWidget(parentList: Widget[], indexOfParentList: number, parentWidget?: Widget): void;
|
|
53
|
-
copyWidget(origin: Widget): Widget;
|
|
54
|
-
addWidget(widget: Widget, parentList?: Widget[], insertIndex?: number): void;
|
|
55
|
-
addContainerByDbClick(container: Widget): void;
|
|
56
|
-
addFieldByDbClick(widget: Widget): void;
|
|
57
|
-
deleteColOfGrid(gridWidget: Widget, colIdx: number): void;
|
|
58
|
-
addNewColOfGrid(gridWidget: Widget): void;
|
|
59
|
-
addTabPaneOfTabs(tabsWidget: Widget): void;
|
|
60
|
-
deleteTabPaneOfTabs(tabsWidget: Widget, tpIdx: number): void;
|
|
61
|
-
emitEvent(evtName: string, evtData: any): void;
|
|
62
|
-
handleEvent(evtName: string, callback: (data: any) => void): void;
|
|
63
|
-
setCssClassList(cssClassList: any[]): void;
|
|
64
|
-
getCssClassList(): any[];
|
|
65
|
-
initHistoryData(): void;
|
|
66
|
-
emitHistoryChange(): void;
|
|
67
|
-
saveCurrentHistoryStep(): void;
|
|
68
|
-
undoHistoryStep(): void;
|
|
69
|
-
redoHistoryStep(): void;
|
|
70
|
-
undoEnabled(): boolean;
|
|
71
|
-
redoEnabled(): boolean;
|
|
72
|
-
saveFormContentToStorage(): void;
|
|
73
|
-
loadFormContentFromStorage(): void;
|
|
74
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
interface ImportMetaEnv {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
|
|
5
|
-
// 打包目录
|
|
6
|
-
VITE_APP_BUILD_DIR: string;
|
|
7
|
-
// token名称
|
|
8
|
-
VITE_APP_TOKEN_NAME: string;
|
|
9
|
-
// api地址
|
|
10
|
-
VITE_APP_API_ROOT: string;
|
|
11
|
-
// 是否开启mock
|
|
12
|
-
VITE_APP_USE_MOCK: 0 | 1;
|
|
13
|
-
// 登录地址
|
|
14
|
-
VITE_APP_LOGIN_URL: string;
|
|
15
|
-
// 登录回跳地址
|
|
16
|
-
VITE_APP_LOGIN_RETURN_URL: string;
|
|
17
|
-
// 用户中心地址
|
|
18
|
-
VITE_APP_UCENTER_URL: string;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export type rowSelectionType = {
|
|
2
|
-
hasRowSelection: boolean;
|
|
3
|
-
preserveSelectedRowKeys: boolean;
|
|
4
|
-
fixed: boolean;
|
|
5
|
-
onChange: string;
|
|
6
|
-
columnWidth: number;
|
|
7
|
-
checkMethod?: string;
|
|
8
|
-
getCheckboxProps?: (record: any) => {
|
|
9
|
-
disabled: boolean;
|
|
10
|
-
name: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import { WidgetTypeEnum } from '../constants/WidgetTypeEnum';
|
|
2
|
-
import { SizeType } from 'ant-design-vue';
|
|
3
|
-
import { HttpEditorOption } from '../../../tmgc2-share/index.ts';
|
|
4
|
-
/**
|
|
5
|
-
* Widget 类型定义
|
|
6
|
-
*/
|
|
7
|
-
export interface WidgetOptions {
|
|
8
|
-
name: string;
|
|
9
|
-
label?: string;
|
|
10
|
-
labelAlign?: string;
|
|
11
|
-
hidden?: boolean;
|
|
12
|
-
customClass?: string[];
|
|
13
|
-
locked?: boolean;
|
|
14
|
-
zIndex?: number;
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* 表单项组件选项
|
|
20
|
-
*/
|
|
21
|
-
interface FormItemWidgetOptions extends WidgetOptions {
|
|
22
|
-
labelWidth?: number | null;
|
|
23
|
-
labelHidden?: boolean;
|
|
24
|
-
placeholder?: string;
|
|
25
|
-
defaultValue?: any;
|
|
26
|
-
readonly?: boolean;
|
|
27
|
-
disabled?: boolean;
|
|
28
|
-
required?: boolean;
|
|
29
|
-
requiredHint?: string;
|
|
30
|
-
validation?: string;
|
|
31
|
-
validationHint?: string;
|
|
32
|
-
labelIconClass?: string | null;
|
|
33
|
-
labelIconPosition?: string;
|
|
34
|
-
onCreated?: string;
|
|
35
|
-
onMounted?: string;
|
|
36
|
-
onInput?: string;
|
|
37
|
-
onChange?: string;
|
|
38
|
-
onFocus?: string;
|
|
39
|
-
onBlur?: string;
|
|
40
|
-
onValidate?: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export interface BiWidgetOptions extends WidgetOptions {
|
|
44
|
-
rotate?: number;
|
|
45
|
-
left?: number;
|
|
46
|
-
top?: number;
|
|
47
|
-
zIndex?: number;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export type WidgetCategory = 'container' | 'field' | 'bi';
|
|
51
|
-
|
|
52
|
-
export interface Widget<T extends WidgetOptions = any> {
|
|
53
|
-
internal?: boolean;
|
|
54
|
-
showName?: string;
|
|
55
|
-
key?: string;
|
|
56
|
-
type: WidgetTypeEnum | ContainerTypeEnum;
|
|
57
|
-
icon: string;
|
|
58
|
-
category: WidgetCategory;
|
|
59
|
-
alias?: string;
|
|
60
|
-
id: string;
|
|
61
|
-
options: T;
|
|
62
|
-
widgetList?: Widget[];
|
|
63
|
-
cols?: GridColWidget[];
|
|
64
|
-
tabs?: GridColWidget[];
|
|
65
|
-
defaultSlotsList?: Widget[];
|
|
66
|
-
rows?: any[];
|
|
67
|
-
formItemFlag?: boolean;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* 表单配置
|
|
72
|
-
*/
|
|
73
|
-
export interface FormConfig {
|
|
74
|
-
/**
|
|
75
|
-
* 标签宽度
|
|
76
|
-
*/
|
|
77
|
-
labelWidth: number;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* 标签位置:horizontal-水平,vertical-垂直,inline-行内
|
|
81
|
-
*/
|
|
82
|
-
labelPosition: 'horizontal' | 'vertical' | 'inline';
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* 组件尺寸
|
|
86
|
-
*/
|
|
87
|
-
size: SizeType;
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* 标签对齐方式
|
|
91
|
-
*/
|
|
92
|
-
labelAlign: 'left' | 'right' | 'center';
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* 自定义CSS代码
|
|
96
|
-
*/
|
|
97
|
-
cssCode: string;
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* 自定义样式类
|
|
101
|
-
*/
|
|
102
|
-
customClass: string[];
|
|
103
|
-
|
|
104
|
-
/**
|
|
105
|
-
* 是否回车提交:0-否,1-是
|
|
106
|
-
*/
|
|
107
|
-
isEnterSubmit: number;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* 全局函数代码
|
|
111
|
-
*/
|
|
112
|
-
functions: string;
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* 布局类型:PC-电脑端,Pad-平板,H5-手机
|
|
116
|
-
*/
|
|
117
|
-
layoutType: LayoutType;
|
|
118
|
-
|
|
119
|
-
/**
|
|
120
|
-
* 表单创建时钩子函数
|
|
121
|
-
*/
|
|
122
|
-
onFormCreated: string;
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* 表单挂载时钩子函数
|
|
126
|
-
*/
|
|
127
|
-
onFormMounted: string;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* 表单数据变化时钩子函数
|
|
131
|
-
*/
|
|
132
|
-
onFormDataChange: string;
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* 服务接口配置
|
|
136
|
-
*/
|
|
137
|
-
serveList: {
|
|
138
|
-
vformDetail: HttpEditorOption;
|
|
139
|
-
vformUpdate: HttpEditorOption;
|
|
140
|
-
list: HttpEditorOption[];
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
/**
|
|
144
|
-
* 其他自定义属性
|
|
145
|
-
*/
|
|
146
|
-
[key: string]: any;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
/**
|
|
150
|
-
* 组件树根节点
|
|
151
|
-
*/
|
|
152
|
-
export interface FormJsonType {
|
|
153
|
-
widgetList: Widget[];
|
|
154
|
-
formConfig: FormConfig;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export interface OptionItem {
|
|
158
|
-
label: string;
|
|
159
|
-
value: string | number;
|
|
160
|
-
children?: OptionItem[];
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export interface HttpType {
|
|
164
|
-
url: string;
|
|
165
|
-
method: string;
|
|
166
|
-
data: Record<string, any>;
|
|
167
|
-
params: Record<string, any>;
|
|
168
|
-
[key: string]: any;
|
|
169
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
interface VfEvents {
|
|
2
|
-
[eventName: string]: Array<(data: unknown) => void>;
|
|
3
|
-
}
|
|
4
|
-
interface EmitterMixin {
|
|
5
|
-
data(): {
|
|
6
|
-
vfEvents: VfEvents;
|
|
7
|
-
};
|
|
8
|
-
methods: {
|
|
9
|
-
emit$(eventName: string, data?: unknown): void;
|
|
10
|
-
on$(eventName: string, fn: (data: unknown) => void): void;
|
|
11
|
-
off$(eventName: string, fn?: ((data: unknown) => void) | null): void;
|
|
12
|
-
dispatch(componentName: string, eventName: string, params: unknown[]): void;
|
|
13
|
-
broadcast(componentName: string, eventName: string, params: unknown[]): void;
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
declare const emitter: EmitterMixin;
|
|
17
|
-
export default emitter;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Emitter, EventType } from 'mitt';
|
|
2
|
-
type Events = Record<EventType, unknown>;
|
|
3
|
-
declare const instance: Emitter<Events>;
|
|
4
|
-
interface EventBus {
|
|
5
|
-
$on: typeof instance.on;
|
|
6
|
-
$off: typeof instance.off;
|
|
7
|
-
$emit: typeof instance.emit;
|
|
8
|
-
}
|
|
9
|
-
declare const eventBus: EventBus;
|
|
10
|
-
export default eventBus;
|
|
File without changes
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
export declare function formatDate1(date: string | number | Date): string;
|
|
2
|
-
export declare function formatDate2(date: string | number | Date): string;
|
|
3
|
-
export declare function formatDate3(date: string | number | Date): string;
|
|
4
|
-
export declare function formatDate4(date: string | number | Date): string;
|
|
5
|
-
export declare function formatDate5(date: string | number | Date): string;
|
|
6
|
-
export declare function formatNumber1(v: number): string | number;
|
|
7
|
-
export declare function formatNumber2(v: number): string | number;
|
|
8
|
-
export declare function formatNumber3(v: number): string | number;
|
|
9
|
-
export declare function formatNumber4(v: number): string | number;
|
|
10
|
-
export declare function formatNumber5(v: number): string | number;
|
|
11
|
-
export declare function formatNumber6(v: number): string | number;
|
|
12
|
-
export declare function formatNumber7(v: number): string | number;
|
|
13
|
-
interface FieldNames {
|
|
14
|
-
label: string;
|
|
15
|
-
value: string;
|
|
16
|
-
children: string;
|
|
17
|
-
}
|
|
18
|
-
interface TreeItem {
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* 将Cascader转义为汉字
|
|
23
|
-
* @param arr 数据数组
|
|
24
|
-
* @param codeList 代码列表
|
|
25
|
-
* @param fieldNames 字段名称映射
|
|
26
|
-
* @param emblem 拼接符号
|
|
27
|
-
* @returns
|
|
28
|
-
*/
|
|
29
|
-
export declare const formateCascaderCode: (arr: TreeItem[] | undefined, codeList: string[] | string[][] | undefined, fieldNames?: FieldNames, emblem?: string) => string | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* 将tree转义为汉字
|
|
32
|
-
* @param arr 值数组
|
|
33
|
-
* @param codeList 代码列表
|
|
34
|
-
* @param fieldNames 字段名称映射
|
|
35
|
-
* @param emblem 拼接符号
|
|
36
|
-
* @returns
|
|
37
|
-
*/
|
|
38
|
-
export declare const formateTreeToName: (arr: string[] | undefined, codeList: TreeItem[] | undefined, fieldNames?: FieldNames, emblem?: string) => string | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* 格式化尺寸,支持数字、px、%
|
|
41
|
-
* @param value 尺寸值
|
|
42
|
-
* @param defaultSize 默认尺寸
|
|
43
|
-
* @returns 格式化后的尺寸字符串
|
|
44
|
-
*/
|
|
45
|
-
export declare function formatSize(value: string | number | undefined | null, defaultSize?: string): string;
|
|
46
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getFileName(path: string): string;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
declare const i18n: {
|
|
2
|
-
readonly messages: {};
|
|
3
|
-
$st(path: string, args: any): any;
|
|
4
|
-
$st2(path: any, path2: any): any;
|
|
5
|
-
setLang(lang: any): Promise<void>;
|
|
6
|
-
setLangMessages(lang: any, messages: any): void;
|
|
7
|
-
};
|
|
8
|
-
export declare const translate: (key: string) => string;
|
|
9
|
-
export declare const setLangMessages: (langName: string, messages: any) => void;
|
|
10
|
-
declare const _default: {
|
|
11
|
-
computed: {
|
|
12
|
-
getLocale: () => any;
|
|
13
|
-
};
|
|
14
|
-
methods: {
|
|
15
|
-
changeLocale(langName: string): Promise<void>;
|
|
16
|
-
i18nt(key: string): string;
|
|
17
|
-
i18n2t(key1: string, key2: string): string;
|
|
18
|
-
setLocale: any;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
21
|
-
export default _default;
|
|
22
|
-
export declare function useI18n(): {
|
|
23
|
-
i18nt: (key: string, obj?: Record<string, any>) => string;
|
|
24
|
-
i18n2t: (key1: string, key2: string) => string;
|
|
25
|
-
initLocale: (locale: string) => void;
|
|
26
|
-
};
|
|
27
|
-
export { i18n };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { AxiosResponse } from 'axios';
|
|
2
|
-
export declare const handleErrorStatus: {
|
|
3
|
-
401: (data: AxiosResponse) => void;
|
|
4
|
-
403: (data: AxiosResponse) => void;
|
|
5
|
-
404: (data: AxiosResponse) => void;
|
|
6
|
-
418: (data: AxiosResponse) => void;
|
|
7
|
-
429: (data: AxiosResponse) => void;
|
|
8
|
-
500: (data: AxiosResponse) => void;
|
|
9
|
-
510: (data: AxiosResponse) => void;
|
|
10
|
-
599: (data: AxiosResponse) => void;
|
|
11
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
type i18nOptionsType = {
|
|
2
|
-
locale: string;
|
|
3
|
-
};
|
|
4
|
-
export declare function createI18n(options: i18nOptionsType): {
|
|
5
|
-
readonly messages: {};
|
|
6
|
-
$st(path: string, args: any): any;
|
|
7
|
-
$st2(path: any, path2: any): any;
|
|
8
|
-
setLang(lang: any): Promise<void>;
|
|
9
|
-
setLangMessages(lang: any, messages: any): void;
|
|
10
|
-
};
|
|
11
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Ref } from 'vue';
|
|
2
|
-
/**
|
|
3
|
-
* 事件处理函数类型
|
|
4
|
-
*/
|
|
5
|
-
export type EventHandler<T = any> = (data: T) => void;
|
|
6
|
-
/**
|
|
7
|
-
* 事件存储对象类型
|
|
8
|
-
*/
|
|
9
|
-
export interface EventsMap {
|
|
10
|
-
[eventName: string]: EventHandler[];
|
|
11
|
-
}
|
|
12
|
-
export type EditEventHandlerParams = {
|
|
13
|
-
title?: string;
|
|
14
|
-
attr: string;
|
|
15
|
-
eventParams?: string[];
|
|
16
|
-
mode?: string;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* 组合式API版本的事件总线
|
|
20
|
-
* 用于组件间通信
|
|
21
|
-
*/
|
|
22
|
-
export declare function useEmitter(): {
|
|
23
|
-
vfEvents: Ref<EventsMap, EventsMap>;
|
|
24
|
-
editEventHandler: (eventName: string, eventParams: any[], mode: string) => void;
|
|
25
|
-
onChangeEditEventHandler: (params: EditEventHandlerParams) => void;
|
|
26
|
-
emit$: <T = any>(eventName: string, data: T) => void;
|
|
27
|
-
on$: <T = any>(eventName: string, fn: EventHandler<T>) => void;
|
|
28
|
-
off$: <T = any>(eventName: string, fn?: EventHandler<T>) => void;
|
|
29
|
-
dispatch: (componentName: string, eventName: string, params: any) => void;
|
|
30
|
-
broadcast: (componentName: string, eventName: string, params: any) => void;
|
|
31
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { FormConfig, Widget, FormJsonType } from '../..';
|
|
2
|
-
export declare function isNull(value: unknown): value is null | undefined;
|
|
3
|
-
export declare function isNotNull(value: unknown): boolean;
|
|
4
|
-
export declare function isEmptyStr(str: unknown): boolean;
|
|
5
|
-
export declare const generateId: () => number;
|
|
6
|
-
export declare const deepClone: <T>(origin: T) => T;
|
|
7
|
-
export declare const overwriteObj: <T extends Record<string, unknown>>(obj1: T, obj2: Partial<T>) => void;
|
|
8
|
-
export declare const insertCustomCssToHead: (cssCode: string, formId?: string) => void;
|
|
9
|
-
export declare const insertGlobalFunctionsToHtml: (functionsCode: string, formId?: string) => void;
|
|
10
|
-
export declare const optionExists: (optionsObj: Record<string, unknown> | null | undefined, optionName: string) => boolean;
|
|
11
|
-
export declare const loadRemoteScript: (srcPath: string, callback: () => void) => void;
|
|
12
|
-
export type WidgetHandler = (widget: Widget, parent?: Widget | null) => void;
|
|
13
|
-
export type ContainerHandler = (container: Widget) => void;
|
|
14
|
-
export declare function traverseFieldWidgets(widgetList: Widget[] | undefined, handler: WidgetHandler, parent?: Widget | null, staticWidgetsIncluded?: boolean): void;
|
|
15
|
-
export declare function traverseContainerWidgets(widgetList: Widget[] | undefined, handler: ContainerHandler): void;
|
|
16
|
-
export declare function traverseAllWidgets(widgetList: Widget[] | undefined, handler: (widget: Widget) => void): void;
|
|
17
|
-
/**
|
|
18
|
-
* 遍历容器内的字段组件
|
|
19
|
-
* @param con
|
|
20
|
-
* @param handler
|
|
21
|
-
*/
|
|
22
|
-
export declare function traverseFieldWidgetsOfContainer(con: Widget, handler: WidgetHandler): void;
|
|
23
|
-
/**
|
|
24
|
-
* 遍历容器内部的字段组件和容器组件
|
|
25
|
-
* @param con
|
|
26
|
-
* @param fieldHandler
|
|
27
|
-
* @param containerHandler
|
|
28
|
-
*/
|
|
29
|
-
export declare function traverseWidgetsOfContainer(con: Widget, fieldHandler: WidgetHandler, containerHandler: ContainerHandler): void;
|
|
30
|
-
export interface FieldWidgetInfo {
|
|
31
|
-
type: string;
|
|
32
|
-
name: string | undefined;
|
|
33
|
-
field: Widget;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* 获取所有字段组件
|
|
37
|
-
* @param widgetList
|
|
38
|
-
* @param staticWidgetsIncluded 是否包含按钮等静态组件,默认不包含
|
|
39
|
-
* @returns {[]}
|
|
40
|
-
*/
|
|
41
|
-
export declare function getAllFieldWidgets(widgetList: Widget[] | undefined, staticWidgetsIncluded?: boolean): FieldWidgetInfo[];
|
|
42
|
-
export interface ContainerWidgetInfo {
|
|
43
|
-
type: string;
|
|
44
|
-
name: string | undefined;
|
|
45
|
-
container: Widget;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* 获取所有容器组件
|
|
49
|
-
* @param widgetList
|
|
50
|
-
* @returns {[]}
|
|
51
|
-
*/
|
|
52
|
-
export declare function getAllContainerWidgets(widgetList: Widget[] | undefined): ContainerWidgetInfo[];
|
|
53
|
-
export declare function getFieldWidgetByName(widgetList: Widget[] | undefined, fieldName: string, staticWidgetsIncluded?: boolean): Widget | null;
|
|
54
|
-
export declare function getContainerWidgetByName(widgetList: Widget[] | undefined, containerName: string): Widget | null;
|
|
55
|
-
export declare function getContainerWidgetById(widgetList: Widget[] | undefined, containerId: string): Widget | null;
|
|
56
|
-
interface MessageApi {
|
|
57
|
-
success: (msg: string) => void;
|
|
58
|
-
error: (msg: string) => void;
|
|
59
|
-
}
|
|
60
|
-
export declare function copyToClipboard(content: string, clickEvent: MouseEvent, $message: MessageApi, successMsg: string, errorMsg: string): void;
|
|
61
|
-
export declare function getQueryParam(variable: string): string | undefined;
|
|
62
|
-
export declare function getDefaultFormConfig(): FormConfig;
|
|
63
|
-
export declare function buildDefaultFormJson(): FormJsonType;
|
|
64
|
-
export declare function cloneFormConfigWithoutEventHandler(formConfig: FormConfig): FormConfig;
|
|
65
|
-
/**
|
|
66
|
-
* 转译选择项数据
|
|
67
|
-
* @param rawData
|
|
68
|
-
* @param widgetType
|
|
69
|
-
* @param labelKey
|
|
70
|
-
* @param valueKey
|
|
71
|
-
* @returns {[]}
|
|
72
|
-
*/
|
|
73
|
-
export declare function translateOptionItems<T extends Record<string, unknown>>(rawData: T[], widgetType: string, labelKey: string, valueKey: string): Array<{
|
|
74
|
-
label: unknown;
|
|
75
|
-
value: unknown;
|
|
76
|
-
}> | T[];
|
|
77
|
-
export declare function getDSByName(formConfig: FormConfig, dsName: string): {
|
|
78
|
-
uniqueName: string;
|
|
79
|
-
[key: string]: unknown;
|
|
80
|
-
} | null;
|
|
81
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
type RegExpName = 'number' | 'letter' | 'letterAndNumber' | 'mobilePhone' | 'letterStartNumberIncluded' | 'noChinese' | 'chinese' | 'email' | 'url';
|
|
2
|
-
interface ValidationRule {
|
|
3
|
-
label?: string;
|
|
4
|
-
errorMsg?: string;
|
|
5
|
-
regExp?: string;
|
|
6
|
-
[key: string]: unknown;
|
|
7
|
-
}
|
|
8
|
-
export declare const getRegExp: (validatorName: RegExpName) => RegExp | undefined;
|
|
9
|
-
type ValidatorFn = (rule: ValidationRule, value: unknown) => Promise<void> | void;
|
|
10
|
-
interface FormValidatorsType {
|
|
11
|
-
number: ValidatorFn;
|
|
12
|
-
letter: ValidatorFn;
|
|
13
|
-
letterAndNumber: ValidatorFn;
|
|
14
|
-
mobilePhone: ValidatorFn;
|
|
15
|
-
noBlankStart: ValidatorFn;
|
|
16
|
-
noBlankEnd: ValidatorFn;
|
|
17
|
-
letterStartNumberIncluded: ValidatorFn;
|
|
18
|
-
noChinese: ValidatorFn;
|
|
19
|
-
chinese: ValidatorFn;
|
|
20
|
-
email: ValidatorFn;
|
|
21
|
-
url: ValidatorFn;
|
|
22
|
-
regExp: ValidatorFn;
|
|
23
|
-
}
|
|
24
|
-
declare const FormValidators: FormValidatorsType;
|
|
25
|
-
export default FormValidators;
|