resolver-egretimp-plus 0.1.37 → 0.1.39

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.1.37",
3
+ "version": "0.1.39",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -38,7 +38,7 @@ const props = defineProps({
38
38
  ...commonPropsType,
39
39
  showSegment: {
40
40
  type: String,
41
- default: '1'
41
+ default: '0'
42
42
  }
43
43
  })
44
44
  // debugger
@@ -46,6 +46,14 @@ const props = defineProps({
46
46
  const attrs = useAttrs()
47
47
 
48
48
  const lang = inject('lang')
49
+ const activeNames = computed({
50
+ get() {
51
+ return props.config.defaultOpenFlag == '1' ? [props.config.metaCode] : []
52
+ },
53
+ set(val) {
54
+ props.config.defaultOpenFlag = val.length > 0 ? '1' : '0'
55
+ }
56
+ })
49
57
 
50
58
  const collapseProps = computed(() => {
51
59
  return Object.keys(ElCollapse.props).reduce((ret, key) => {
@@ -82,7 +90,7 @@ const collapseItemClass = computed(() => {
82
90
  return {
83
91
  'no-collpase': noCollpase.value,
84
92
  'hidden-head': hiddenHead.value,
85
- 'show-segment': showSegment.value
93
+ 'show-segment': showSegment.value && (activeNames.value?.length > 0)
86
94
  }
87
95
  })
88
96
 
@@ -122,14 +130,6 @@ const componentProps = computed(() => {
122
130
  shadow: 'never'
123
131
  } : {}
124
132
  })
125
- const activeNames = computed({
126
- get() {
127
- return props.config.defaultOpenFlag == '1' ? [props.config.metaCode] : []
128
- },
129
- set(val) {
130
- props.config.defaultOpenFlag = val.length > 0 ? '1' : '0'
131
- }
132
- })
133
133
 
134
134
  </script>
135
135
  <style lang="scss" scoped>
@@ -53,7 +53,10 @@ const value = computed({
53
53
  if (isNaN(Number(modeValue.value))) {
54
54
  return modeValue.value
55
55
  } else {
56
- return Number(modeValue.value)
56
+ if (datePickerProps.valueFormat === 'timestamp') {
57
+ return Number(modeValue.value)
58
+ }
59
+ return modeValue.value
57
60
  }
58
61
  },
59
62
  set(val) {
@@ -152,8 +152,20 @@ export default {
152
152
  }
153
153
 
154
154
  const getRenderSlots = function () {
155
+ const optionsSlotKeys = {
156
+ optionDefault: 'default'
157
+ }
158
+ const optionsSlots = {}
159
+ const selectSlots = {}
160
+ Object.keys(slots).forEach(key => {
161
+ if (Object.keys(optionsSlotKeys).includes(key)) {
162
+ optionsSlots[optionsSlotKeys[key]] = slots[key]
163
+ } else {
164
+ selectSlots[key] = slots[key]
165
+ }
166
+ })
155
167
  return {
156
- ...slots,
168
+ ...selectSlots,
157
169
  default: () => options.value?.map(option => {
158
170
  return (
159
171
  <ElOption
@@ -161,7 +173,11 @@ export default {
161
173
  label={lang?.value?.indexOf('zh') > -1 ? option.columnDesc_zh : option.columnDesc}
162
174
  value={option.columnValue}
163
175
  disabled={option.columnStatus == '0' || option.columnStatus == '2'}
164
- />
176
+ >
177
+ {
178
+ optionsSlots?.default?.(option)
179
+ }
180
+ </ElOption>
165
181
  )
166
182
  })
167
183
  }
@@ -94,7 +94,7 @@
94
94
  }
95
95
 
96
96
  .show-segment {
97
- .el-collapse-item__header {
97
+ & > .el-collapse-item__header {
98
98
  position: relative;
99
99
  &::after {
100
100
  display: block;
@@ -106,7 +106,7 @@
106
106
  bottom: 0px;
107
107
  }
108
108
  }
109
- .el-collapse-item__wrap {
109
+ & > .el-collapse-item__wrap {
110
110
  margin-top: 16px;
111
111
  }
112
112
  }
@@ -21,9 +21,9 @@ export default function defaultVal(config) {
21
21
  } else {
22
22
  if (configDefaultVal === ARG_FLAGS.CURRENT_DATE || configDefaultVal === 'currentDate' || configDefaultVal === ARG_FLAGS.CURRENT_DATE_TIME) {
23
23
  if (configDefaultVal === ARG_FLAGS.CURRENT_DATE_TIME) {
24
- defaultVal = formatDate(new Date(), 'yyyy-MM-dd')
25
- } else {
26
24
  defaultVal = formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')
25
+ } else {
26
+ defaultVal = formatDate(new Date(), 'yyyy-MM-dd')
27
27
  }
28
28
  } else if (['true', 'false'].includes(configDefaultVal)) {
29
29
  defaultVal = configDefaultVal == 'true' ? true : false