stellar-ui-plus 1.22.21 → 1.22.23
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/components/ste-app-update/props.ts +5 -0
- package/components/ste-app-update/ste-app-update.easycom.json +6 -0
- package/components/ste-app-update/ste-app-update.vue +93 -154
- package/package.json +1 -1
- package/static/app_update_img.png +0 -0
- package/static/app_update_close.png +0 -0
- package/static/bg_top.png +0 -0
|
@@ -46,7 +46,7 @@ const getData = (callback?: (resVersion: { name: string; code: string; updateFil
|
|
|
46
46
|
data.code = _data.data.code;
|
|
47
47
|
data.name = _data.data.name;
|
|
48
48
|
|
|
49
|
-
data.content = (_data.data.desc || '').
|
|
49
|
+
data.content = (_data.data.desc || '').replace(/\n+/g, '<br />');
|
|
50
50
|
|
|
51
51
|
data.isForce = _data.data.isForce;
|
|
52
52
|
data.updateFile = _data.data.entireFile ? _data.data.entireFile : _data.data.updateFile;
|
|
@@ -166,48 +166,35 @@ defineExpose({
|
|
|
166
166
|
</script>
|
|
167
167
|
<template>
|
|
168
168
|
<view class="update-mask flex-center" v-if="open">
|
|
169
|
-
<view class="content
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
<view class="
|
|
179
|
-
<view class="
|
|
180
|
-
|
|
181
|
-
<
|
|
182
|
-
<
|
|
183
|
-
<text v-else
|
|
184
|
-
</scroll-view>
|
|
185
|
-
</view>
|
|
186
|
-
|
|
187
|
-
<view class="footer">
|
|
188
|
-
<view class="progress-box flex-column" v-if="!updateBtn">
|
|
189
|
-
<progress class="progress" border-radius="35" :percent="percent" activeColor="#3DA7FF" show-info stroke-width="10" />
|
|
190
|
-
<view>
|
|
191
|
-
<text class="fs24" v-if="tempFilePath">下载完成</text>
|
|
192
|
-
<text class="fs24" v-else>正在下载,请稍后 ({{ downloadedSize }}/{{ packageFileSize }}M)</text>
|
|
193
|
-
</view>
|
|
169
|
+
<view class="update-content">
|
|
170
|
+
<image class="update-image" src="../../static/app_update_img.png"></image>
|
|
171
|
+
|
|
172
|
+
<view class="update-title">发现新版本</view>
|
|
173
|
+
<view class="update-version">v{{ data.name }}</view>
|
|
174
|
+
<scroll-view scroll-y class="update-desc">
|
|
175
|
+
<view class="update-desc-title">更新内容</view>
|
|
176
|
+
<view class="update-desc-message"><rich-text :nodes="data.content"></rich-text></view>
|
|
177
|
+
</scroll-view>
|
|
178
|
+
<view class="update-footer">
|
|
179
|
+
<view class="update-progress-box" v-if="!updateBtn">
|
|
180
|
+
<progress class="update-progress" border-radius="35" :percent="percent" activeColor="#3DA7FF" show-info stroke-width="10" />
|
|
181
|
+
<view>
|
|
182
|
+
<text class="update-down-msg" v-if="tempFilePath">下载完成</text>
|
|
183
|
+
<text class="update-down-msg" v-else>正在下载,请稍后 ({{ downloadedSize }}/{{ packageFileSize }}M)</text>
|
|
194
184
|
</view>
|
|
195
|
-
|
|
196
|
-
<button class="content-button" style="border: none; color: #fff" plain @click="confirm" v-if="updateBtn">立即升级</button>
|
|
197
|
-
<button class="content-button" style="border: none; color: #fff" plain @click="install" v-else-if="data.package_type === 0 && tempFilePath">安装</button>
|
|
198
185
|
</view>
|
|
186
|
+
<button class="update-button" plain @click="confirm" v-if="updateBtn">{{ btnText }}</button>
|
|
187
|
+
<button class="update-button" plain @click="install" v-else-if="data.package_type === 0 && tempFilePath">安装</button>
|
|
199
188
|
</view>
|
|
200
189
|
|
|
201
|
-
<
|
|
190
|
+
<view class="update-close" v-if="!data.isForce" @click.stop="close">✖</view>
|
|
202
191
|
</view>
|
|
203
192
|
</view>
|
|
204
193
|
</template>
|
|
205
194
|
|
|
206
195
|
<style lang="scss" scoped>
|
|
207
196
|
.flex-center {
|
|
208
|
-
/* #ifndef APP-NVUE */
|
|
209
197
|
display: flex;
|
|
210
|
-
/* #endif */
|
|
211
198
|
justify-content: center;
|
|
212
199
|
align-items: center;
|
|
213
200
|
}
|
|
@@ -218,129 +205,81 @@ defineExpose({
|
|
|
218
205
|
top: 0;
|
|
219
206
|
right: 0;
|
|
220
207
|
bottom: 0;
|
|
221
|
-
background-color: rgba(0, 0, 0, 0.
|
|
208
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
222
209
|
z-index: 9999;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
.
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
left: 50rpx;
|
|
264
|
-
z-index: 1;
|
|
265
|
-
display: flex;
|
|
266
|
-
flex-direction: column;
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
.content-header {
|
|
270
|
-
height: 70rpx;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
.title {
|
|
274
|
-
font-size: 33rpx;
|
|
275
|
-
font-weight: bold;
|
|
276
|
-
color: #3da7ff;
|
|
277
|
-
line-height: 38px;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.footer {
|
|
281
|
-
min-height: 150rpx;
|
|
282
|
-
padding-bottom: 12rpx;
|
|
283
|
-
margin-top: 24rpx;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.box-des-scroll {
|
|
287
|
-
box-sizing: border-box;
|
|
288
|
-
padding: 0 40rpx;
|
|
289
|
-
text-align: left;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
.box-des {
|
|
293
|
-
font-size: 26rpx;
|
|
294
|
-
color: #000000;
|
|
295
|
-
line-height: 50rpx;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
.progress-box {
|
|
299
|
-
width: 100%;
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
.progress {
|
|
303
|
-
width: 83%;
|
|
304
|
-
height: 40rpx;
|
|
305
|
-
border-radius: 35px;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
.close-img {
|
|
309
|
-
width: 70rpx;
|
|
310
|
-
height: 70rpx;
|
|
311
|
-
z-index: 1000;
|
|
312
|
-
position: absolute;
|
|
313
|
-
bottom: -120rpx;
|
|
314
|
-
left: calc(50% - 70rpx / 2);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
.content-button {
|
|
318
|
-
text-align: center;
|
|
319
|
-
flex: 1;
|
|
320
|
-
font-size: 30rpx;
|
|
321
|
-
font-weight: 400;
|
|
322
|
-
color: #ffffff;
|
|
323
|
-
border-radius: 40rpx;
|
|
324
|
-
margin: 0 18rpx;
|
|
325
|
-
|
|
326
|
-
height: 80rpx;
|
|
327
|
-
line-height: 80rpx;
|
|
328
|
-
|
|
329
|
-
background: linear-gradient(to right, #1785ff, #3da7ff);
|
|
330
|
-
}
|
|
210
|
+
.update-content {
|
|
211
|
+
width: 694rpx;
|
|
212
|
+
background-color: #fff;
|
|
213
|
+
border-radius: 16rpx;
|
|
214
|
+
padding: 72rpx 40rpx 40rpx 40rpx;
|
|
215
|
+
display: flex;
|
|
216
|
+
flex-direction: column;
|
|
217
|
+
align-items: center;
|
|
218
|
+
line-height: 1.5;
|
|
219
|
+
position: relative;
|
|
220
|
+
.update-image {
|
|
221
|
+
width: 201rpx;
|
|
222
|
+
height: 201rpx;
|
|
223
|
+
}
|
|
224
|
+
.update-title {
|
|
225
|
+
margin-top: 28rpx;
|
|
226
|
+
font-weight: 500;
|
|
227
|
+
font-size: 48rpx;
|
|
228
|
+
color: #000000;
|
|
229
|
+
}
|
|
230
|
+
.update-version {
|
|
231
|
+
font-weight: 400;
|
|
232
|
+
font-size: 34rpx;
|
|
233
|
+
color: #a7abb0;
|
|
234
|
+
}
|
|
235
|
+
.update-desc {
|
|
236
|
+
width: 100%;
|
|
237
|
+
max-height: 350rpx;
|
|
238
|
+
margin-top: 24rpx;
|
|
239
|
+
.update-desc-title {
|
|
240
|
+
font-weight: 500;
|
|
241
|
+
font-size: 32rpx;
|
|
242
|
+
color: #000000;
|
|
243
|
+
}
|
|
244
|
+
.update-desc-message {
|
|
245
|
+
font-weight: 400;
|
|
246
|
+
font-size: 28rpx;
|
|
247
|
+
color: #555a61;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
331
250
|
|
|
332
|
-
.
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
251
|
+
.update-footer {
|
|
252
|
+
width: 100%;
|
|
253
|
+
margin-top: 48rpx;
|
|
254
|
+
.update-progress-box {
|
|
255
|
+
text-align: center;
|
|
256
|
+
font-weight: 400;
|
|
257
|
+
font-size: 34rpx;
|
|
258
|
+
color: #a7abb0;
|
|
259
|
+
}
|
|
260
|
+
.update-button {
|
|
261
|
+
width: 100%;
|
|
262
|
+
height: 96rpx;
|
|
263
|
+
line-height: 88rpx;
|
|
264
|
+
background: #1388f7;
|
|
265
|
+
border-radius: 16rpx;
|
|
266
|
+
border: 4rpx solid #1388f7;
|
|
267
|
+
font-weight: 500;
|
|
268
|
+
font-size: 32rpx;
|
|
269
|
+
color: #ffffff;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
.update-close {
|
|
273
|
+
position: absolute;
|
|
274
|
+
top: 0;
|
|
275
|
+
right: 0;
|
|
276
|
+
font-size: 30rpx;
|
|
277
|
+
color: #555a61;
|
|
278
|
+
width: 104rpx;
|
|
279
|
+
height: 96rpx;
|
|
280
|
+
line-height: 96rpx;
|
|
281
|
+
text-align: center;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
345
284
|
}
|
|
346
285
|
</style>
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|
package/static/bg_top.png
DELETED
|
Binary file
|