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
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { ElText, ElIcon } from 'element-plus'
|
|
2
|
-
import { computed, defineProps, inject, getCurrentInstance, useAttrs, useSlots } from 'vue'
|
|
3
|
-
import { commonPropsType } from '../../utils/index.js'
|
|
4
|
-
import { h, resolveComponent, withModifiers } from 'vue'
|
|
5
|
-
import { useToolTip } from '../helper/calcTooltip.jsx'
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
inheritAttrs: false,
|
|
9
|
-
props: {
|
|
10
|
-
...commonPropsType,
|
|
11
|
-
...ElText.props,
|
|
12
|
-
fontSize: [String, Number],
|
|
13
|
-
needWrap: {
|
|
14
|
-
type: [String, Number],
|
|
15
|
-
default: '0'
|
|
16
|
-
},
|
|
17
|
-
suffixIcon: {
|
|
18
|
-
type: [String, Object],
|
|
19
|
-
default: ''
|
|
20
|
-
},
|
|
21
|
-
isPointer: {
|
|
22
|
-
type: [String, Number]
|
|
23
|
-
},
|
|
24
|
-
// 是否在超出的时候展示tooltip
|
|
25
|
-
showTooltip: {
|
|
26
|
-
type: [String, Number],
|
|
27
|
-
default: '0'
|
|
28
|
-
},
|
|
29
|
-
truncated: {
|
|
30
|
-
type: [String, Number, Boolean],
|
|
31
|
-
default: '0'
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
emits: ['update:modelValue'],
|
|
35
|
-
setup(props, { emit, attrs, expose, slots }) {
|
|
36
|
-
// 这个是真实的值
|
|
37
|
-
const modelValue = computed({
|
|
38
|
-
get() {
|
|
39
|
-
return props.modelValue
|
|
40
|
-
},
|
|
41
|
-
set(val) {
|
|
42
|
-
emit('update:modelValue', val)
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
const lang = inject('lang')
|
|
46
|
-
const appContext = getCurrentInstance()?.appContext
|
|
47
|
-
const isPagePopup = computed(() => {
|
|
48
|
-
return props.config?.lcpPagePopupMapVO
|
|
49
|
-
})
|
|
50
|
-
const normalVal = computed(() => {
|
|
51
|
-
let val = (modelValue.value !== null && modelValue.value !== undefined) ? modelValue.value : ''
|
|
52
|
-
if (typeof val === 'object') {
|
|
53
|
-
try {
|
|
54
|
-
val = JSON.stringify(val)
|
|
55
|
-
} catch (error) {
|
|
56
|
-
val = ''
|
|
57
|
-
}
|
|
58
|
-
} else if (typeof val === 'function') {
|
|
59
|
-
val = ''
|
|
60
|
-
}
|
|
61
|
-
const findItem = props?.options?.find(item => item.columnValue == val)
|
|
62
|
-
if (findItem) {
|
|
63
|
-
return lang?.value?.indexOf('zh') > -1 ? findItem.columnDesc_zh : findItem.columnDesc
|
|
64
|
-
}
|
|
65
|
-
return val
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
const elTextProps = computed(() => {
|
|
69
|
-
const result = Object.keys(ElText.props).reduce((ret, key) => {
|
|
70
|
-
ret[key] = props[key]
|
|
71
|
-
return ret
|
|
72
|
-
}, {})
|
|
73
|
-
if (typeof result.truncated !== 'boolean') {
|
|
74
|
-
result.truncated = result.truncated == '1'
|
|
75
|
-
}
|
|
76
|
-
return result
|
|
77
|
-
})
|
|
78
|
-
const buttonActions = inject('buttonActions', {})
|
|
79
|
-
|
|
80
|
-
const labelDesc = computed(() => {
|
|
81
|
-
return normalVal.value
|
|
82
|
-
})
|
|
83
|
-
const showTooltip = computed(() => {
|
|
84
|
-
return props?.showTooltip == '1'
|
|
85
|
-
})
|
|
86
|
-
|
|
87
|
-
const { generateTooltipWrap } = useToolTip({
|
|
88
|
-
showTooltip,
|
|
89
|
-
offset: computed(() => {
|
|
90
|
-
let offset = 0
|
|
91
|
-
if (props.needWrap == '1') {
|
|
92
|
-
offset = 22
|
|
93
|
-
if (props.suffixIcon) {
|
|
94
|
-
offset = 36
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
return offset
|
|
98
|
-
}),
|
|
99
|
-
displayValue: labelDesc,
|
|
100
|
-
config: props.config,
|
|
101
|
-
calcFn(node) {
|
|
102
|
-
return node?.getBoundingClientRect?.()?.width
|
|
103
|
-
}
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
const dynamicMapComp = inject('dynamicMapComp')
|
|
107
|
-
const hireRelatMapRules = inject('hireRelatMapRules')
|
|
108
|
-
const components = inject('components')
|
|
109
|
-
const selects = inject('selects')
|
|
110
|
-
const rootValue = inject('rootValue')
|
|
111
|
-
const dataLoad = inject('dataLoad')
|
|
112
|
-
const rootForm = inject('rootForm')
|
|
113
|
-
|
|
114
|
-
const clickAction = (e) => {
|
|
115
|
-
// attrs?.onClick?.(e) // 如果配置中有点击事件
|
|
116
|
-
const actionKey = props.config?.clickActionKey || props.config?.buttonActionKey || props.config?.hireRelat
|
|
117
|
-
const actionFn = buttonActions[actionKey]
|
|
118
|
-
actionFn && actionFn(props, {
|
|
119
|
-
dynamicMapComp,
|
|
120
|
-
hireRelatMapRules,
|
|
121
|
-
components,
|
|
122
|
-
selects,
|
|
123
|
-
rootValue,
|
|
124
|
-
dataLoad,
|
|
125
|
-
rootForm
|
|
126
|
-
}, appContext)
|
|
127
|
-
}
|
|
128
|
-
function getSuffixIcon() {
|
|
129
|
-
if (props.suffixIcon && !props.disabled) {
|
|
130
|
-
const iconProps = {
|
|
131
|
-
color: '#a8abb2',
|
|
132
|
-
size: 14
|
|
133
|
-
}
|
|
134
|
-
let suffixIcon = props.suffixIcon
|
|
135
|
-
if (typeof suffixIcon === 'string') {
|
|
136
|
-
if (isPagePopup.value && suffixIcon == 'Search') {
|
|
137
|
-
iconProps.onClick = withModifiers(attrs.onClick, [
|
|
138
|
-
'stop'
|
|
139
|
-
]),
|
|
140
|
-
iconProps.style = {
|
|
141
|
-
cursor: 'pointer',
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
suffixIcon = resolveComponent(suffixIcon)
|
|
145
|
-
}
|
|
146
|
-
return (
|
|
147
|
-
<ElIcon {...iconProps}>
|
|
148
|
-
<suffixIcon></suffixIcon>
|
|
149
|
-
</ElIcon>
|
|
150
|
-
)
|
|
151
|
-
}
|
|
152
|
-
return null
|
|
153
|
-
}
|
|
154
|
-
function getWrap(node) {
|
|
155
|
-
if (props.needWrap == '1') {
|
|
156
|
-
return (
|
|
157
|
-
<div class={{
|
|
158
|
-
'resolver-custom-cust-input-wrap': true,
|
|
159
|
-
'resolver-custom-is-disabled': props.disabled
|
|
160
|
-
}}>
|
|
161
|
-
{ node }
|
|
162
|
-
{ getSuffixIcon() }
|
|
163
|
-
</div>
|
|
164
|
-
)
|
|
165
|
-
} else {
|
|
166
|
-
return node
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
function getSlots() {
|
|
170
|
-
return {
|
|
171
|
-
default: () => labelDesc.value,
|
|
172
|
-
...slots,
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return () => {
|
|
176
|
-
return generateTooltipWrap(getWrap(
|
|
177
|
-
<ElText {...{...attrs, ...elTextProps.value}} onClickCapture={withModifiers((e) => {clickAction(e)}, [ 'stop', 'self' ])} class={{cursor: props.isPointer == '1'}}>
|
|
178
|
-
{
|
|
179
|
-
getSlots()
|
|
180
|
-
}
|
|
181
|
-
</ElText>
|
|
182
|
-
), {
|
|
183
|
-
maintain: true,
|
|
184
|
-
})
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- <ElText v-bind="{...attrs, ...elTextProps}">{{ labelDesc }}</ElText> -->
|
|
3
|
-
<renderNode></renderNode>
|
|
4
|
-
</template>
|
|
5
|
-
<script setup>
|
|
6
|
-
import { ElText, ElIcon } from 'element-plus'
|
|
7
|
-
import { computed, defineProps, inject, getCurrentInstance, useAttrs, useSlots } from 'vue'
|
|
8
|
-
import { commonPropsType } from '../../utils/index.js'
|
|
9
|
-
import { h, resolveComponent, withModifiers } from 'vue'
|
|
10
|
-
|
|
11
|
-
defineOptions({
|
|
12
|
-
inheritAttrs: false
|
|
13
|
-
})
|
|
14
|
-
const slots = useSlots()
|
|
15
|
-
const lang = inject('lang')
|
|
16
|
-
const modelValue = defineModel()
|
|
17
|
-
const appContext = getCurrentInstance()?.appContext
|
|
18
|
-
const props = defineProps({
|
|
19
|
-
...commonPropsType,
|
|
20
|
-
...ElText.props,
|
|
21
|
-
fontSize: [String, Number],
|
|
22
|
-
needWrap: {
|
|
23
|
-
type: [String, Number],
|
|
24
|
-
default: '0'
|
|
25
|
-
},
|
|
26
|
-
suffixIcon: {
|
|
27
|
-
type: [String, Object],
|
|
28
|
-
default: ''
|
|
29
|
-
},
|
|
30
|
-
isPointer: {
|
|
31
|
-
type: [String, Number]
|
|
32
|
-
}
|
|
33
|
-
})
|
|
34
|
-
const isPagePopup = computed(() => {
|
|
35
|
-
return props.config?.lcpPagePopupMapVO
|
|
36
|
-
})
|
|
37
|
-
const attrs = useAttrs()
|
|
38
|
-
|
|
39
|
-
const normalVal = computed(() => {
|
|
40
|
-
let val = (modelValue.value !== null && modelValue.value !== undefined) ? modelValue.value : ''
|
|
41
|
-
if (typeof val === 'object') {
|
|
42
|
-
try {
|
|
43
|
-
val = JSON.stringify(val)
|
|
44
|
-
} catch (error) {
|
|
45
|
-
val = ''
|
|
46
|
-
}
|
|
47
|
-
} else if (typeof val === 'function') {
|
|
48
|
-
val = ''
|
|
49
|
-
}
|
|
50
|
-
const findItem = props?.options?.find(item => item.columnValue == val)
|
|
51
|
-
if (findItem) {
|
|
52
|
-
return lang?.value?.indexOf('zh') > -1 ? findItem.columnDesc_zh : findItem.columnDesc
|
|
53
|
-
}
|
|
54
|
-
return val
|
|
55
|
-
})
|
|
56
|
-
|
|
57
|
-
const elTextProps = computed(() => {
|
|
58
|
-
const result = Object.keys(ElText.props).reduce((ret, key) => {
|
|
59
|
-
ret[key] = props[key]
|
|
60
|
-
return ret
|
|
61
|
-
}, {})
|
|
62
|
-
return result
|
|
63
|
-
})
|
|
64
|
-
const buttonActions = inject('buttonActions', {})
|
|
65
|
-
|
|
66
|
-
const labelDesc = computed(() => {
|
|
67
|
-
return normalVal.value
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
const renderNode = computed(() => {
|
|
71
|
-
const textNode = h(ElText, {
|
|
72
|
-
...attrs,
|
|
73
|
-
...elTextProps.value,
|
|
74
|
-
onClick: withModifiers(() => {
|
|
75
|
-
clickAction()
|
|
76
|
-
}, [
|
|
77
|
-
'stop'
|
|
78
|
-
]),
|
|
79
|
-
class:{
|
|
80
|
-
cursor: props.isPointer == '1'
|
|
81
|
-
}
|
|
82
|
-
}, {
|
|
83
|
-
default: () => labelDesc.value,
|
|
84
|
-
...slots,
|
|
85
|
-
})
|
|
86
|
-
if (props.needWrap == '1') {
|
|
87
|
-
return h('div', {
|
|
88
|
-
class: {
|
|
89
|
-
'cust-input-wrap': true,
|
|
90
|
-
'is-disabled': props.disabled
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
}, [
|
|
94
|
-
textNode,
|
|
95
|
-
getSuffixIcon()
|
|
96
|
-
])
|
|
97
|
-
} else {
|
|
98
|
-
return textNode
|
|
99
|
-
}
|
|
100
|
-
})
|
|
101
|
-
|
|
102
|
-
const dynamicMapComp = inject('dynamicMapComp')
|
|
103
|
-
const hireRelatMapRules = inject('hireRelatMapRules')
|
|
104
|
-
const components = inject('components')
|
|
105
|
-
const selects = inject('selects')
|
|
106
|
-
const rootValue = inject('rootValue')
|
|
107
|
-
const dataLoad = inject('dataLoad')
|
|
108
|
-
const rootForm = inject('rootForm')
|
|
109
|
-
|
|
110
|
-
const clickAction = (e) => {
|
|
111
|
-
// attrs?.onClick?.(e) // 如果配置中有点击事件
|
|
112
|
-
const actionKey = props.config?.clickActionKey || props.config?.buttonActionKey || props.config?.hireRelat
|
|
113
|
-
const actionFn = buttonActions[actionKey]
|
|
114
|
-
actionFn && actionFn(props, {
|
|
115
|
-
dynamicMapComp,
|
|
116
|
-
hireRelatMapRules,
|
|
117
|
-
components,
|
|
118
|
-
selects,
|
|
119
|
-
rootValue,
|
|
120
|
-
dataLoad,
|
|
121
|
-
rootForm
|
|
122
|
-
}, appContext)
|
|
123
|
-
}
|
|
124
|
-
function getSuffixIcon() {
|
|
125
|
-
if (props.suffixIcon && !props.disabled) {
|
|
126
|
-
const iconProps = {
|
|
127
|
-
color: '#a8abb2',
|
|
128
|
-
size: 14
|
|
129
|
-
}
|
|
130
|
-
let suffixIcon = props.suffixIcon
|
|
131
|
-
if (typeof suffixIcon === 'string') {
|
|
132
|
-
if (isPagePopup.value && suffixIcon == 'Search') {
|
|
133
|
-
iconProps.onClick = withModifiers(attrs.onClick, [
|
|
134
|
-
'stop'
|
|
135
|
-
]),
|
|
136
|
-
iconProps.style = {
|
|
137
|
-
cursor: 'pointer',
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
suffixIcon = resolveComponent(suffixIcon)
|
|
141
|
-
}
|
|
142
|
-
return h(ElIcon, {
|
|
143
|
-
...iconProps
|
|
144
|
-
}, [h(suffixIcon)])
|
|
145
|
-
}
|
|
146
|
-
return null
|
|
147
|
-
}
|
|
148
|
-
</script>
|
|
149
|
-
<style lang="scss" scoped>
|
|
150
|
-
.cust-input-wrap {
|
|
151
|
-
display: flex;
|
|
152
|
-
width: 100%;
|
|
153
|
-
align-items: center;
|
|
154
|
-
min-height: 32px;
|
|
155
|
-
line-height: 24px;
|
|
156
|
-
padding: 1px 11px;
|
|
157
|
-
box-sizing: border-box;
|
|
158
|
-
border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
|
|
159
|
-
box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
|
|
160
|
-
background: var(--el-input-bg-color, var(--el-fill-color-blank));
|
|
161
|
-
cursor: 'not-allowed';
|
|
162
|
-
}
|
|
163
|
-
.is-disabled {
|
|
164
|
-
background: var(--el-disabled-bg-color);
|
|
165
|
-
}
|
|
166
|
-
.cursor {
|
|
167
|
-
cursor: pointer;
|
|
168
|
-
}
|
|
169
|
-
</style>
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<ElTimePicker v-bind="calcProps" v-model="modeValue">
|
|
3
|
-
<template v-for="(_, key) in slots" :key="key" v-slot:[key]="scope">
|
|
4
|
-
<slot :name="key" v-bind="scope"></slot>
|
|
5
|
-
</template>
|
|
6
|
-
</ElTimePicker>
|
|
7
|
-
</template>
|
|
8
|
-
<script setup>
|
|
9
|
-
import { ElTimePicker } from "element-plus"
|
|
10
|
-
import { useAttrs, computed, useSlots } from "vue"
|
|
11
|
-
import { commonPropsType } from "../../utils/index.js"
|
|
12
|
-
|
|
13
|
-
const slots = useSlots()
|
|
14
|
-
const attrs = useAttrs()
|
|
15
|
-
const props = defineProps({
|
|
16
|
-
min: {
|
|
17
|
-
type: [Date, String],
|
|
18
|
-
default: null
|
|
19
|
-
},
|
|
20
|
-
max: {
|
|
21
|
-
type: [Date, String],
|
|
22
|
-
default: null
|
|
23
|
-
},
|
|
24
|
-
...ElTimePicker.props,
|
|
25
|
-
...commonPropsType
|
|
26
|
-
})
|
|
27
|
-
const calcProps = computed(() => {
|
|
28
|
-
const ret = Object.keys(ElTimePicker.props).reduce((ret, key) => {
|
|
29
|
-
ret[key] = props[key]
|
|
30
|
-
return ret
|
|
31
|
-
}, {...attrs})
|
|
32
|
-
|
|
33
|
-
delete ret.modelValue
|
|
34
|
-
delete ret.defaultValue
|
|
35
|
-
return ret
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
const modeValue = defineModel()
|
|
39
|
-
</script>
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
let composeKeys = null
|
|
2
|
-
let composeComponents = null
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
if (!composeComponents || !composeKeys) {
|
|
6
|
-
let modulesFiles = {}
|
|
7
|
-
let modulesFilesKeys = []
|
|
8
|
-
let resolveModule = null
|
|
9
|
-
try {
|
|
10
|
-
if (require) {
|
|
11
|
-
modulesFiles = require.context('./packages-H5', false, /\.(vue|jsx|js)$/)
|
|
12
|
-
modulesFilesKeys = modulesFiles.keys() || []
|
|
13
|
-
resolveModule = (modulePath) => {
|
|
14
|
-
return modulesFiles(modulePath)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
} catch (error) {
|
|
18
|
-
modulesFiles = import.meta.glob('./packages-H5/*.{vue,jsx,js}', { import: 'default', eager: true })
|
|
19
|
-
modulesFilesKeys = Object.keys(modulesFiles)
|
|
20
|
-
resolveModule = (modulePath) => {
|
|
21
|
-
return modulesFiles[modulePath]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const keys = modulesFilesKeys.map(modulePath => modulePath.replace(/(.*\/)*([^.]+).*/ig,"$2"))
|
|
26
|
-
const components = modulesFilesKeys.reduce((retObj, modulePath) => {
|
|
27
|
-
const moduleName = modulePath.replace(/(.*\/)*([^.]+).*/ig,"$2")
|
|
28
|
-
const value = resolveModule(modulePath)
|
|
29
|
-
retObj[moduleName] = value.default || value
|
|
30
|
-
return retObj
|
|
31
|
-
}, {})
|
|
32
|
-
|
|
33
|
-
composeKeys = [
|
|
34
|
-
// ...dynamicKeys,
|
|
35
|
-
...keys
|
|
36
|
-
]
|
|
37
|
-
composeComponents = {
|
|
38
|
-
// ...dynamicComponents,
|
|
39
|
-
...components
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
composeKeys,
|
|
44
|
-
composeComponents
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
let composeKeys = null
|
|
2
|
-
let composeComponents = null
|
|
3
|
-
|
|
4
|
-
export default function () {
|
|
5
|
-
if (!composeComponents || !composeKeys) {
|
|
6
|
-
let modulesFiles = {}
|
|
7
|
-
let modulesFilesKeys = []
|
|
8
|
-
let resolveModule = null
|
|
9
|
-
try {
|
|
10
|
-
if (require) {
|
|
11
|
-
modulesFiles = require.context('./packages-web', false, /\.(vue|jsx|js)$/)
|
|
12
|
-
modulesFilesKeys = modulesFiles.keys() || []
|
|
13
|
-
resolveModule = (modulePath) => {
|
|
14
|
-
return modulesFiles(modulePath)
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
} catch (error) {
|
|
18
|
-
modulesFiles = import.meta.glob('./packages-web/*.{vue,jsx,js}', { eager: true })
|
|
19
|
-
modulesFilesKeys = Object.keys(modulesFiles)
|
|
20
|
-
resolveModule = (modulePath) => {
|
|
21
|
-
return modulesFiles[modulePath]
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const keys = modulesFilesKeys.map(modulePath => modulePath.replace(/(.*\/)*([^.]+).*/ig,"$2"))
|
|
26
|
-
const components = modulesFilesKeys.reduce((retObj, modulePath) => {
|
|
27
|
-
const moduleName = modulePath.replace(/(.*\/)*([^.]+).*/ig,"$2")
|
|
28
|
-
const value = resolveModule(modulePath)
|
|
29
|
-
retObj[moduleName] = value.default || value
|
|
30
|
-
return retObj
|
|
31
|
-
}, {})
|
|
32
|
-
|
|
33
|
-
composeKeys = [
|
|
34
|
-
// ...dynamicKeys,
|
|
35
|
-
...keys
|
|
36
|
-
]
|
|
37
|
-
composeComponents = {
|
|
38
|
-
// ...dynamicComponents,
|
|
39
|
-
...components
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return {
|
|
43
|
-
composeKeys,
|
|
44
|
-
composeComponents
|
|
45
|
-
}
|
|
46
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as default} from './src/index.vue'
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed, inject, useAttrs } from 'vue';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
defineOptions({
|
|
6
|
-
inheritAttrs: false,
|
|
7
|
-
name: 'SimpleFormItemPc'
|
|
8
|
-
})
|
|
9
|
-
|
|
10
|
-
const attrs = useAttrs()
|
|
11
|
-
const props = defineProps({
|
|
12
|
-
label: String,
|
|
13
|
-
labelWidth: [String, Number],
|
|
14
|
-
labelPosition: String,
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const formContextKey = inject('_formContextKey')
|
|
18
|
-
const formContext = inject(formContextKey, undefined)
|
|
19
|
-
|
|
20
|
-
const labelStyle = computed(() => {
|
|
21
|
-
if (formContext?.labelPosition === 'top' || props?.labelPosition === 'top') {
|
|
22
|
-
return {}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
const labelWidth = props.labelWidth || formContext?.labelWidth || ''
|
|
26
|
-
if (labelWidth) return { width: `${parseInt(labelWidth)}px` }
|
|
27
|
-
return {}
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
const formItemClass = computed(() => {
|
|
31
|
-
const clas = attrs.class
|
|
32
|
-
return [
|
|
33
|
-
clas || '',
|
|
34
|
-
{
|
|
35
|
-
[`label-position__${props.labelPosition || 'right'}`]: true
|
|
36
|
-
}
|
|
37
|
-
]
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
</script>
|
|
41
|
-
<template>
|
|
42
|
-
<div class="simple-form-item el-form-item" :class="formItemClass" :style="attrs.style">
|
|
43
|
-
<label class="simple-form-item-label el-form-item__label" :style="labelStyle">
|
|
44
|
-
<slot name="label"></slot>
|
|
45
|
-
</label>
|
|
46
|
-
<div class="simple-form-item-content el-form-item__content">
|
|
47
|
-
<slot></slot>
|
|
48
|
-
</div>
|
|
49
|
-
</div>
|
|
50
|
-
</template>
|
|
51
|
-
|
|
52
|
-
<style lang="scss">
|
|
53
|
-
.simple-form-item {
|
|
54
|
-
display: flex;
|
|
55
|
-
margin-bottom: var(--prmary-marign);
|
|
56
|
-
margin-right: var(--prmary-marign);
|
|
57
|
-
.simple-form-item-label {
|
|
58
|
-
flex: 0 0 auto;
|
|
59
|
-
display: flex;
|
|
60
|
-
font-size: var(--el-form-label-font-size);
|
|
61
|
-
color: var(--el-text-color-regular);
|
|
62
|
-
height: 32px;
|
|
63
|
-
line-height: 32px;
|
|
64
|
-
padding: 0 12px 0 0;
|
|
65
|
-
align-items: center;
|
|
66
|
-
box-sizing: content-box;
|
|
67
|
-
max-width: 100%;
|
|
68
|
-
}
|
|
69
|
-
.simple-form-item-content {
|
|
70
|
-
align-items: center;
|
|
71
|
-
display: flex;
|
|
72
|
-
flex: 1;
|
|
73
|
-
flex-wrap: wrap;
|
|
74
|
-
line-height: 32px;
|
|
75
|
-
min-width: 0;
|
|
76
|
-
position: relative;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
.label-position__left {
|
|
80
|
-
.simple-form-item-label {
|
|
81
|
-
justify-content: flex-start;
|
|
82
|
-
text-align: left;
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
.label-position__right {
|
|
86
|
-
.simple-form-item-label {
|
|
87
|
-
justify-content: flex-end;
|
|
88
|
-
text-align: right;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
.label-position__top {
|
|
92
|
-
display: block;
|
|
93
|
-
}
|
|
94
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { withInstall, withNoopInstall } from 'element-plus/es/utils/index.mjs'
|
|
2
|
-
import Table from './src/table.vue'
|
|
3
|
-
import TableColumn from './src/tableColumn'
|
|
4
|
-
|
|
5
|
-
export const ElTable = withInstall(Table, {
|
|
6
|
-
TableColumn,
|
|
7
|
-
})
|
|
8
|
-
export default ElTable
|
|
9
|
-
export const ElTableColumn = withNoopInstall(TableColumn)
|
|
10
|
-
|
|
11
|
-
export type TableInstance = InstanceType<typeof Table>
|
|
12
|
-
|
|
13
|
-
export type TableColumnInstance = InstanceType<typeof TableColumn>
|
|
14
|
-
|
|
15
|
-
export type {
|
|
16
|
-
SummaryMethod,
|
|
17
|
-
Table,
|
|
18
|
-
TableProps,
|
|
19
|
-
TableRefs,
|
|
20
|
-
ColumnCls,
|
|
21
|
-
ColumnStyle,
|
|
22
|
-
CellCls,
|
|
23
|
-
CellStyle,
|
|
24
|
-
TreeNode,
|
|
25
|
-
RenderRowData,
|
|
26
|
-
Sort,
|
|
27
|
-
Filter,
|
|
28
|
-
TableColumnCtx,
|
|
29
|
-
} from './src/table/defaults'
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { ref } from 'vue'
|
|
2
|
-
import { isNumber } from 'element-plus/es/utils/index.mjs'
|
|
3
|
-
|
|
4
|
-
export const useScrollbar = () => {
|
|
5
|
-
const scrollBarRef = ref()
|
|
6
|
-
|
|
7
|
-
const scrollTo = (options: ScrollToOptions | number, yCoord?: number) => {
|
|
8
|
-
const scrollbar = scrollBarRef.value
|
|
9
|
-
if (scrollbar) {
|
|
10
|
-
scrollbar.scrollTo(options, yCoord)
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const setScrollPosition = (position: 'Top' | 'Left', offset?: number) => {
|
|
15
|
-
const scrollbar = scrollBarRef.value
|
|
16
|
-
if (scrollbar && isNumber(offset) && ['Top', 'Left'].includes(position)) {
|
|
17
|
-
scrollbar[`setScroll${position}`](offset)
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const setScrollTop = (top?: number) => setScrollPosition('Top', top)
|
|
22
|
-
const setScrollLeft = (left?: number) => setScrollPosition('Left', left)
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
scrollBarRef,
|
|
26
|
-
scrollTo,
|
|
27
|
-
setScrollTop,
|
|
28
|
-
setScrollLeft,
|
|
29
|
-
}
|
|
30
|
-
}
|