resolver-egretimp-plus 0.0.253 → 0.0.254

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.253",
3
+ "version": "0.0.254",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <ElText v-bind="{...attrs, ...elRowProps,}" @click="clickAction" >
3
- {{props.refValue.value}}
3
+ {{ labelDesc }}
4
4
  </ElText>
5
5
  </template>
6
6
  <script setup>
@@ -8,6 +8,8 @@ import { ElText } from 'element-plus'
8
8
  import { computed, defineProps, inject, getCurrentInstance, useAttrs } from 'vue'
9
9
  import { commonPropsType } from '../../utils/index.js'
10
10
 
11
+ const lang = inject('lang')
12
+ const modelValue = defineModel()
11
13
  const appContext = getCurrentInstance()?.appContext
12
14
  const props = defineProps({
13
15
  ...commonPropsType,
@@ -16,6 +18,14 @@ const props = defineProps({
16
18
  })
17
19
  const attrs = useAttrs()
18
20
 
21
+ const normalVal = computed(() => {
22
+ const findItem = props?.options?.find(item => item.columnValue == modelValue.value)
23
+ if (findItem) {
24
+ return lang?.value?.indexOf('zh') > -1 ? findItem.columnDesc_zh : findItem.columnDesc
25
+ }
26
+ return modelValue.value
27
+ })
28
+
19
29
  const elRowProps = computed(() => {
20
30
  const result = Object.keys(ElText.props).reduce((ret, key) => {
21
31
  ret[key] = props[key]
@@ -25,6 +35,9 @@ const elRowProps = computed(() => {
25
35
  })
26
36
  const buttonActions = inject('buttonActions', {})
27
37
 
38
+ const labelDesc = computed(() => {
39
+ return normalVal.value
40
+ })
28
41
  const dynamicMapComp = inject('dynamicMapComp')
29
42
  const hireRelatMapRules = inject('hireRelatMapRules')
30
43
  const components = inject('components')