cloud-web-corejs 1.0.54-dev.667 → 1.0.54-dev.669

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.667",
4
+ "version": "1.0.54-dev.669",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -21,9 +21,13 @@
21
21
  </div>
22
22
  </div>
23
23
  <div v-else class="vue-page-container" :style="containerStyle">
24
- <div v-if="!componentPath" class="vue-page-placeholder">{{ $t1("请配置 Vue 页面路径") }}</div>
24
+ <div v-if="!componentPath" class="vue-page-placeholder">
25
+ {{ $t1("请配置 Vue 页面路径") }}
26
+ </div>
25
27
  <div v-else-if="loadError" class="vue-page-error">{{ loadError }}</div>
26
- <div v-else-if="loading" class="vue-page-loading">{{ $t1("页面加载中...") }}</div>
28
+ <div v-else-if="loading" class="vue-page-loading">
29
+ {{ $t1("页面加载中...") }}
30
+ </div>
27
31
  <component
28
32
  v-if="showComponent && dynamicComponent"
29
33
  :is="dynamicComponent"
@@ -80,7 +84,6 @@ export default {
80
84
  dynamicComponent: null,
81
85
  componentProps: {},
82
86
  componentRenderKey: 0,
83
- componentLoaded: false,
84
87
  loading: false,
85
88
  loadError: null,
86
89
  };
@@ -101,25 +104,10 @@ export default {
101
104
  };
102
105
  },
103
106
  },
104
- watch: {
105
- componentPath() {
106
- this.reloadDynamicComponent();
107
- },
108
- "field.options.componentConfig"() {
109
- this.updateComponentProps();
110
- },
111
- formModel: {
112
- deep: true,
113
- handler() {
114
- this.updateComponentProps();
115
- },
116
- },
117
- },
118
107
  created() {
119
108
  this.registerToRefList();
120
109
  this.initEventHandler();
121
110
  this.handleOnCreated();
122
- this.loadPage();
123
111
  },
124
112
  mounted() {
125
113
  this.handleOnMounted();
@@ -135,54 +123,48 @@ export default {
135
123
  this.showComponent = false;
136
124
  this.dynamicComponent = null;
137
125
  this.componentProps = {};
138
- this.componentLoaded = false;
139
126
  this.loading = false;
140
127
  this.loadError = null;
141
128
  },
142
- reloadDynamicComponent() {
143
- this.resetComponentState();
144
- this.loadPage();
145
- },
146
129
  loadPage() {
147
130
  if (this.designState) {
148
131
  return;
149
132
  }
150
133
 
134
+ const path = this.normalizeComponentPath(this.componentPath);
135
+ if (!path) {
136
+ this.resetComponentState();
137
+ return;
138
+ }
139
+
151
140
  if (this.dynamicComponent) {
152
- this.showComponent = true;
153
141
  this.updateComponentProps();
142
+ this.showComponent = true;
154
143
  return;
155
144
  }
156
145
 
157
- const path = this.normalizeComponentPath(this.componentPath);
158
146
  this.showComponent = false;
159
147
  this.loadError = null;
160
-
161
- if (!path) {
162
- this.loading = false;
163
- this.componentLoaded = false;
164
- return;
165
- }
166
-
167
148
  this.loading = true;
149
+
168
150
  try {
169
151
  const loader = loadView(path);
170
152
  loader((component) => {
153
+ if (path !== this.normalizeComponentPath(this.componentPath)) {
154
+ return;
155
+ }
171
156
  this.loading = false;
172
157
  if (!component) {
173
158
  this.loadError = this.$t1("页面组件未找到");
174
- this.componentLoaded = false;
175
159
  return;
176
160
  }
177
161
  this.dynamicComponent = component.default || component;
178
162
  this.componentRenderKey += 1;
179
- this.componentLoaded = true;
180
- this.showComponent = true;
181
163
  this.updateComponentProps();
164
+ this.showComponent = true;
182
165
  });
183
166
  } catch (error) {
184
167
  this.loading = false;
185
- this.componentLoaded = false;
186
168
  this.loadError = error.message || this.$t1("页面加载失败");
187
169
  }
188
170
  },
@@ -198,11 +180,7 @@ export default {
198
180
  return;
199
181
  }
200
182
 
201
- let props = this.handleCustomEvent(
202
- this.field.options.componentConfig,
203
- ["formModel"],
204
- [this.formModel]
205
- );
183
+ let props = this.handleCustomEvent(this.field.options.componentConfig);
206
184
  this.componentProps = props && typeof props === "object" ? props : {};
207
185
  },
208
186
  },
@@ -39,7 +39,7 @@ export default {
39
39
  },
40
40
  data() {
41
41
  return {
42
- params: ["dataId", "formCode", "formModel"],
42
+ params: ["dataId", "formCode"],
43
43
  };
44
44
  },
45
45
  };
@@ -799,6 +799,12 @@ export const defaultWidgetShowRuleConfig = {
799
799
  widgetShowRuleConfig: [],
800
800
  };
