resolver-egretimp-plus 0.0.91 → 0.0.93

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.91",
3
+ "version": "0.0.93",
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,
package/src/index.jsx CHANGED
@@ -9,7 +9,6 @@ import { executeLoadServices } from "./components/helper/resolver.js"
9
9
  import { deepMerge } from "./utils/index.js"
10
10
  import { useRouter } from "vue-router"
11
11
  import { useRoute } from "vue-router"
12
- import { markRaw } from "vue"
13
12
  export default {
14
13
  name: 'Resolver',
15
14
  props: {
@@ -133,10 +132,10 @@ export default {
133
132
  setup(props, { emit, attrs, expose }) {
134
133
  const rootStore = reactive({})
135
134
  const nativeDataLoad = ref(false)
136
- const router = useRouter()
137
- const route = useRoute()
138
- // const router = {}
139
- // const route = {}
135
+ // const router = useRouter()
136
+ // const route = useRoute()
137
+ const router = {}
138
+ const route = {}
140
139
  const axiosInstance = ref(props.axiosInstance)
141
140
  watch(() => {
142
141
  return props.axiosConfig
@@ -29,7 +29,6 @@ import QuestionFilled from '../components/icons/question-filled.vue'
29
29
  import { dispatchClickEvent, dispatchClickEvents, getTableConfig } from '../components/helper/eventOrchestration.js'
30
30
  import CmiFormItem from '../components/cmiFormItem'
31
31
  import loadModule from './loadModule.js'
32
- import { toRaw } from 'vue'
33
32
 
34
33
  // 解析配置中的defStyle属性
35
34
  export function parseDefStyle(defStyle) {