resolver-egretimp-plus 0.0.257 → 0.0.259

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.0.257",
3
+ "version": "0.0.259",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -20,7 +20,7 @@ const props = defineProps({
20
20
  loadingcolor: String,
21
21
  })
22
22
  const calcPorps = computed(() => {
23
- return ['displayType', 'widgetSize', 'plain', 'color', 'loading', 'loadtype', 'loadingcolor'].reduce((ret, key) => {
23
+ return ['displayType', 'widgetSize', 'plain', 'color', 'loading', 'loadtype', 'loadingcolor', 'disabled'].reduce((ret, key) => {
24
24
  if (['plain', 'loading', 'loadtype'].includes(key)) {
25
25
  ret[key] = props[key] === '1' ? true : false
26
26
  } else if (key === 'displayType') {
@@ -117,10 +117,24 @@ watch(() => {
117
117
  immediate: true
118
118
  })
119
119
 
120
+ const inputProps = computed(() => {
121
+ return {
122
+ placeholder: lang?.value?.indexOf('zh') > -1 ? props.config?.defPlacehold : props.config?.defPlaceholdEn,
123
+ disabled: props.disabled
124
+ }
125
+ })
126
+
127
+ const onFocus = (e) => {
128
+ open.value = true
129
+ e.preventDefault()
130
+ e.stopPropagation()
131
+ e.target.blur()
132
+ }
133
+
120
134
  </script>
121
135
 
122
136
  <template>
123
- <cmi-input v-if="!calcProps.tiled" :value="valueDesc" suffixIcon @focus="open = true">
137
+ <cmi-input v-if="!calcProps.tiled" :value="valueDesc" suffixIcon @focus="onFocus" v-bind="{...attrs, ...inputProps}">
124
138
  <div slot="suffix-icon" v-if="suffixIcon">
125
139
  <component :is="`cmi-icon-${suffixIcon}`" color="#4E5969"></component>
126
140
  </div>
@@ -64,10 +64,24 @@ const onConfirm = (e) => {
64
64
  open.value = false
65
65
  }
66
66
 
67
+ const inputProps = computed(() => {
68
+ return {
69
+ placeholder: lang?.value?.indexOf('zh') > -1 ? props.config?.defPlacehold : props.config?.defPlaceholdEn,
70
+ disabled: props.disabled
71
+ }
72
+ })
73
+
74
+ const onFocus = (e) => {
75
+ open.value = true
76
+ e.preventDefault()
77
+ e.stopPropagation()
78
+ e.target.blur()
79
+ }
80
+
67
81
  </script>
68
82
 
69
83
  <template>
70
- <cmi-input :value="formatValue" suffixIcon @focus="open = true">
84
+ <cmi-input :value="formatValue" suffixIcon @focus="onFocus" v-bind="{...attrs, ...inputProps}">
71
85
  <div slot="suffix-icon" v-if="suffixIcon">
72
86
  <component :is="`cmi-icon-${suffixIcon}`" color="#4E5969"></component>
73
87
  </div>
@@ -32,6 +32,7 @@ const getItemValue = (idx) => {
32
32
  const getDropdownItemProps = (config, idx) => {
33
33
  return {
34
34
  value: getItemValue(idx),
35
+ disabled: props.disabled,
35
36
  title: config?.label,
36
37
  activetype: props.config?.activetype,
37
38
  options: ((selects?.value && selects?.value?.[config?.selectKey]) || []).map(option => {
@@ -105,7 +105,8 @@ const modelvalDesc = computed(() => {
105
105
 
106
106
  const inputProps = computed(() => {
107
107
  return {
108
- placeholder: lang?.value?.indexOf('zh') > -1 ? props.config?.defPlacehold : props.config?.defPlaceholdEn
108
+ placeholder: lang?.value?.indexOf('zh') > -1 ? props.config?.defPlacehold : props.config?.defPlaceholdEn,
109
+ disabled: props.disabled
109
110
  }
110
111
  })
111
112
 
@@ -22,7 +22,7 @@ const onChange = (e) => {
22
22
  <cmi-radio-group :value="modelValue" v-bind="{ ...attrs, ...calcProps}" @change="onChange">
23
23
  <cmi-radio
24
24
  v-for="option in props.options" :key="option.columnValue"
25
- :disabled="option.columnStatus == '0' || option.columnStatus == '2'"
25
+ :disabled="props.disabled || option.columnStatus == '0' || option.columnStatus == '2'"
26
26
  :name="option.columnValue" :label="lang.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc"
27
27
  />
28
28
  </cmi-radio-group>
@@ -1,12 +1,11 @@
1
1
  <template>
2
- <ElText v-bind="{...attrs, ...elRowProps,}" @click="clickAction" >
3
- {{ labelDesc }}
4
- </ElText>
2
+ <renderNode></renderNode>
5
3
  </template>
6
4
  <script setup>
7
5
  import { ElText } from 'element-plus'
8
6
  import { computed, defineProps, inject, getCurrentInstance, useAttrs } from 'vue'
9
7
  import { commonPropsType } from '../../utils/index.js'
8
+ import { h } from 'vue'
10
9
 
11
10
  const lang = inject('lang')
12
11
  const modelValue = defineModel()
@@ -14,7 +13,11 @@ const appContext = getCurrentInstance()?.appContext
14
13
  const props = defineProps({
15
14
  ...commonPropsType,
16
15
  ...ElText.props,
17
- fontSize: [String, Number]
16
+ fontSize: [String, Number],
17
+ needWrap: {
18
+ type: [String, Number],
19
+ default: '0'
20
+ },
18
21
  })
19
22
  const attrs = useAttrs()
20
23
 
@@ -38,6 +41,23 @@ const buttonActions = inject('buttonActions', {})
38
41
  const labelDesc = computed(() => {
39
42
  return normalVal.value
40
43
  })
44
+ const renderNode = computed(() => {
45
+ const textNode = h(ElText, {
46
+ ...attrs,
47
+ ...elRowProps.value,
48
+ onClick: () => {
49
+ clickAction()
50
+ }
51
+ }, labelDesc.value)
52
+ if (props.needWrap == '1') {
53
+ return h('div', {
54
+ class: 'cust-input-wrap',
55
+ }, [textNode])
56
+ } else {
57
+ return textNode
58
+ }
59
+ })
60
+
41
61
  const dynamicMapComp = inject('dynamicMapComp')
42
62
  const hireRelatMapRules = inject('hireRelatMapRules')
43
63
  const components = inject('components')
@@ -61,3 +81,19 @@ const clickAction = (e) => {
61
81
  }, appContext)
62
82
  }
63
83
  </script>
84
+ <style lang="scss" scoped>
85
+ .cust-input-wrap {
86
+ display: flex;
87
+ width: 100%;
88
+ align-items: center;
89
+ justify-content: space-between;
90
+ min-height: 32px;
91
+ line-height: 24px;
92
+ padding: 1px 11px;
93
+ box-sizing: border-box;
94
+ border-radius: var(--el-input-border-radius, var(--el-border-radius-base));
95
+ box-shadow: 0 0 0 1px var(--el-input-border-color, var(--el-border-color)) inset;
96
+ background: var(--el-disabled-bg-color);
97
+ cursor: 'not-allowed';
98
+ }
99
+ </style>
@@ -54,17 +54,17 @@ getPageConfig({
54
54
  },
55
55
  selectsCb: (selects) => {
56
56
  // 配置数据加载完成事件 'loadedConfigCompeted'
57
- attrs?.onLoadedSelectsCompeted?.(selects)
57
+ Object.keys(selects || {}).forEach(key => {
58
+ props.selects[key] = selects[key]
59
+ })
60
+ attrs?.onLoadedSelectsCompeted?.(props.selects)
58
61
  },
59
62
  selectPolyReq: {
60
63
  ...(props.builtPolyfillReq || {}),
61
64
  }
62
65
  })
63
66
  const allSelects = computed(() => {
64
- return {
65
- ...props.selects,
66
- ...selects.value
67
- }
67
+ return props.selects
68
68
  })
69
69
 
70
70
  const resolverRef = ref(null)
@@ -37,7 +37,7 @@ export const NOT_NEED_FORM_ITEM_META_TYPE = [
37
37
  'cmi-divider'
38
38
  ]
39
39
  export const EXECTE_CLICK_EVENT_COMPONENTS = ['ElInput', 'ElButton', 'CmiInput', 'CmiButton']
40
- export const TRANS_CELL_COMPONETS = ['CmiInput', 'CmiSelect']
40
+ export const TRANS_CELL_COMPONETS = ['CmiInput', 'CmiSelect', 'CmiPicker']
41
41
  export const NOT_NEED_COL_ITEM_META_TYPE = ['CustomComponentTabPane', 'CustomComponentDialog', 'CustomComponentCol', 'CustomComponentTabPaneH5']
42
42
  export const MULTI_PAGE_META_LIST_TYPES = ['CustomComponentTable']
43
43
  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']
@@ -981,7 +981,7 @@ function isTransCellMobile(config, disabled) {
981
981
  }
982
982
 
983
983
  function isHidden({config}) {
984
- return (typeof config.hidden === 'boolean' && config.hidden) || config.hidden === '1' || config.collapseHidden == '1'
984
+ return (typeof config.hidden === 'boolean' && config.hidden) || config.hidden == '1' || config.collapseHidden == '1'
985
985
  }
986
986
  // 如果父级有一个是hidden了,那就表示hidden了
987
987
  function isChainHidden({config}) {