resolver-egretimp-plus 0.1.119 → 0.1.121
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/h5/index.js +18 -18
- package/dist/web/index.js +11 -11
- package/package.json +1 -1
- package/src/components/options/OptionsDefault.vue +0 -1
- package/src/components/packages-web/CustomComponentCycle.vue +38 -33
- package/src/components/packages-web/CustomComponentCycleTabPane.vue +40 -33
- package/src/components/packages-web/CustomComponentPlain.vue +6 -5
- package/src/components/packages-web/CustomComponentTable.jsx +48 -40
- package/src/components/packages-web/ElInput copy.jsx +0 -1
- package/src/components/packages-web/ElInput.jsx +0 -1
- package/src/config.js +2 -0
- package/src/hooks/pageConfig.js +10 -4
- package/src/index.jsx +15 -10
- package/src/renderer.jsx +4 -1
- package/src/resolver-common.vue +22 -2
- package/src/rules/rulesDriver.js +4 -0
- package/src/utils/common.js +13 -0
- package/src/utils/render.jsx +196 -96
- package/src-bak/analysisComponent.jsx +0 -343
- package/src-bak/api/builtIn.js +0 -10
- package/src-bak/bpm/bpmInstance.js +0 -388
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/application.js +0 -8
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/component.js +0 -97
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/datasource.js +0 -88
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/index.js +0 -3
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/UdcComponent.js +0 -76
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/index.js +0 -201
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/index.js +0 -69
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/page.js +0 -56
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/utils.js +0 -76
- package/src-bak/bpm/udc-sdk-esm/cjs/index.js +0 -46
- package/src-bak/bpm/udc-sdk-esm/cjs/utils.js +0 -21
- package/src-bak/components/childDialog/index.js +0 -39
- package/src-bak/components/childDialog/src/index.vue +0 -185
- package/src-bak/components/cmiFormItem/index.js +0 -1
- package/src-bak/components/cmiFormItem/src/index.vue +0 -112
- package/src-bak/components/confirmInstance-H5/index.js +0 -53
- package/src-bak/components/confirmInstance-H5/src/index.vue +0 -54
- package/src-bak/components/helper/FormPolyfill.jsx +0 -25
- package/src-bak/components/helper/calcTooltip.jsx +0 -134
- package/src-bak/components/helper/dock.js +0 -141
- package/src-bak/components/helper/eventOrchestration.js +0 -763
- package/src-bak/components/helper/resolver.js +0 -163
- package/src-bak/components/helper/table.jsx +0 -103
- package/src-bak/components/icons/date.vue +0 -33
- package/src-bak/components/icons/info.vue +0 -62
- package/src-bak/components/icons/loading.vue +0 -19
- package/src-bak/components/icons/question-filled.vue +0 -8
- package/src-bak/components/loading/index.js +0 -6
- package/src-bak/components/loading/loading.js +0 -98
- package/src-bak/components/loading/loading.scss +0 -74
- package/src-bak/components/loading/loading.vue +0 -89
- package/src-bak/components/loadingComponent/LoadingComponent.vue +0 -33
- package/src-bak/components/modal/index.js +0 -9
- package/src-bak/components/modal/modal.scss +0 -195
- package/src-bak/components/modal/modal.vue +0 -201
- package/src-bak/components/options/OptionsDefault.vue +0 -47
- package/src-bak/components/packages-H5/CmiButton.vue +0 -120
- package/src-bak/components/packages-H5/CmiCalendar.vue +0 -152
- package/src-bak/components/packages-H5/CmiCell.vue +0 -87
- package/src-bak/components/packages-H5/CmiCheckbox.vue +0 -82
- package/src-bak/components/packages-H5/CmiDatetimePicker.vue +0 -98
- package/src-bak/components/packages-H5/CmiDivider.vue +0 -30
- package/src-bak/components/packages-H5/CmiDropdownMenu.vue +0 -58
- package/src-bak/components/packages-H5/CmiInput.vue +0 -69
- package/src-bak/components/packages-H5/CmiLink.vue +0 -28
- package/src-bak/components/packages-H5/CmiPicker.vue +0 -229
- package/src-bak/components/packages-H5/CmiRadio.vue +0 -29
- package/src-bak/components/packages-H5/CmiSearch.vue +0 -39
- package/src-bak/components/packages-H5/CmiSelect.vue +0 -84
- package/src-bak/components/packages-H5/CustomComponentCardH5.vue +0 -129
- package/src-bak/components/packages-H5/CustomComponentColH5.vue +0 -8
- package/src-bak/components/packages-H5/CustomComponentCollapseH5.vue +0 -141
- package/src-bak/components/packages-H5/CustomComponentFormLayoutH5.vue +0 -54
- package/src-bak/components/packages-H5/CustomComponentTabPaneH5.vue +0 -38
- package/src-bak/components/packages-H5/CustomComponentTableH5.vue +0 -352
- package/src-bak/components/packages-H5/CustomComponentTabsH5.vue +0 -170
- package/src-bak/components/packages-web/CustomComponentCard.vue +0 -40
- package/src-bak/components/packages-web/CustomComponentCol.vue +0 -66
- package/src-bak/components/packages-web/CustomComponentCollapse.vue +0 -164
- package/src-bak/components/packages-web/CustomComponentCycle.vue +0 -95
- package/src-bak/components/packages-web/CustomComponentCycleTabPane.vue +0 -155
- package/src-bak/components/packages-web/CustomComponentDialog.vue +0 -192
- package/src-bak/components/packages-web/CustomComponentEditor.vue +0 -50
- package/src-bak/components/packages-web/CustomComponentFileExport.vue +0 -60
- package/src-bak/components/packages-web/CustomComponentFileImport.vue +0 -60
- package/src-bak/components/packages-web/CustomComponentFormLayout.vue +0 -65
- package/src-bak/components/packages-web/CustomComponentGrid.vue +0 -29
- package/src-bak/components/packages-web/CustomComponentGridCol.vue +0 -29
- package/src-bak/components/packages-web/CustomComponentInputDialog.vue +0 -144
- package/src-bak/components/packages-web/CustomComponentNativeTabPane.vue +0 -84
- package/src-bak/components/packages-web/CustomComponentPlain.vue +0 -247
- package/src-bak/components/packages-web/CustomComponentRow.vue +0 -83
- package/src-bak/components/packages-web/CustomComponentSelectEmployees.vue +0 -203
- package/src-bak/components/packages-web/CustomComponentSendMail.vue +0 -62
- package/src-bak/components/packages-web/CustomComponentSteps.vue +0 -41
- package/src-bak/components/packages-web/CustomComponentTabPane.vue +0 -20
- package/src-bak/components/packages-web/CustomComponentTable.jsx +0 -814
- package/src-bak/components/packages-web/CustomComponentTabs.vue +0 -126
- package/src-bak/components/packages-web/CustomComponentTree.vue +0 -28
- package/src-bak/components/packages-web/ElButton.vue +0 -146
- package/src-bak/components/packages-web/ElCheckbox.vue +0 -97
- package/src-bak/components/packages-web/ElDatePicker.vue +0 -93
- package/src-bak/components/packages-web/ElInput copy.jsx +0 -393
- package/src-bak/components/packages-web/ElInput.jsx +0 -312
- package/src-bak/components/packages-web/ElInputNumber.vue +0 -81
- package/src-bak/components/packages-web/ElPagination.vue +0 -61
- package/src-bak/components/packages-web/ElRadio.vue +0 -47
- package/src-bak/components/packages-web/ElSelect.jsx +0 -249
- package/src-bak/components/packages-web/ElSelect_bak.vue +0 -155
- package/src-bak/components/packages-web/ElText.jsx +0 -187
- package/src-bak/components/packages-web/ElTextaa.vue +0 -169
- package/src-bak/components/packages-web/ElTimePicker.vue +0 -39
- package/src-bak/components/patchComponents-H5.js +0 -46
- package/src-bak/components/patchComponents-web.js +0 -46
- package/src-bak/components/simpleFormItemPc/index.js +0 -1
- package/src-bak/components/simpleFormItemPc/src/index.vue +0 -94
- package/src-bak/components/table/index.ts +0 -29
- package/src-bak/components/table/src/composables/use-scrollbar.ts +0 -30
- package/src-bak/components/table/src/config.ts +0 -256
- package/src-bak/components/table/src/filter-panel.vue +0 -260
- package/src-bak/components/table/src/h-helper.ts +0 -34
- package/src-bak/components/table/src/layout-observer.ts +0 -78
- package/src-bak/components/table/src/store/current.ts +0 -85
- package/src-bak/components/table/src/store/expand.ts +0 -76
- package/src-bak/components/table/src/store/helper.ts +0 -74
- package/src-bak/components/table/src/store/index.ts +0 -246
- package/src-bak/components/table/src/store/tree.ts +0 -230
- package/src-bak/components/table/src/store/watcher.ts +0 -543
- package/src-bak/components/table/src/table/defaults.ts +0 -402
- package/src-bak/components/table/src/table/key-render-helper.ts +0 -27
- package/src-bak/components/table/src/table/style-helper.ts +0 -378
- package/src-bak/components/table/src/table/utils-helper.ts +0 -47
- package/src-bak/components/table/src/table-body/defaults.ts +0 -52
- package/src-bak/components/table/src/table-body/events-helper.ts +0 -203
- package/src-bak/components/table/src/table-body/index.ts +0 -119
- package/src-bak/components/table/src/table-body/render-helper.ts +0 -283
- package/src-bak/components/table/src/table-body/styles-helper.ts +0 -164
- package/src-bak/components/table/src/table-column/defaults.ts +0 -237
- package/src-bak/components/table/src/table-column/index.ts +0 -202
- package/src-bak/components/table/src/table-column/render-helper.ts +0 -214
- package/src-bak/components/table/src/table-column/watcher-helper.ts +0 -88
- package/src-bak/components/table/src/table-footer/index.ts +0 -128
- package/src-bak/components/table/src/table-footer/mapState-helper.ts +0 -33
- package/src-bak/components/table/src/table-footer/style-helper.ts +0 -51
- package/src-bak/components/table/src/table-header/event-helper.ts +0 -213
- package/src-bak/components/table/src/table-header/index.ts +0 -244
- package/src-bak/components/table/src/table-header/style.helper.ts +0 -119
- package/src-bak/components/table/src/table-header/utils-helper.ts +0 -94
- package/src-bak/components/table/src/table-layout.ts +0 -259
- package/src-bak/components/table/src/table.vue +0 -389
- package/src-bak/components/table/src/tableColumn.ts +0 -3
- package/src-bak/components/table/src/tokens.ts +0 -5
- package/src-bak/components/table/src/util.ts +0 -521
- package/src-bak/components/table/style/css.ts +0 -5
- package/src-bak/components/table/style/index.ts +0 -5
- package/src-bak/components/tabs/index.js +0 -8
- package/src-bak/components/tabs/src/constants.js +0 -23
- package/src-bak/components/tabs/src/tab-bar.js +0 -8
- package/src-bak/components/tabs/src/tab-bar.vue +0 -92
- package/src-bak/components/tabs/src/tab-nav.jsx +0 -424
- package/src-bak/components/tabs/src/tab-pane.js +0 -16
- package/src-bak/components/tabs/src/tab-pane.vue +0 -80
- package/src-bak/components/tabs/src/tabs.jsx +0 -223
- package/src-bak/components/tabs/style/css.js +0 -2
- package/src-bak/components/tabs/style/index.js +0 -2
- package/src-bak/components/thirdPartyFrame/index.js +0 -32
- package/src-bak/components/thirdPartyFrame/src/ThirdPartyFrame.vue +0 -125
- package/src-bak/enums/index.js +0 -16
- package/src-bak/hooks/configLoad.js +0 -45
- package/src-bak/hooks/index.js +0 -189
- package/src-bak/hooks/mock.js +0 -6960
- package/src-bak/hooks/pageConfig.js +0 -127
- package/src-bak/index.jsx +0 -443
- package/src-bak/renderer.jsx +0 -77
- package/src-bak/resolver-H5.vue +0 -88
- package/src-bak/resolver-common.vue +0 -129
- package/src-bak/resolver-web.vue +0 -91
- package/src-bak/rules/eventsSupplement.js +0 -573
- package/src-bak/rules/parseCondition.js +0 -378
- package/src-bak/rules/ruleUtils.js +0 -273
- package/src-bak/rules/rulesDriver.js +0 -139
- package/src-bak/rulesImp/events.js +0 -588
- package/src-bak/rulesImp/index.js +0 -33
- package/src-bak/rulesImp/ruleInstance.js +0 -231
- package/src-bak/rulesImp/ruleUtils.js +0 -124
- package/src-bak/theme/element/components/button.scss +0 -122
- package/src-bak/theme/element/components/card.scss +0 -8
- package/src-bak/theme/element/components/checkbox.scss +0 -19
- package/src-bak/theme/element/components/collapse.scss +0 -174
- package/src-bak/theme/element/components/common.scss +0 -30
- package/src-bak/theme/element/components/cycle.scss +0 -0
- package/src-bak/theme/element/components/date.scss +0 -13
- package/src-bak/theme/element/components/dialog.scss +0 -44
- package/src-bak/theme/element/components/form.scss +0 -104
- package/src-bak/theme/element/components/index.scss +0 -55
- package/src-bak/theme/element/components/input.scss +0 -36
- package/src-bak/theme/element/components/message.scss +0 -48
- package/src-bak/theme/element/components/pagination.scss +0 -47
- package/src-bak/theme/element/components/popper.scss +0 -3
- package/src-bak/theme/element/components/radio.scss +0 -40
- package/src-bak/theme/element/components/scrollbar.scss +0 -14
- package/src-bak/theme/element/components/select.scss +0 -82
- package/src-bak/theme/element/components/steps.scss +0 -6
- package/src-bak/theme/element/components/table.scss +0 -218
- package/src-bak/theme/element/components/tabs.scss +0 -128
- package/src-bak/theme/element/components/tag.scss +0 -6
- package/src-bak/theme/element/components/text.scss +0 -20
- package/src-bak/theme/element/components/textarea.scss +0 -3
- package/src-bak/theme/element/components/tree.scss +0 -0
- package/src-bak/theme/element/index.scss +0 -55
- package/src-bak/utils/cipher.js +0 -141
- package/src-bak/utils/common.js +0 -664
- package/src-bak/utils/const.js +0 -259
- package/src-bak/utils/defaultVal.js +0 -92
- package/src-bak/utils/dom.js +0 -36
- package/src-bak/utils/format.js +0 -19
- package/src-bak/utils/index.js +0 -4
- package/src-bak/utils/is.js +0 -74
- package/src-bak/utils/loadModule.js +0 -75
- package/src-bak/utils/preserveFunc.js +0 -33
- package/src-bak/utils/render.jsx +0 -1138
- package/src-bak/utils/request.js +0 -136
- package/src-bak/utils/respone.js +0 -70
- package/src-bak/utils/valid.js +0 -89
package/src-bak/utils/const.js
DELETED
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
import { normalPixel, getDate, findComponent, isPatchComponent, getConfigOptions } from './common.js'
|
|
2
|
-
|
|
3
|
-
export const MODE = {
|
|
4
|
-
OPERATE: 'operate',
|
|
5
|
-
DETAIL: 'detail',
|
|
6
|
-
LOG: 'log'
|
|
7
|
-
}
|
|
8
|
-
export const ARG_FLAGS = {
|
|
9
|
-
CURRENT_DATE: '_currentDate',
|
|
10
|
-
CURRENT_DATE_EXCLUDE: '_currentDateExclude',
|
|
11
|
-
CURRENT_DATE_TIME: '_currentDateTime',
|
|
12
|
-
REF_VAL: '_refVal'
|
|
13
|
-
}
|
|
14
|
-
export const VALUE_TYPES = {
|
|
15
|
-
LIST: 'list',
|
|
16
|
-
OBJECT: 'object',
|
|
17
|
-
STRING: 'string',
|
|
18
|
-
}
|
|
19
|
-
export const NOT_LOAD_CHILD_TYPE = ['CustomComponentTableH5']
|
|
20
|
-
export const NOT_LOG_EFFECT_TYPE = ['CustomComponentTabs', 'CustomComponentTabPane', 'CustomComponentCycleTabPane', 'CustomComponentCollapse', 'CustomComponentTabPaneH5']
|
|
21
|
-
export const FORM_META_TYPE = 'CustomComponentFormLayout'
|
|
22
|
-
export const FORM_META_TYPE_H5 = 'CustomComponentFormLayoutH5'
|
|
23
|
-
export const CONTEXT_PEDDING_TYPE = ['CustomComponentDialog']
|
|
24
|
-
export const NOT_NEED_FORM_ITEM_META_TYPE = [
|
|
25
|
-
'CustomComponentTabs',
|
|
26
|
-
'CustomComponentTabPane',
|
|
27
|
-
'CustomComponentCycleTabPane',
|
|
28
|
-
'CustomComponentCollapse',
|
|
29
|
-
'CustomComponentDialog',
|
|
30
|
-
'ElButton',
|
|
31
|
-
'CustomComponentTable',
|
|
32
|
-
'CustomComponentRow',
|
|
33
|
-
'CustomComponentCol',
|
|
34
|
-
'CustomComponentCycle',
|
|
35
|
-
|
|
36
|
-
'CustomComponentCardH5',
|
|
37
|
-
'CustomComponentCollapseH5',
|
|
38
|
-
'CustomComponentTabsH5',
|
|
39
|
-
'CustomComponentTabPaneH5',
|
|
40
|
-
'CustomComponentTableH5',
|
|
41
|
-
'cmi-cell',
|
|
42
|
-
'cmi-button',
|
|
43
|
-
'cmi-link',
|
|
44
|
-
'cmi-dropdown-menu',
|
|
45
|
-
'cmi-divider'
|
|
46
|
-
]
|
|
47
|
-
export const EXECTE_CLICK_EVENT_COMPONENTS = ['ElInput', 'ElButton', 'CmiInput', 'CmiButton', 'ElText']
|
|
48
|
-
export const TRANS_CELL_COMPONETS = ['CmiInput', 'CmiSelect', 'CmiPicker']
|
|
49
|
-
export const CYCLE_COMPONETS = ['CustomComponentCycle', 'CustomComponentCycleTabPane', 'CustomComponentTable']
|
|
50
|
-
export const NOT_NEED_COL_ITEM_META_TYPE = ['CustomComponentTabPane', 'CustomComponentDialog', 'CustomComponentCol', 'CustomComponentTabPaneH5']
|
|
51
|
-
export const MULTI_PAGE_META_LIST_TYPES = ['CustomComponentTable']
|
|
52
|
-
export const SPECIAL_SET_FULL_WIDTH_ITEM_META_TYPE = ['el-select', 'el-date-picker', 'el-time-picker', 'el-time-select', 'el-cascader', 'el-input-number', 'CustomComponentTree', 'CustomComponentSteps']
|
|
53
|
-
export const TABLE_COLUMN_NOT_RENDER_META_TYPE = ['el-span']
|
|
54
|
-
export const PREFIX_FLAG = 'el-'
|
|
55
|
-
export const REPLACE_PREFIX_FLAG = 't-'
|
|
56
|
-
export const H5_PREFIX_FLAG = 'cmi-'
|
|
57
|
-
export const H5_REPLACE_PREFIX_FLAG = 'H5-'
|
|
58
|
-
export const DISPLAY_SHOW = '1'
|
|
59
|
-
export const DISPLAY_HIDDEN = '0'
|
|
60
|
-
export const PLAIN_TYPE_ALONG_COLUMNS = ['ElText']
|
|
61
|
-
export const PLAIN_TYPE_COLUMNS = ['ElInput', 'ElDatePicker', 'ElInputNumber']
|
|
62
|
-
export const PLAIN_TYPE_OPTIONS_COLUMNS = ['ElSelect']
|
|
63
|
-
export const commonPropsType = {
|
|
64
|
-
// 这边是组件的信息
|
|
65
|
-
compInfo: {
|
|
66
|
-
type: Object,
|
|
67
|
-
getValue(config, props, modelValue) {
|
|
68
|
-
return config
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
modelValue: {
|
|
72
|
-
type: [String, Number, Object, Array, Boolean, undefined, null],
|
|
73
|
-
getValue(config, props, modelValue) {
|
|
74
|
-
return modelValue.value
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
// 这边是组件的信息
|
|
78
|
-
config: {
|
|
79
|
-
type: Object,
|
|
80
|
-
getValue(config, props, modelValue) {
|
|
81
|
-
return config
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
// 组件对应的ref的值
|
|
85
|
-
refValue: {
|
|
86
|
-
type: [Object, Number, String],
|
|
87
|
-
default: '',
|
|
88
|
-
getValue(config, props, modelValue) {
|
|
89
|
-
return modelValue
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
// 组件是否禁用
|
|
93
|
-
disabled: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
default: false,
|
|
96
|
-
getValue(config, props, modelValue) {
|
|
97
|
-
return calcDisable(config, props.mode)
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
// 组件是否可清除
|
|
101
|
-
clearable: {
|
|
102
|
-
type: Boolean,
|
|
103
|
-
default: false,
|
|
104
|
-
getValue(config, props, modelValue) {
|
|
105
|
-
return config.clearableFlag == '1'
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
// 组件是否必填
|
|
109
|
-
required: {
|
|
110
|
-
type: Boolean,
|
|
111
|
-
default: false,
|
|
112
|
-
getValue(config, props, modelValue) {
|
|
113
|
-
return config.requiredFlag == '1'
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
// 组件是否必填
|
|
117
|
-
hidden: {
|
|
118
|
-
type: Boolean,
|
|
119
|
-
default: false,
|
|
120
|
-
getValue(config, props, modelValue) {
|
|
121
|
-
return isHidden({config})
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
// 组件是否展示必填标识
|
|
125
|
-
onlyRequiredFlag: {
|
|
126
|
-
type: [Boolean, String, Number],
|
|
127
|
-
default: false,
|
|
128
|
-
getValue(config, props, modelValue) {
|
|
129
|
-
return config.onlyRequiredFlag
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
// 表格引用到组件的时候,会传入表格数据
|
|
133
|
-
tableData: {
|
|
134
|
-
type: Array,
|
|
135
|
-
default: () => [],
|
|
136
|
-
getValue(config, props, modelValue) {
|
|
137
|
-
return props.tableData
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
// 表格引用到组件的时候,会传入 row 跟 index 的集合
|
|
141
|
-
rowScope: {
|
|
142
|
-
type: Object,
|
|
143
|
-
getValue(config, props, modelValue) {
|
|
144
|
-
return props.rowScope
|
|
145
|
-
}
|
|
146
|
-
},
|
|
147
|
-
width: {
|
|
148
|
-
type: [String, Number],
|
|
149
|
-
default: '',
|
|
150
|
-
getValue(config, props, modelValue) {
|
|
151
|
-
if (!config.width) return null
|
|
152
|
-
return normalPixel(config.width)
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
mode: {
|
|
156
|
-
type: [String],
|
|
157
|
-
default: '',
|
|
158
|
-
getValue(config, props,) {
|
|
159
|
-
return props.mode
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
options: {
|
|
163
|
-
type: Array,
|
|
164
|
-
default: () => [],
|
|
165
|
-
getValue(config, props, modelValue, selects) {
|
|
166
|
-
return getConfigOptions(config, selects)
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
placeholder: {
|
|
170
|
-
type: String,
|
|
171
|
-
default: () => '',
|
|
172
|
-
getValue(config, props, modelValue, selects, lang) {
|
|
173
|
-
return (lang?.indexOf('zh') > -1 ? config.defPlacehold : config.defPlaceholdEn) || ''
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
placeholderEn: {
|
|
177
|
-
type: String,
|
|
178
|
-
default: () => '',
|
|
179
|
-
getValue(config, props, modelValue, selects, lang) {
|
|
180
|
-
return config.defPlaceholdEn
|
|
181
|
-
}
|
|
182
|
-
},
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export function isHidden({config}) {
|
|
186
|
-
return (typeof config.hidden === 'boolean' && config.hidden) || config.hidden == '1' || config.collapseHidden == '1'
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export function calcDisable(config, mode) {
|
|
190
|
-
const specicesType = [
|
|
191
|
-
'CustomComponentTabs',
|
|
192
|
-
// 'CustomComponentTabPane' // 有需要需根据配置来进行配置是否禁用
|
|
193
|
-
]
|
|
194
|
-
const flag = isPatchComponent(specicesType, config) ?
|
|
195
|
-
false :
|
|
196
|
-
mode === MODE.LOG ?
|
|
197
|
-
(
|
|
198
|
-
config.logAlong || isPatchComponent([FORM_META_TYPE, ...NOT_LOG_EFFECT_TYPE], config) ?
|
|
199
|
-
config.editFlag == '0' :
|
|
200
|
-
true
|
|
201
|
-
) :
|
|
202
|
-
mode === MODE.DETAIL ?
|
|
203
|
-
(config.detailAlong || isPatchComponent([FORM_META_TYPE, ...NOT_LOG_EFFECT_TYPE], config) ?
|
|
204
|
-
config.editFlag == '0' :
|
|
205
|
-
true
|
|
206
|
-
) :
|
|
207
|
-
config.editFlag == '0'
|
|
208
|
-
return flag
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export const META_TYPE_MAP = {
|
|
212
|
-
row: 'CustomComponentRow',
|
|
213
|
-
grid: 'CustomComponentRow',
|
|
214
|
-
'grid-col': 'CustomComponentCol',
|
|
215
|
-
table: 'CustomComponentTable',
|
|
216
|
-
'checkbox-table': 'CustomComponentTable',
|
|
217
|
-
tab: 'CustomComponentTabs',
|
|
218
|
-
'tab-pane': 'CustomComponentTabPane',
|
|
219
|
-
collapse: 'CustomComponentCollapse',
|
|
220
|
-
'card': 'CustomComponentCollapse',
|
|
221
|
-
cycle: 'CustomComponentCycle',
|
|
222
|
-
'input': 'ElInput',
|
|
223
|
-
'textarea': 'ElInput',
|
|
224
|
-
'button': 'ElButton',
|
|
225
|
-
'static-text': 'ElText',
|
|
226
|
-
'number': 'ElInputNumber',
|
|
227
|
-
'radio': 'ElRadio',
|
|
228
|
-
'checkbox': 'ElCheckbox',
|
|
229
|
-
'select': 'ElSelect',
|
|
230
|
-
'time': 'ElTimePicker',
|
|
231
|
-
'time-range': 'ElTimePicker',
|
|
232
|
-
'date': 'ElDatePicker',
|
|
233
|
-
'date-range': 'ElDatePicker',
|
|
234
|
-
'cascader': 'ElCascader',
|
|
235
|
-
'select-employees': 'CustomComponentSelectEmployees',
|
|
236
|
-
'rich-editor': 'CustomComponentEditor',
|
|
237
|
-
'pagination': 'ElPagination',
|
|
238
|
-
'tree': 'CustomComponentTree',
|
|
239
|
-
'steps': 'CustomComponentSteps',
|
|
240
|
-
'mail-send': 'CustomComponentSendMail',
|
|
241
|
-
'file-import': 'CustomComponentFileImport',
|
|
242
|
-
'file-export': 'CustomComponentFileExport',
|
|
243
|
-
|
|
244
|
-
'cmi-card': 'CustomComponentCardH5',
|
|
245
|
-
'cmi-collapse': 'CustomComponentCollapseH5',
|
|
246
|
-
'cmi-tab': 'CustomComponentTabsH5',
|
|
247
|
-
'cmi-tab-pane': 'CustomComponentTabPaneH5',
|
|
248
|
-
'cmi-table': 'CustomComponentTableH5',
|
|
249
|
-
'cmi-datetime': 'CmiDatetimePicker',
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
export {
|
|
253
|
-
commonPropsType as componentPropsType
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
if (window) {
|
|
257
|
-
!window['resolver-egretimp-plus'] && (window['resolver-egretimp-plus'] = {})
|
|
258
|
-
window['resolver-egretimp-plus']['componentPropsType'] = commonPropsType
|
|
259
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { toRaw } from 'vue'
|
|
2
|
-
import { formatDate, isPlainObject } from './common'
|
|
3
|
-
import { ARG_FLAGS, isHidden, VALUE_TYPES } from './const'
|
|
4
|
-
import { isArray, isNumber, isString } from './is'
|
|
5
|
-
import dayjs from 'dayjs'
|
|
6
|
-
|
|
7
|
-
export default function defaultVal(config) {
|
|
8
|
-
if (
|
|
9
|
-
(config.defaultVal || config.defaultValue) &&
|
|
10
|
-
!config.bindValue && config.bindValue !== 0 &&
|
|
11
|
-
!(isArray(config.bindValue) && config.bindValue.length) // 数组等于空的数组的时候
|
|
12
|
-
) {
|
|
13
|
-
const configDefaultVal = config.defaultVal || config.defaultValue
|
|
14
|
-
let defaultVal = null
|
|
15
|
-
try {
|
|
16
|
-
if (typeof configDefaultVal === 'string') {
|
|
17
|
-
const trimValue = configDefaultVal.trim()
|
|
18
|
-
let routeMatchs = null
|
|
19
|
-
if (routeMatchs = trimValue.match(/^_route:(.*)$/)) {
|
|
20
|
-
const queryKey = routeMatchs[1]
|
|
21
|
-
const routeQuery = config?.route?.query
|
|
22
|
-
defaultVal = routeQuery?.[queryKey]
|
|
23
|
-
} else if (routeMatchs = trimValue.match(/^_native:(.*)$/)) {
|
|
24
|
-
const val = routeMatchs[1]
|
|
25
|
-
defaultVal = val
|
|
26
|
-
} else if (/^_lang$/.test(trimValue)) {
|
|
27
|
-
defaultVal = config?._lang
|
|
28
|
-
} else if (/^{[\w\W]*}$/.test(trimValue) || /^\[[\w\W]*\]$/.test(trimValue)) {
|
|
29
|
-
defaultVal = JSON.parse(trimValue)
|
|
30
|
-
} else {
|
|
31
|
-
const dateFlagIncluds = [
|
|
32
|
-
ARG_FLAGS.CURRENT_DATE,
|
|
33
|
-
'currentDate',
|
|
34
|
-
ARG_FLAGS.CURRENT_DATE_TIME,
|
|
35
|
-
ARG_FLAGS.CURRENT_DATE_EXCLUDE
|
|
36
|
-
]
|
|
37
|
-
if (dateFlagIncluds.includes((trimValue || '').trim())) {
|
|
38
|
-
if (trimValue === ARG_FLAGS.CURRENT_DATE_TIME) {
|
|
39
|
-
defaultVal = formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')
|
|
40
|
-
} else if (trimValue === ARG_FLAGS.CURRENT_DATE_EXCLUDE) {
|
|
41
|
-
defaultVal = dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')
|
|
42
|
-
} else {
|
|
43
|
-
defaultVal = formatDate(new Date(), 'yyyy-MM-dd')
|
|
44
|
-
}
|
|
45
|
-
} else if (['true', 'false'].includes(trimValue)) {
|
|
46
|
-
defaultVal = trimValue == 'true' ? true : false
|
|
47
|
-
} else {
|
|
48
|
-
defaultVal = trimValue
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
} else {
|
|
52
|
-
defaultVal = toRaw(configDefaultVal)
|
|
53
|
-
}
|
|
54
|
-
if (config.metaType === 'ElSelect') {
|
|
55
|
-
defaultVal = formatSelectVal({config, val: defaultVal})
|
|
56
|
-
}
|
|
57
|
-
console.log(`${config.dynamicHireRelat},${config.hireRelat} to set defaultValue, ${defaultVal}`)
|
|
58
|
-
config.refValue = defaultVal
|
|
59
|
-
} catch (error) {
|
|
60
|
-
console.log('set default val fail, config', config, error)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export function formatSelectVal({
|
|
66
|
-
config,
|
|
67
|
-
val,
|
|
68
|
-
isActive = false
|
|
69
|
-
}) {
|
|
70
|
-
let retValue = val
|
|
71
|
-
if (!isHidden({config}) || isActive) {
|
|
72
|
-
const valueType = config?.valueType
|
|
73
|
-
const separator = config?.separator
|
|
74
|
-
if (valueType !== VALUE_TYPES.LIST && valueType !== VALUE_TYPES.OBJECT) {
|
|
75
|
-
if (isPlainObject(val) || isArray(val)) {
|
|
76
|
-
try {
|
|
77
|
-
retValue = Object.values(val).join(separator)
|
|
78
|
-
} catch (error) {
|
|
79
|
-
retValue = val
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
if ((val && isString(val)) || isNumber(val)) {
|
|
84
|
-
retValue = `${val}`?.split(separator)
|
|
85
|
-
if (valueType == VALUE_TYPES.OBJECT) {
|
|
86
|
-
retValue = retValue?.reduce((ret, item, idx) => {ret[idx] = item; return ret;}, {})
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return retValue
|
|
92
|
-
}
|
package/src-bak/utils/dom.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
export function getDomWidth(dom, offset = 0) {
|
|
2
|
-
const range = document.createRange()
|
|
3
|
-
range.setStart(dom, 0)
|
|
4
|
-
range.setEnd(dom, dom?.childNodes?.length)
|
|
5
|
-
return range.getBoundingClientRect()?.width - offset
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function getDomComputed(el) {
|
|
9
|
-
return window.getComputedStyle(el, null)
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function getPadding(el) {
|
|
13
|
-
const domCss = window.getComputedStyle(el, null)
|
|
14
|
-
const pl = Number.parseInt(domCss.paddingLeft, 10) || 0
|
|
15
|
-
const pr = Number.parseInt(domCss.paddingRight, 10) || 0
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
left: pl,
|
|
19
|
-
right: pr
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function calcTextLength(text, fontSize) {
|
|
24
|
-
if (!text) return 0
|
|
25
|
-
const size = Number.parseInt(fontSize)
|
|
26
|
-
let realLength = 0
|
|
27
|
-
for(let i = 0; i < text.length; i ++) {
|
|
28
|
-
const charCode = text.charCodeAt(i)
|
|
29
|
-
if (charCode >= 0 && charCode <= 128) {
|
|
30
|
-
realLength += Number.parseFloat((0.54714 * size).toFixed(5))
|
|
31
|
-
} else {
|
|
32
|
-
realLength += 1 * size
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return realLength
|
|
36
|
-
}
|
package/src-bak/utils/format.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
// 金额显示方法
|
|
3
|
-
formatAmount(number) {
|
|
4
|
-
const str = String(number)
|
|
5
|
-
const reg = /(\d)(?=(?:\d{3})+$)/g
|
|
6
|
-
return str.replace(reg, '$1,')
|
|
7
|
-
},
|
|
8
|
-
// 金额显示方法加上符号
|
|
9
|
-
formatAmountWidthSymbol: {
|
|
10
|
-
get(val) {
|
|
11
|
-
const num = parseFloat(val)
|
|
12
|
-
return num.toLocaleString('zh', { style: 'currency', currency: 'CNY' })
|
|
13
|
-
},
|
|
14
|
-
set(val) {
|
|
15
|
-
val = val.trim()
|
|
16
|
-
return val.length === '' ? 0 : val.replace(/(¥|,)/g, '')
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
package/src-bak/utils/index.js
DELETED
package/src-bak/utils/is.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
export {
|
|
2
|
-
isArguments,
|
|
3
|
-
isArrayBuffer,
|
|
4
|
-
isArrayLike,
|
|
5
|
-
isArrayLikeObject,
|
|
6
|
-
isBuffer,
|
|
7
|
-
isBoolean,
|
|
8
|
-
isDate,
|
|
9
|
-
isElement,
|
|
10
|
-
isEmpty,
|
|
11
|
-
isEqual,
|
|
12
|
-
isEqualWith,
|
|
13
|
-
isError,
|
|
14
|
-
isFunction,
|
|
15
|
-
isFinite,
|
|
16
|
-
isLength,
|
|
17
|
-
isMap,
|
|
18
|
-
isMatch,
|
|
19
|
-
isMatchWith,
|
|
20
|
-
isNative,
|
|
21
|
-
isNil,
|
|
22
|
-
isNumber,
|
|
23
|
-
isNull,
|
|
24
|
-
isObjectLike,
|
|
25
|
-
isRegExp,
|
|
26
|
-
isSafeInteger,
|
|
27
|
-
isSet,
|
|
28
|
-
isString,
|
|
29
|
-
isSymbol,
|
|
30
|
-
isTypedArray,
|
|
31
|
-
isUndefined,
|
|
32
|
-
isWeakMap,
|
|
33
|
-
isWeakSet,
|
|
34
|
-
isNaN
|
|
35
|
-
} from 'lodash-es';
|
|
36
|
-
const toString = Object.prototype.toString;
|
|
37
|
-
|
|
38
|
-
export function is(val, type) {
|
|
39
|
-
return toString.call(val) === `[object ${type}]`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export function isDef(val) {
|
|
43
|
-
return typeof val !== 'undefined';
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export function isObject(val){
|
|
47
|
-
return val !== null && is(val, 'Object');
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
export function isArray(val) {
|
|
51
|
-
return val && Array.isArray(val);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function isWindow(val) {
|
|
55
|
-
return typeof window !== 'undefined' && is(val, 'Window');
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function isHasVal(val) {
|
|
59
|
-
return val !== null && val !== undefined
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export const isServer = typeof window === 'undefined';
|
|
63
|
-
|
|
64
|
-
export const isClient = !isServer;
|
|
65
|
-
|
|
66
|
-
export function isHttpUrl(path) {
|
|
67
|
-
const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?/;
|
|
68
|
-
return reg.test(path);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export function isPascalCase(str) {
|
|
72
|
-
const regex = /^[A-Z][A-Za-z]*$/;
|
|
73
|
-
return regex.test(str);
|
|
74
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import * as Vue from 'vue'
|
|
2
|
-
import { loadModule } from 'vue3-sfc-loader'
|
|
3
|
-
import * as Router from 'vue-router'
|
|
4
|
-
import { buildInRequest } from './request'
|
|
5
|
-
import { FIND_FILEA_NND_CONENT_BY_ID } from '../api/builtIn'
|
|
6
|
-
import { resultToast } from './respone'
|
|
7
|
-
let messageInstance = null
|
|
8
|
-
|
|
9
|
-
const fileCache = new Map()
|
|
10
|
-
|
|
11
|
-
const options = {
|
|
12
|
-
moduleCache: {
|
|
13
|
-
vue: Vue,
|
|
14
|
-
'vue-router': Router,
|
|
15
|
-
},
|
|
16
|
-
async getFile(url) {
|
|
17
|
-
const fileId = url?.originVal?.() || url
|
|
18
|
-
if (!fileId) {
|
|
19
|
-
messageInstance?.error('custom component fileId empty!')
|
|
20
|
-
return
|
|
21
|
-
}
|
|
22
|
-
if (!fileCache.has(fileId)) {
|
|
23
|
-
fileCache.set(fileId, buildInRequest(FIND_FILEA_NND_CONENT_BY_ID, {fileId}).then(ret => {
|
|
24
|
-
if (resultToast(ret.data, messageInstance)) {
|
|
25
|
-
return ret.data.result?.content
|
|
26
|
-
} else {
|
|
27
|
-
return '<template><span></span></template>'
|
|
28
|
-
}
|
|
29
|
-
}).catch(() => {
|
|
30
|
-
return '<template><span></span></template>'
|
|
31
|
-
}))
|
|
32
|
-
}
|
|
33
|
-
return fileCache.get(fileId)
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
addStyle(textContent) {
|
|
37
|
-
const style = Object.assign(document.createElement('style'), { textContent });
|
|
38
|
-
const ref = document.head.getElementsByTagName('style')[0] || null;
|
|
39
|
-
document.head.insertBefore(style, ref);
|
|
40
|
-
},
|
|
41
|
-
log(type, ...args) {
|
|
42
|
-
console[type](...args);
|
|
43
|
-
},
|
|
44
|
-
compiledCache: {
|
|
45
|
-
set(key, str) {
|
|
46
|
-
for (;;) {
|
|
47
|
-
try {
|
|
48
|
-
window.localStorage.setItem(key, str);
|
|
49
|
-
break;
|
|
50
|
-
} catch(ex) {
|
|
51
|
-
window.localStorage.removeItem(window.localStorage.key(0));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
get(key) {
|
|
56
|
-
return window.localStorage.getItem(key) ?? undefined;
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
handleModule(type, source, path, options) {
|
|
61
|
-
if ( type === '.json' )
|
|
62
|
-
return JSON.parse(source);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export default function(url, moduleCache, _messageInstance) {
|
|
67
|
-
messageInstance = _messageInstance
|
|
68
|
-
options.moduleCache['resolver-egretimp-plus'] = window['resolver-egretimp-plus']
|
|
69
|
-
options.moduleCache['resolver-egretimp-plus/h5'] = window['resolver-egretimp-plus']
|
|
70
|
-
options.moduleCache['resolver-egretimp-plus/web'] = window['resolver-egretimp-plus']
|
|
71
|
-
Object.keys(moduleCache || {}).forEach(key => {
|
|
72
|
-
options.moduleCache[key] = moduleCache[key]
|
|
73
|
-
})
|
|
74
|
-
return loadModule(url, options)
|
|
75
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { normalPixel, getDate } from './common.js'
|
|
2
|
-
|
|
3
|
-
function getFunctionArguments(fnStirng) {
|
|
4
|
-
// 使用正则表达式匹配函数的参数部分
|
|
5
|
-
const args = fnStirng.match(/\(([^)]*)\)/)[1];
|
|
6
|
-
// 使用逗号分隔参数字符串,并去除空格
|
|
7
|
-
if (!args) return []
|
|
8
|
-
return args.split(',').map(arg => arg.trim());
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const PRESERVE_FUNC = [
|
|
12
|
-
{
|
|
13
|
-
key: /^getDate\(\w*\)$/,
|
|
14
|
-
value: getDate
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
export function preserveCheck(key, val) {
|
|
19
|
-
const regItem = PRESERVE_FUNC.find(({key: regKey}) => {
|
|
20
|
-
return regKey?.test(val)
|
|
21
|
-
})
|
|
22
|
-
if (regItem) {
|
|
23
|
-
const params = getFunctionArguments(val)
|
|
24
|
-
const currentFn = regItem.value
|
|
25
|
-
return {
|
|
26
|
-
checked: true,
|
|
27
|
-
val: currentFn(...params)
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return {
|
|
31
|
-
checked: false,
|
|
32
|
-
}
|
|
33
|
-
}
|