resolver-egretimp-plus 0.0.81 → 0.0.83

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.81",
3
+ "version": "0.0.83",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -69,6 +69,14 @@ const dialogStyle = computed(() => {
69
69
  return {color: 'red', 'height': dialogHeight}
70
70
  })
71
71
 
72
+ const dialogProps = computed(() => {
73
+ const ret = Object.keys(ElDialog.props).reduce((ret, key) => {
74
+ ret[key] = props.dialogProps[key]
75
+ return ret
76
+ }, {})
77
+ return ret
78
+ })
79
+
72
80
  function loadedConfigCompeted(pageConfig) {
73
81
  rootOptionComp.value = pageConfig.rootOptionComp
74
82
  }
@@ -89,9 +97,12 @@ defineExpose({
89
97
  </script>
90
98
  <template>
91
99
  <ElConfigProvider :locale="locale">
92
- <ElDialog class="open-child-frame" v-model="dialogVisible"
100
+ <ElDialog class="open-child-frame"
101
+ :close-on-click-modal="false"
102
+ :width="dialogWidth"
103
+ v-bind="dialogProps"
104
+ v-model="dialogVisible"
93
105
  :style="dialogStyle"
94
- :close-on-click-modal="false" :width="dialogWidth"
95
106
  >
96
107
  <div>
97
108
  </div>
@@ -90,7 +90,7 @@ export async function dispatchClickEvent(service, { dynamicMapComp, requestTrace
90
90
  const ret = await (axiosInstance && axiosInstance(reqConfig))
91
91
  afterRequestService && afterRequestService(ret)
92
92
 
93
- if (!resultToast(ret?.data, messageInstance, {messageCb, service, compConfig, noSuccessIip: httpMethod.toLocaleLowerCase() === 'get'})) {
93
+ if (!resultToast(ret?.data, messageInstance, {messageCb, service, compConfig, noSuccessIip: httpMethod.toLocaleLowerCase() === 'get' || service.transactionType == '1'})) {
94
94
  await Promise.reject()
95
95
  return
96
96
  }
@@ -11,6 +11,10 @@ const lang = inject('lang')
11
11
  const label = computed(() => {
12
12
  return lang.value.indexOf('zh') > -1 ? (props.config?.labelZh || props.config?.metaNameZh) : (props.config?.labelEn || props.config?.metaNameEn)
13
13
  })
14
+ // 是否为多选
15
+ const isMutiple = computed(() => {
16
+ return props.options && props.options.length
17
+ })
14
18
 
15
19
  const checkboxGroupProps = computed(() => {
16
20
  return {
@@ -28,18 +32,36 @@ const checkboxProps = computed(() => {
28
32
  }
29
33
  })
30
34
  const attrs = useAttrs()
31
- const modeValue = defineModel()
35
+ const modelValue = defineModel()
36
+
37
+ const proxyValue = computed({
38
+ get() {
39
+ if (isMutiple.value) {
40
+ const val = modelValue.value || ''
41
+ return val ? val.split(',') : []
42
+ } else {
43
+ return modelValue.value
44
+ }
45
+ },
46
+ set(val) {
47
+ if (isMutiple.value) {
48
+ modelValue.value = val.join(',')
49
+ } else {
50
+ modelValue.value = val
51
+ }
52
+ }
53
+ })
32
54
 
33
55
  const onChange = ({ detail }) => {
34
- modeValue.value = detail.value
56
+ proxyValue.value = detail.value
35
57
  }
36
58
  const onSigleChange = ({ detail }) => {
37
- modeValue.value = detail.value ? '1' : '0'
59
+ proxyValue.value = detail.value ? '1' : '0'
38
60
  }
39
61
  </script>
40
62
 
41
63
  <template>
42
- <cmi-checkbox-group :value="modeValue" @change="onChange" v-if="props.options && props.options.length" v-bind="{...attrs, ...checkboxGroupProps}">
64
+ <cmi-checkbox-group :value="proxyValue" @change="onChange" v-if="isMutiple" v-bind="{...attrs, ...checkboxGroupProps}">
43
65
  <cmi-checkbox
44
66
  class="mr-20"
45
67
  v-for="option in props.options" :key="option.columnValue"
@@ -49,7 +71,7 @@ const onSigleChange = ({ detail }) => {
49
71
  {{lang.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}}
50
72
  </cmi-checkbox>
51
73
  </cmi-checkbox-group>
52
- <cmi-checkbox v-else v-bind="{...attrs, ...checkboxProps}" :checked="modeValue === '1'" :value="modeValue" @change="onSigleChange">
74
+ <cmi-checkbox v-else v-bind="{...attrs, ...checkboxProps}" :checked="proxyValue === '1'" :value="proxyValue" @change="onSigleChange">
53
75
  {{ label }}
54
76
  </cmi-checkbox>
55
77
  </template>
@@ -189,7 +189,7 @@ function normalTableRowValue(row) {
189
189
  >
190
190
  </cmi-table-column>
191
191
  </cmi-table>
192
- <div v-if="pageable && normalPageTotal > page.pageSize" :style="{'justify-content': pageAlignEnmu[pageAlign || PAGE_RIGHT]}" style="margin-bottom: 12px;">
192
+ <div v-if="pageable && normalPageTotal > 3" :style="{'justify-content': pageAlignEnmu[pageAlign || PAGE_RIGHT]}" style="margin-bottom: 12px;">
193
193
  <cmi-pagination
194
194
  :key="normalPageTotal"
195
195
  v-bind="{...paginationProps, ...pagenationEvents}"