resolver-egretimp-plus 0.0.47 → 0.0.48

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.47",
3
+ "version": "0.0.48",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -1,6 +1,6 @@
1
1
  export async function executeLoadServices(services = [], { axiosInstance, messageInstance, reqData, respCb }) {
2
2
  const loadServices = services.filter(ser => ser.eventType == '1')
3
- // const mixinServiceConfig = services.find(service => service.serviceType === '1')
3
+ const mixinServiceConfig = services.find(service => service.serviceType === '1')
4
4
 
5
5
  for (let i = 0; i < loadServices.length; i++) {
6
6
  const service = loadServices[i]
@@ -13,7 +13,7 @@ export async function executeLoadServices(services = [], { axiosInstance, messag
13
13
  busiIdentityId: service.busiIdentityId,
14
14
  pageMetaId: service.pageMetaId,
15
15
  tenantId: service.tenantId,
16
- // mainServiceCode: mixinServiceConfig?.mainServiceCode, // 提交按钮绑定上绑定的融合服务编码
16
+ mainServiceCode: mixinServiceConfig?.mainServiceCode, // 提交按钮绑定上绑定的融合服务编码
17
17
  },
18
18
  ...(reqData || {})
19
19
  }
@@ -1,7 +1,6 @@
1
1
  <template>
2
- <ElCheckboxGroup v-model="modeValue" v-if="props.options && props.options.length" v-bind="{...checkboxGroupProps, ...attrs}">
2
+ <ElCheckboxGroup v-if="isMutiple" v-bind="{...checkboxGroupProps, ...attrs}" v-model="proxyValue" >
3
3
  <ElCheckbox
4
- v-bind="{...checkboxProps }"
5
4
  v-for="option in props.options"
6
5
  :key="option.columnValue"
7
6
  :value="option.columnValue"
@@ -9,13 +8,13 @@
9
8
  {{lang.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}}
10
9
  </ElCheckbox>
11
10
  </ElCheckboxGroup>
12
- <ElCheckbox v-else v-bind="{...checkboxProps, ...attrs}" v-model="modeValue">
11
+ <ElCheckbox v-else v-bind="{...checkboxProps, ...attrs}" v-model="proxyValue">
13
12
  {{ label }}
14
13
  </ElCheckbox>
15
14
  </template>
16
15
  <script setup>
17
16
  import { ElCheckbox, ElCheckboxGroup } from 'element-plus'
18
- import { useAttrs, computed, inject } from 'vue'
17
+ import { useAttrs, computed, inject, ref } from 'vue'
19
18
  import { commonPropsType, hasOwn } from '../../utils/index.js'
20
19
 
21
20
  const props = defineProps({
@@ -51,5 +50,27 @@ const checkboxProps = computed(() => {
51
50
  return ret
52
51
  })
53
52
  const attrs = useAttrs()
54
- const modeValue = defineModel()
53
+ // 是否为多选
54
+ const isMutiple = computed(() => {
55
+ return props.options && props.options.length
56
+ })
57
+ const modelValue = defineModel()
58
+
59
+ const proxyValue = computed({
60
+ get() {
61
+ if (isMutiple.value) {
62
+ const val = modelValue.value || ''
63
+ return val ? val.split(',') : []
64
+ } else {
65
+ return modelValue.value
66
+ }
67
+ },
68
+ set(val) {
69
+ if (isMutiple.value) {
70
+ modelValue.value = val.join(',')
71
+ } else {
72
+ modelValue.value = val
73
+ }
74
+ }
75
+ })
55
76
  </script>
@@ -1,6 +1,6 @@
1
1
  <script setup>
2
2
  import getNativeComps from './components/patchComponents-H5.js'
3
- import { useAttrs } from 'vue';
3
+ import { computed, ref, useAttrs } from 'vue';
4
4
  import Resolver from './resolver-common.vue'
5
5
  import CmiToast from "cmid/lib/toast"
6
6
  import CmiFullLoading from "cmid/lib/fullloading"
@@ -36,9 +36,31 @@ defineOptions({
36
36
  })
37
37
  const attrs = useAttrs()
38
38
 
39
+ const resolverRef = ref(null)
40
+ defineExpose({
41
+ dynamicMapComp: computed({
42
+ get() {
43
+ return resolverRef.value?.dynamicMapComp
44
+ }
45
+ }),
46
+ validate(...arg) {
47
+ return resolverRef.value?.validate(...arg)
48
+ },
49
+ pageConfig: computed({
50
+ get() {
51
+ return resolverRef.value?.pageConfig
52
+ }
53
+ }),
54
+ rootForm: computed({
55
+ get() {
56
+ return resolverRef.value?.rootForm
57
+ }
58
+ }),
59
+ })
39
60
  </script>
40
61
  <template>
41
62
  <Resolver
63
+ ref="resolverRef"
42
64
  v-bind="attrs"
43
65
  :isH5="true" :getNativeComps="getNativeComps"
44
66
  :messageInstance="props.messageInstance"
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { computed, useAttrs } from 'vue';
2
+ import { computed, ref, useAttrs } from 'vue';
3
3
  import Resolver from './index.jsx'
4
4
  import { useBuildInData } from './hooks/pageConfig';
5
5
  import { initInterceptors } from './utils/request.js';
@@ -43,7 +43,29 @@ const allSelects = computed(() => {
43
43
  ...selects.value
44
44
  }
45
45
  })
46
+
47
+ const resolverRef = ref(null)
48
+ defineExpose({
49
+ dynamicMapComp: computed({
50
+ get() {
51
+ return resolverRef.value?.dynamicMapComp
52
+ }
53
+ }),
54
+ validate(...arg) {
55
+ return resolverRef.value?.validate(...arg)
56
+ },
57
+ pageConfig: computed({
58
+ get() {
59
+ return resolverRef.value?.pageConfig
60
+ }
61
+ }),
62
+ rootForm: computed({
63
+ get() {
64
+ return resolverRef.value?.rootForm
65
+ }
66
+ }),
67
+ })
46
68
  </script>
47
69
  <template>
48
- <Resolver v-bind="attrs" :loadingInstance="props.loadingInstance" :messageInstance="props.messageInstance" :getNativeComps="props.getNativeComps" :config="pageConfig || null" :selects="allSelects"></Resolver>
70
+ <Resolver ref="resolverRef" v-bind="attrs" :loadingInstance="props.loadingInstance" :messageInstance="props.messageInstance" :getNativeComps="props.getNativeComps" :config="pageConfig || null" :selects="allSelects"></Resolver>
49
71
  </template>
@@ -2,7 +2,7 @@
2
2
  import getNativeComps from './components/patchComponents-web'
3
3
  import { ElMessage, ElMessageBox } from "element-plus"
4
4
  import { loadingInstance } from './components/loading'
5
- import { useAttrs } from 'vue';
5
+ import { computed, ref, useAttrs } from 'vue';
6
6
  import Resolver from './resolver-common.vue'
7
7
  import { openChildDialog } from './components/childDialog';
8
8
 
@@ -35,9 +35,31 @@ defineOptions({
35
35
  })
36
36
  const attrs = useAttrs()
37
37
 
38
+ const resolverRef = ref(null)
39
+ defineExpose({
40
+ dynamicMapComp: computed({
41
+ get() {
42
+ return resolverRef.value?.dynamicMapComp
43
+ }
44
+ }),
45
+ validate(...arg) {
46
+ return resolverRef.value?.validate(...arg)
47
+ },
48
+ pageConfig: computed({
49
+ get() {
50
+ return resolverRef.value?.pageConfig
51
+ }
52
+ }),
53
+ rootForm: computed({
54
+ get() {
55
+ return resolverRef.value?.rootForm
56
+ }
57
+ }),
58
+ })
38
59
  </script>
39
60
  <template>
40
61
  <Resolver
62
+ ref="resolverRef"
41
63
  v-bind="attrs"
42
64
  :getNativeComps="getNativeComps"
43
65
  :messageInstance="props.messageInstance"