801
801
 
802
+ export const defaultLabelIconConfig = {
803
+ labelIconClass: null,
804
+ labelIconPosition: "rear",
805
+ labelTooltip: null,
806
+ };
807
+
802
808
  const vabsearchConfig = {
803
809
  name: "",
804
810
  keyNameEnabled: !1,
@@ -814,6 +820,7 @@ const vabsearchConfig = {
814
820
  required: !1,
815
821
  labelWidth: null,
816
822
  labelHidden: !1,
823
+ ...defaultLabelIconConfig,
817
824
  readonly: true,
818
825
  /*formCode: null,
819
826
  formName: null,
@@ -863,6 +870,7 @@ const projectTagConfig = {
863
870
  required: !1,
864
871
  labelWidth: null,
865
872
  labelHidden: !1,
873
+ ...defaultLabelIconConfig,
866
874
  onCreated: "if(dataId)this.loadDataDefaultHandle();",
867
875
  onMounted: "",
868
876
  onClick: "",
@@ -1016,17 +1024,7 @@ export const basicFields = [
1016
1024
  validation: "",
1017
1025
  validationHint: "",
1018
1026
  customClass: "",
1019
- /*labelIconClass: null,
1020
- labelIconPosition: "rear",
1021
- labelTooltip: null,
1022
- minLength: null,
1023
- maxLength: null,
1024
- showWordLimit: !1,
1025
- prefixIcon: "",
1026
- suffixIcon: "",
1027
- appendButton: !1,
1028
- appendButtonDisabled: !1,
1029
- buttonIcon: "el-icon-search",*/
1027
+ ...defaultLabelIconConfig,
1030
1028
  onCreated: "",
1031
1029
  onMounted: "",
1032
1030
  onInput: "",
@@ -1939,6 +1937,7 @@ export const basicFields = [
1939
1937
  labelAlign: "",
1940
1938
  labelWidth: null,
1941
1939
  labelHidden: !1,
1940
+ ...defaultLabelIconConfig,
1942
1941
  onCreated: "",
1943
1942
  onMounted: "",
1944
1943
  accessType: "1",
@@ -1982,6 +1981,7 @@ export const basicFields = [
1982
1981
  hidden: !1,
1983
1982
 
1984
1983
  customClass: "",
1984
+ ...defaultLabelIconConfig,
1985
1985
 
1986
1986
  prefixIcon: "",
1987
1987
  suffixIcon: "",
@@ -2754,7 +2754,7 @@ export const advancedFields = [
2754
2754
  onMounted: "",
2755
2755
  onAfterConfirmFile: "",
2756
2756
  vabUpload: 1,
2757
-
2757
+ ...defaultLabelIconConfig,
2758
2758
  ...httpConfig,
2759
2759
  formScriptCode: "getList",
2760
2760
 
@@ -3294,6 +3294,7 @@ export const advancedFields = [
3294
3294
  labelWidth: null,
3295
3295
  labelHidden: !1,
3296
3296
  optionItemValueType: 0,
3297
+ ...defaultLabelIconConfig,
3297
3298
  statusType: "common",
3298
3299
  statusParam: [],
3299
3300
 
@@ -3558,6 +3559,7 @@ export const businessFields = [
3558
3559
  labelAlign: "",
3559
3560
  labelWidth: null,
3560
3561
  labelHidden: !1,
3562
+ ...defaultLabelIconConfig,
3561
3563
  onCreated: "",
3562
3564
  onMounted: "",
3563
3565
  accessType: "1",
@@ -3596,6 +3598,7 @@ export const businessFields = [
3596
3598
  labelAlign: "",
3597
3599
  labelWidth: null,
3598
3600
  labelHidden: !1,
3601
+ ...defaultLabelIconConfig,
3599
3602
  onCreated: "",
3600
3603
  onMounted: "",
3601
3604
  accessType: "1",
@@ -3634,6 +3637,7 @@ export const businessFields = [
3634
3637
  labelAlign: "",
3635
3638
  labelWidth: null,
3636
3639
  labelHidden: !1,
3640
+ ...defaultLabelIconConfig,
3637
3641
  onCreated: "",
3638
3642
  onMounted: "",
3639
3643
  accessType: "1",
@@ -3672,6 +3676,7 @@ export const businessFields = [
3672
3676
  labelAlign: "",
3673
3677
  labelWidth: null,
3674
3678
  labelHidden: !1,
3679
+ ...defaultLabelIconConfig,
3675
3680
  onCreated: "",
3676
3681
  onMounted: "",
3677
3682
  accessType: "1",
@@ -3890,7 +3895,7 @@ export const businessFields = [
3890
3895
 
3891
3896
  // ...httpConfig,
3892
3897
  // formScriptCode: "getList",
3893
-
3898
+ ...defaultLabelIconConfig,
3894
3899
  ...defaultWfConfig,
3895
3900
 
3896
3901
  showRuleFlag: 1,