resolver-egretimp-plus 0.0.87 → 0.0.89

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.87",
3
+ "version": "0.0.89",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -16,6 +16,7 @@ module.exports = {
16
16
  path: path.resolve(__dirname, '../dist'),
17
17
  filename: '[name]/index.js'
18
18
  },
19
+ devtool: 'inline-source-map',
19
20
  module: {
20
21
  rules: [
21
22
  {
@@ -29,7 +29,7 @@ const tableProps = computed(() => {
29
29
  })
30
30
  const page = reactive({
31
31
  pageNum: 1,
32
- pageSize: 3,
32
+ pageSize: props.config?.pageSize || 3,
33
33
  total: 0,
34
34
  })
35
35
 
@@ -50,6 +50,12 @@ const checkboxProps = computed(() => {
50
50
  return ret
51
51
  })
52
52
  const attrs = useAttrs()
53
+
54
+ // 值是list 还是,连起来的string
55
+ const isStrVal = computed(() => {
56
+ // valueType 值为 list 或者 string
57
+ return props.config?.valueType !== 'list'
58
+ })
53
59
  // 是否为多选
54
60
  const isMutiple = computed(() => {
55
61
  return props.options && props.options.length
@@ -60,14 +66,14 @@ const proxyValue = computed({
60
66
  get() {
61
67
  if (isMutiple.value) {
62
68
  const val = modelValue.value || ''
63
- return val ? val.split(',') : []
69
+ return val ? (isStrVal.value ? val.split(',') : val) : []
64
70
  } else {
65
71
  return modelValue.value
66
72
  }
67
73
  },
68
74
  set(val) {
69
75
  if (isMutiple.value) {
70
- modelValue.value = val.join(',')
76
+ modelValue.value = isStrVal.value ? val.join(',') : val
71
77
  } else {
72
78
  modelValue.value = val
73
79
  }
@@ -1,5 +1,4 @@
1
1
  <template>
2
-
3
2
  <ElSelect class="custom-self-select" v-bind="{...attrs, ...selectProps }" v-model="value" @clear="clear">
4
3
  <ElOption v-for="option in props.options"
5
4
  :key="option.columnValue"
@@ -21,11 +20,22 @@ const props = defineProps({
21
20
  })
22
21
  const attrs = useAttrs()
23
22
 
23
+ // 值是list 还是,连起来的string
24
+ const isStrVal = computed(() => {
25
+ // valueType 值为 list 或者 string
26
+ return props.config?.valueType !== 'list'
27
+ })
28
+ // 是否为多选
29
+ const isMutiple = computed(() => {
30
+ return props.multiple == '1'
31
+ })
32
+
33
+
24
34
  const value = computed({
25
35
  get() {
26
36
  if (isMutiple.value) {
27
37
  const val = modelValue.value || ''
28
- return val ? val.split(',') : []
38
+ return val ? (isStrVal.value ? val.split(',') : val) : []
29
39
  } else {
30
40
  if (modelValue.value !== null && modelValue.value !== undefined) {
31
41
  if (props.options?.some(item => item.columnValue == modelValue.value)) {
@@ -42,16 +52,12 @@ const value = computed({
42
52
  },
43
53
  set(val) {
44
54
  if (isMutiple.value) {
45
- modelValue.value = val.join(',')
55
+ modelValue.value = isStrVal.value ? val.join(',') : val
46
56
  } else {
47
57
  modelValue.value = val
48
58
  }
49
59
  }
50
60
  })
51
- // 是否为多选
52
- const isMutiple = computed(() => {
53
- return props.multiple == '1'
54
- })
55
61
 
56
62
  const selectProps = computed(() => {
57
63
  const attrs = Object.keys(ElSelect.props).reduce((ret, key) => {
@@ -223,7 +223,9 @@ const allInitEvents = {
223
223
  // const oldDisplayType = labelInfo && labelInfo.displayType
224
224
  // oldDisplayTypes.push(oldDisplayType)
225
225
  labelInfo && (labelInfo.displayType = '1')
226
+ labelInfo && (labelInfo.hidden = '0')
226
227
  labelInfo && labelInfo.refConfig && (labelInfo.refConfig.displayType = '1')
228
+ labelInfo && labelInfo.refConfig && (labelInfo.refConfig.hidden = '0')
227
229
  })
228
230
  // 有的事件在不满足条件的情况下,需要进行恢复
229
231
  return () => {
@@ -236,7 +238,9 @@ const allInitEvents = {
236
238
  configs.forEach((labelInfo, idx) => {
237
239
  // const oldDisplayType = oldDisplayTypes[idx]
238
240
  labelInfo && (labelInfo.displayType = '0')
241
+ labelInfo && (labelInfo.hidden = '1')
239
242
  labelInfo && labelInfo.refConfig && (labelInfo.refConfig.displayType = '0')
243
+ labelInfo && labelInfo.refConfig && (labelInfo.refConfig.hidden = '1')
240
244
  })
241
245
  }, 0)
242
246
  }