resolver-egretimp-plus 0.0.92 → 0.0.94

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.92",
3
+ "version": "0.0.94",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -6,6 +6,10 @@ const lang = inject('lang')
6
6
  const modelValue = defineModel()
7
7
  const props = defineProps({
8
8
  ...commonPropsType,
9
+ formatter: {
10
+ type: Function,
11
+ default: null
12
+ }
9
13
  })
10
14
 
11
15
  const normalVal = computed(() => {
@@ -22,9 +26,15 @@ const dateFormat = computed(() => {
22
26
 
23
27
  const calcProps = computed(() => {
24
28
  let desc = normalVal.value || props.config?.desc
29
+ if (desc?.toString) {
30
+ desc = desc.toString()
31
+ }
25
32
  if (dateFormat.value) {
26
33
  desc = formatDate(desc, dateFormat.value)
27
34
  }
35
+ if (props.formatter && typeof props.formatter === "function") {
36
+ desc = props.formatter(desc)
37
+ }
28
38
  return {
29
39
  title: lang?.value?.indexOf('zh') > -1 ? props.config?.metaNameZh : props.config?.metaNameEn,
30
40
  desc,
@@ -149,7 +149,11 @@ onMounted(() => {
149
149
  pageNum: page.pageNum
150
150
  }
151
151
  }, ({ val }) => {
152
- tableRef.value?.setTableData([])
152
+ try {
153
+ // 这边有的时候会报错
154
+ tableRef.value?.setTableData([])
155
+ } catch (error) {
156
+ }
153
157
  setTimeout(() => {
154
158
  tableRef.value?.setTableData(val)
155
159
  }, 100);