resolver-egretimp-plus 0.0.258 → 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.258",
3
+ "version": "0.0.259",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -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)