resolver-egretimp-plus 0.0.202 → 0.0.203

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.202",
3
+ "version": "0.0.203",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -29,9 +29,17 @@ const props = defineProps({
29
29
  placeholderEn: {
30
30
  type: String,
31
31
  default: ''
32
+ },
33
+ // 多选的分割符号
34
+ separator: {
35
+ type: [String],
36
+ default: ','
32
37
  }
33
38
  })
34
39
  const dataLoad = inject('dataLoad')
40
+ const separator = computed(() => {
41
+ return props.separator
42
+ })
35
43
  const metaCode = computed(() => {
36
44
  return props.config.dynamicHireRelat?.replace(/(\]|\[|(->))/g, '')
37
45
  // return `${props.config?.metaCode}-${props?.rowScope?.$index || ''}`
@@ -64,7 +72,7 @@ const initSelEmployee = async () => {
64
72
  if (!val) return
65
73
  await seelp(200)
66
74
  console.log('select-employees modelValue:', modelValue.value)
67
- const data = modelValue.value ? modelValue.value.split(',') : []
75
+ const data = modelValue.value ? modelValue.value.split(separator.value) : []
68
76
  const initParams = {
69
77
  el: `#${metaCode.value}`,
70
78
  data,
@@ -80,7 +88,7 @@ const initSelEmployee = async () => {
80
88
  // disabled: props.disabled,
81
89
  onSelectedChange: (data, arr) => {
82
90
  emit('change', data, arr, props)
83
- modelValue.value = data?.join(',') || ''
91
+ modelValue.value = data?.join(separator.value) || ''
84
92
  }
85
93
  }
86
94
  if (props.disabled) {
@@ -20,10 +20,17 @@ const props = defineProps({
20
20
  multiple: [String, Boolean],
21
21
  filterable: [String, Boolean],
22
22
  multipleLimit: [String, Number],
23
- rangeOptions: Array
23
+ rangeOptions: Array,
24
+ // 多选的分割符号
25
+ separator: {
26
+ type: [String],
27
+ default: ','
28
+ }
24
29
  })
25
30
  const attrs = useAttrs()
26
-
31
+ const separator = computed(() => {
32
+ return props.separator
33
+ })
27
34
  // 值是list 还是,连起来的string
28
35
  const isStrVal = computed(() => {
29
36
  // valueType 值为 list 或者 string
@@ -45,7 +52,7 @@ const value = computed({
45
52
  get() {
46
53
  if (isMutiple.value) {
47
54
  const val = modelValue.value || ''
48
- return val ? (isStrVal.value ? val.split(',') : val) : []
55
+ return val ? (isStrVal.value ? val.split(separator.value) : val) : []
49
56
  } else {
50
57
  if (modelValue.value !== null && modelValue.value !== undefined) {
51
58
  if (options.value?.some(item => item.columnValue == modelValue.value)) {
@@ -62,7 +69,7 @@ const value = computed({
62
69
  },
63
70
  set(val) {
64
71
  if (isMutiple.value) {
65
- modelValue.value = isStrVal.value ? val.join(',') : val
72
+ modelValue.value = isStrVal.value ? val.join(separator.value) : val
66
73
  } else {
67
74
  modelValue.value = val
68
75
  }