ts-glitter 21.2.1 → 21.2.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/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -1
- package/lowcode/jspage/main.js +343 -301
- package/lowcode/jspage/main.ts +1448 -1379
- package/lowcode/official_view_component/official/component.js +13 -3
- package/lowcode/official_view_component/official/component.ts +26 -11
- package/package.json +1 -1
|
@@ -132,7 +132,7 @@ export const component = Plugin.createComponent(import.meta.url, (glitter, editM
|
|
|
132
132
|
return ref;
|
|
133
133
|
}
|
|
134
134
|
else {
|
|
135
|
-
return window.parent.glitter.share.updated_form_data[`${page_request_config.appName}_${tag}`] || ref;
|
|
135
|
+
return (window.parent.glitter.share.updated_form_data[`${page_request_config.appName}_${tag}`] || ref);
|
|
136
136
|
}
|
|
137
137
|
})();
|
|
138
138
|
let formData = JSON.parse(JSON.stringify(ref || {}));
|
|
@@ -179,8 +179,18 @@ export const component = Plugin.createComponent(import.meta.url, (glitter, editM
|
|
|
179
179
|
const ref = widget.data.refer_app
|
|
180
180
|
? widget.data.refer_form_data || data.page_config.formData
|
|
181
181
|
: data.page_config.formData;
|
|
182
|
-
|
|
183
|
-
|
|
182
|
+
try {
|
|
183
|
+
if (window.parent.glitter.share._global_component
|
|
184
|
+
.map((dd) => {
|
|
185
|
+
return `${dd.appName}_${dd.tag}`;
|
|
186
|
+
})
|
|
187
|
+
.includes(`${page_request_config.appName}_${tag}`)) {
|
|
188
|
+
window.parent.glitter.share.updated_form_data[`${page_request_config.appName}_${tag}`] =
|
|
189
|
+
ref;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
catch (e) {
|
|
193
|
+
}
|
|
184
194
|
viewConfig.formData = getFormData(ref);
|
|
185
195
|
const view = getView();
|
|
186
196
|
window.parent.glitter.share.loading_dialog.dataLoading({ visible: true });
|
|
@@ -8,6 +8,7 @@ import { GlobalWidget } from '../../glitterBundle/html-component/global-widget.j
|
|
|
8
8
|
import { NormalPageEditor } from '../../editor/normal-page-editor.js';
|
|
9
9
|
import { RenderValue } from '../../glitterBundle/html-component/render-value.js';
|
|
10
10
|
import { ApplicationConfig } from '../../application-config.js';
|
|
11
|
+
import { ApiPageConfig } from '../../api/pageConfig.js';
|
|
11
12
|
|
|
12
13
|
export const component = Plugin.createComponent(import.meta.url, (glitter: Glitter, editMode: boolean) => {
|
|
13
14
|
return {
|
|
@@ -40,6 +41,7 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
40
41
|
let data: any = undefined;
|
|
41
42
|
let tag = widget.data.tag;
|
|
42
43
|
let carryData = widget.data.carryData;
|
|
44
|
+
|
|
43
45
|
async function getData(document: any) {
|
|
44
46
|
return new Promise(async (resolve, reject) => {
|
|
45
47
|
try {
|
|
@@ -116,16 +118,16 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
116
118
|
});
|
|
117
119
|
|
|
118
120
|
function getFormData(ref: any) {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
ref = (()=>{
|
|
123
|
-
if((window as any).glitter.getUrlParameter('select_widget') === 'true'){
|
|
121
|
+
//判斷是否有上次的更新資料,並且為單例元素
|
|
122
|
+
ref = (() => {
|
|
123
|
+
if ((window as any).glitter.getUrlParameter('select_widget') === 'true') {
|
|
124
124
|
return ref;
|
|
125
|
-
}else{
|
|
126
|
-
|
|
127
|
-
|
|
125
|
+
} else {
|
|
126
|
+
return (
|
|
127
|
+
(window.parent as any).glitter.share.updated_form_data[
|
|
128
|
+
`${page_request_config.appName}_${tag}`
|
|
128
129
|
] || ref
|
|
130
|
+
);
|
|
129
131
|
}
|
|
130
132
|
})();
|
|
131
133
|
let formData = JSON.parse(JSON.stringify(ref || {}));
|
|
@@ -190,8 +192,21 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
190
192
|
const ref = widget.data.refer_app
|
|
191
193
|
? widget.data.refer_form_data || data.page_config.formData
|
|
192
194
|
: data.page_config.formData;
|
|
193
|
-
|
|
194
|
-
|
|
195
|
+
try {
|
|
196
|
+
if (
|
|
197
|
+
(window.parent as any).glitter.share._global_component
|
|
198
|
+
.map((dd: any) => {
|
|
199
|
+
return `${dd.appName}_${dd.tag}`;
|
|
200
|
+
})
|
|
201
|
+
.includes(`${page_request_config.appName}_${tag}`)
|
|
202
|
+
) {
|
|
203
|
+
(window.parent as any).glitter.share.updated_form_data[`${page_request_config.appName}_${tag}`] =
|
|
204
|
+
ref;
|
|
205
|
+
}
|
|
206
|
+
}catch (e) {
|
|
207
|
+
|
|
208
|
+
}
|
|
209
|
+
|
|
195
210
|
viewConfig.formData = getFormData(ref);
|
|
196
211
|
const view = getView();
|
|
197
212
|
(window.parent as any).glitter.share.loading_dialog.dataLoading({ visible: true });
|
|
@@ -877,7 +892,7 @@ export const component = Plugin.createComponent(import.meta.url, (glitter: Glitt
|
|
|
877
892
|
gvc.glitter.share.editorViewModel.selectItem =
|
|
878
893
|
undefined;
|
|
879
894
|
gvc.glitter.share.selectEditorItem();
|
|
880
|
-
|
|
895
|
+
|
|
881
896
|
// if (select_.container_cf) {
|
|
882
897
|
// const gvc_ =
|
|
883
898
|
// gvc.glitter.document.querySelector('.iframe_view')
|