n20-common-lib 3.3.1 → 3.3.2

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": "n20-common-lib",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -61,7 +61,7 @@
61
61
  import expandableWrap from '../Expandable/main.vue'
62
62
  import approvalCard from '../ApprovalCard/index.vue'
63
63
  import approvalImg from './approvalImg.vue'
64
- import getJsonc from '../../assets/getJsonc'
64
+ import getApprovalConfig from '../ApprovalButtons/getApprovalConfig'
65
65
  export default {
66
66
  name: 'ApprovalRecord',
67
67
  components: {
@@ -99,10 +99,14 @@ export default {
99
99
  return this.procInstId || this.$route.query.processInstanceId
100
100
  }
101
101
  },
102
- mounted() {
103
- getJsonc('portal/server-config.jsonc').then(({ approvalMode }) => {
102
+ async mounted() {
103
+ try {
104
+ const { approvalMode } = await getApprovalConfig()
104
105
  this.approvalMode = approvalMode || 'dialog'
105
- })
106
+ } catch (error) {
107
+ // 后台配置和旧 JSONC 都不可用时保留原有弹窗展示模式。
108
+ this.approvalMode = 'dialog'
109
+ }
106
110
  }
107
111
  }
108
112
  </script>