ts-glitter 13.8.66 → 13.8.661
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/public-components/product/product-detail.js +16 -3
- package/lowcode/public-components/product/product-detail.ts +20 -7
- package/lowcode/public-components/user-manager/um-info.js +6 -0
- package/lowcode/public-components/user-manager/um-info.ts +9 -0
- package/package.json +1 -1
package/lowcode/Entry.js
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
66
66
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.661';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm = {
|
|
70
70
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -64,7 +64,7 @@ export class Entry {
|
|
|
64
64
|
}
|
|
65
65
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
66
66
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
67
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
67
|
+
glitter.share.editerVersion = 'V_13.8.661';
|
|
68
68
|
glitter.share.start = new Date();
|
|
69
69
|
const vm: {
|
|
70
70
|
appConfig: any;
|
|
@@ -91,8 +91,8 @@ export class ProductDetail {
|
|
|
91
91
|
});
|
|
92
92
|
return html `<div class="container">
|
|
93
93
|
<div class="row" style="${isPhone ? 'margin: 1rem 0; width: 100%;' : 'margin: 7rem;'}">
|
|
94
|
-
<div class="col-12 col-md-6 px-0 px-md-3">
|
|
95
|
-
<div class="swiper"
|
|
94
|
+
<div class="col-12 col-md-6 px-0 px-md-3" id="swiper-container">
|
|
95
|
+
<div class="swiper" id="dynamic-swiper">
|
|
96
96
|
<div class="swiper-wrapper">
|
|
97
97
|
${prod.preview_image
|
|
98
98
|
.map((image, index) => {
|
|
@@ -117,7 +117,7 @@ export class ProductDetail {
|
|
|
117
117
|
</div>
|
|
118
118
|
</div>
|
|
119
119
|
</div>
|
|
120
|
-
|
|
120
|
+
<div class="col-12 col-md-6 px-0 px-md-3 d-flex flex-column gap-2 mt-4 mt-md-0">${PdClass.selectSpec({ gvc, titleFontColor, prod, vm })}</div>
|
|
121
121
|
</div>
|
|
122
122
|
<div style="d-flex flex-column align-items-center mt-4">
|
|
123
123
|
${gvc.bindView((() => {
|
|
@@ -243,6 +243,19 @@ export class ProductDetail {
|
|
|
243
243
|
clearInterval(si);
|
|
244
244
|
}
|
|
245
245
|
}, 200);
|
|
246
|
+
function updateSwiperHeight() {
|
|
247
|
+
const size = setTimeout(() => {
|
|
248
|
+
const container = document.getElementById('swiper-container');
|
|
249
|
+
const swiper = document.getElementById('dynamic-swiper');
|
|
250
|
+
if (swiper && container) {
|
|
251
|
+
const rem = document.body.clientWidth > 768 ? '2rem' : '0rem';
|
|
252
|
+
swiper.style.height = `calc(${container.clientWidth}px - ${rem})`;
|
|
253
|
+
clearInterval(size);
|
|
254
|
+
}
|
|
255
|
+
}, 200);
|
|
256
|
+
}
|
|
257
|
+
updateSwiperHeight();
|
|
258
|
+
window.addEventListener('resize', updateSwiperHeight);
|
|
246
259
|
}
|
|
247
260
|
},
|
|
248
261
|
});
|
|
@@ -55,9 +55,9 @@ export class ProductDetail {
|
|
|
55
55
|
|
|
56
56
|
public static main(gvc: GVC, widget: any, subData: any) {
|
|
57
57
|
//移除所有查詢
|
|
58
|
-
const url=new URL(location.href)
|
|
59
|
-
for (const b of url.searchParams.keys()){
|
|
60
|
-
gvc.glitter.setUrlParameter(b,undefined);
|
|
58
|
+
const url = new URL(location.href);
|
|
59
|
+
for (const b of url.searchParams.keys()) {
|
|
60
|
+
gvc.glitter.setUrlParameter(b, undefined);
|
|
61
61
|
}
|
|
62
62
|
const glitter = gvc.glitter;
|
|
63
63
|
const isPhone = document.body.clientWidth < 768;
|
|
@@ -106,8 +106,8 @@ export class ProductDetail {
|
|
|
106
106
|
|
|
107
107
|
return html`<div class="container">
|
|
108
108
|
<div class="row" style="${isPhone ? 'margin: 1rem 0; width: 100%;' : 'margin: 7rem;'}">
|
|
109
|
-
<div class="col-12 col-md-6 px-0 px-md-3">
|
|
110
|
-
<div class="swiper"
|
|
109
|
+
<div class="col-12 col-md-6 px-0 px-md-3" id="swiper-container">
|
|
110
|
+
<div class="swiper" id="dynamic-swiper">
|
|
111
111
|
<div class="swiper-wrapper">
|
|
112
112
|
${prod.preview_image
|
|
113
113
|
.map((image, index) => {
|
|
@@ -132,7 +132,7 @@ export class ProductDetail {
|
|
|
132
132
|
</div>
|
|
133
133
|
</div>
|
|
134
134
|
</div>
|
|
135
|
-
|
|
135
|
+
<div class="col-12 col-md-6 px-0 px-md-3 d-flex flex-column gap-2 mt-4 mt-md-0">${PdClass.selectSpec({ gvc, titleFontColor, prod, vm })}</div>
|
|
136
136
|
</div>
|
|
137
137
|
<div style="d-flex flex-column align-items-center mt-4">
|
|
138
138
|
${gvc.bindView(
|
|
@@ -267,10 +267,23 @@ export class ProductDetail {
|
|
|
267
267
|
swiper: thumbs,
|
|
268
268
|
},
|
|
269
269
|
});
|
|
270
|
-
|
|
271
270
|
clearInterval(si);
|
|
272
271
|
}
|
|
273
272
|
}, 200);
|
|
273
|
+
|
|
274
|
+
function updateSwiperHeight() {
|
|
275
|
+
const size = setTimeout(() => {
|
|
276
|
+
const container = document.getElementById('swiper-container');
|
|
277
|
+
const swiper = document.getElementById('dynamic-swiper');
|
|
278
|
+
if (swiper && container) {
|
|
279
|
+
const rem = document.body.clientWidth > 768 ? '2rem' : '0rem';
|
|
280
|
+
swiper.style.height = `calc(${container.clientWidth}px - ${rem})`;
|
|
281
|
+
clearInterval(size);
|
|
282
|
+
}
|
|
283
|
+
}, 200);
|
|
284
|
+
}
|
|
285
|
+
updateSwiperHeight();
|
|
286
|
+
window.addEventListener('resize', updateSwiperHeight);
|
|
274
287
|
}
|
|
275
288
|
},
|
|
276
289
|
});
|