stellar-ui-plus 1.21.3 → 1.21.4
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/README.md +36 -0
- package/components/ste-app-update/config.json +5 -0
- package/components/ste-app-update/props.ts +9 -0
- package/components/ste-app-update/rt-uni-update.vue +307 -0
- package/components/ste-app-update/ste-app-update.easycom.json +14 -0
- package/components/ste-app-update/ste-app-update.vue +74 -0
- package/components/ste-dropdown-menu/ATTRIBUTES.md +0 -1
- package/components/ste-goods-info/props.ts +5 -0
- package/components/ste-goods-info/ste-goods-info.easycom.json +2 -2
- package/components/ste-goods-info/ste-goods-info.vue +13 -4
- package/components/ste-icon/ATTRIBUTES.md +1 -1
- package/components/ste-icon/iconfont.css +12 -12
- package/components/ste-login/README.md +11 -0
- package/components/ste-login/components/loginFormItem.vue +20 -4
- package/components/ste-login/props.ts +1 -1
- package/components/ste-login/ste-login.easycom.json +15 -2
- package/components/ste-login/ste-login.vue +6 -1
- package/components/ste-number-keyboard/ATTRIBUTES.md +0 -3
- package/components/ste-search/ATTRIBUTES.md +0 -1
- package/components/ste-stepper/ATTRIBUTES.md +0 -1
- package/index.ts +0 -26
- package/package.json +2 -3
- package/static/app_update_close.png +0 -0
- package/static/bg_top.png +0 -0
- package/types/components.d.ts +6 -36
- package/types/refComponents.d.ts +0 -26
- package/components/ste-category/ATTRIBUTES.md +0 -11
- package/components/ste-date-user/ATTRIBUTES.md +0 -8
- package/components/ste-filter-tool/ATTRIBUTES.md +0 -15
- package/components/ste-function-list/ATTRIBUTES.md +0 -24
- package/components/ste-goods-info/ATTRIBUTES.md +0 -41
- package/components/ste-goods-list/ATTRIBUTES.md +0 -10
- package/components/ste-login/ATTRIBUTES.md +0 -26
- package/components/ste-login-info/ATTRIBUTES.md +0 -19
- package/components/ste-main-info/ATTRIBUTES.md +0 -17
- package/components/ste-navbar/ATTRIBUTES.md +0 -25
- package/components/ste-order-card/ATTRIBUTES.md +0 -27
- package/components/ste-search-box/ATTRIBUTES.md +0 -18
- package/components/ste-user-info/ATTRIBUTES.md +0 -26
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# AppUpdate App更新
|
|
2
|
+
|
|
3
|
+
此组件用于APP更新功能
|
|
4
|
+
|
|
5
|
+
---$
|
|
6
|
+
|
|
7
|
+
### 基础用法
|
|
8
|
+
|
|
9
|
+
- 属性`height`用于设置日历的高度,单位为`rpx`,默认`100%`
|
|
10
|
+
- 属性`showTitle`用于设置是否显示日历的标题,默认`true`
|
|
11
|
+
- 属性`title`用户设置日历的标题,默认`日期选择`
|
|
12
|
+
- 事件`confirm`用于监听用户点击确定按钮事件,参数为选中的日期数组
|
|
13
|
+
|
|
14
|
+
```html
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
const handleConfirm = (v: (string | number)[]) => {
|
|
17
|
+
toast.showToast({
|
|
18
|
+
title: '确定选择:' + v.join(' '),
|
|
19
|
+
icon: 'none',
|
|
20
|
+
duration: 1500,
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
<template>
|
|
25
|
+
<ste-calendar height="720" :showTitle="false" @confirm="handleConfirm" />
|
|
26
|
+
</template>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---$
|
|
30
|
+
|
|
31
|
+
### API
|
|
32
|
+
|
|
33
|
+
<!-- props -->
|
|
34
|
+
|
|
35
|
+
---$
|
|
36
|
+
{{xuyajun}}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { PropType } from 'vue';
|
|
2
|
+
export default {
|
|
3
|
+
Authorization: { type: String, default: () => 'Basic c2FiZXIzOnNhYmVyM19zZWNyZXQ=' },
|
|
4
|
+
BladeAuth: {
|
|
5
|
+
type: String,
|
|
6
|
+
default: () =>
|
|
7
|
+
'bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJibGFkZXguY24iLCJhdWQiOlsiYmxhZGV4Il0sInRva2VuX3R5cGUiOiJhY2Nlc3NfdG9rZW4iLCJjbGllbnRfaWQiOiJzYWJlcjMiLCJ0ZW5hbnRfaWQiOiI0ODI4MzEiLCJ1c2VyX2lkIjoiMTc3MjA5NjkzNjg3MjU3NDk3NyIsImRlcHRfaWQiOiIxNzcyMDk2OTM2MjcyNzg5NTA1IiwicG9zdF9pZCI6IjE3NzIwOTY5MzYzMTg5MjY4NTAiLCJyb2xlX2lkIjoiMTc3MjA5NjkzNTg5MTEwNzg0MiIsIm9hdXRoX2lkIjoiIiwiYWNjb3VudCI6ImFkbWluIiwidXNlcl9uYW1lIjoiYWRtaW4iLCJuaWNrX25hbWUiOiLnrqHnkIblkZgiLCJyZWFsX25hbWUiOiLnrqHnkIblkZgiLCJyb2xlX25hbWUiOiJhZG1pbiIsImRldGFpbCI6eyJ0eXBlIjoid2ViIiwiZGF0YVNjb3BlIjp7ImNoYWluQ2xpZW50SWQiOiIiLCJzdG9yZUlkIjoiIiwiY2hhbm5lbElkIjoiNjIwOTAxNyJ9fSwiZXhwIjoxNzYyOTEzNjQ4LCJuYmYiOjE3MzEzNzc2NDh9.WQMy9ixwsB3k3okaz8iEOgQJjHd2BRdTfRiAu6HSTSU',
|
|
8
|
+
},
|
|
9
|
+
};
|
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="update-mask flex-center">
|
|
3
|
+
<view class="content botton-radius">
|
|
4
|
+
<view class="content-top">
|
|
5
|
+
<view class="content-top-text">
|
|
6
|
+
<text class="">发现新版本 v{{ data.edition_name }}</text>
|
|
7
|
+
<text class="version">当前版本:{{ version }}</text>
|
|
8
|
+
</view>
|
|
9
|
+
<image class="content-top" style="top: 0" width="100%" height="100%" src="../../static/bg_top.png"></image>
|
|
10
|
+
</view>
|
|
11
|
+
<view class="content-header"></view>
|
|
12
|
+
<view class="content-body">
|
|
13
|
+
<view class="title"><text>更新内容</text></view>
|
|
14
|
+
<view class="body">
|
|
15
|
+
<scroll-view class="box-des-scroll" scroll-y="true"><rich-text :nodes="data.describe"></rich-text></scroll-view>
|
|
16
|
+
</view>
|
|
17
|
+
<view class="footer flex-center">
|
|
18
|
+
<view class="progress-box flex-column" v-if="!updateBtn">
|
|
19
|
+
<progress class="progress" border-radius="35" :percent="percent" activeColor="#3DA7FF" show-info stroke-width="10" />
|
|
20
|
+
<!-- <u-line-progress :striped="true" :percent="percent" :striped-active="true"></u-line-progress> -->
|
|
21
|
+
<view>
|
|
22
|
+
<text class="fs24">正在下载,请稍后 ({{ downloadedSize }}/{{ packageFileSize }}M)</text>
|
|
23
|
+
</view>
|
|
24
|
+
</view>
|
|
25
|
+
|
|
26
|
+
<button class="content-button" style="border: none; color: #fff" plain @click="confirm" v-if="updateBtn">立即升级</button>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|
|
29
|
+
|
|
30
|
+
<image v-if="cancleBtn" class="close-img" src="../../static/app_update_close.png" @click.stop="cancel"></image>
|
|
31
|
+
</view>
|
|
32
|
+
</view>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
export default {
|
|
37
|
+
props: {
|
|
38
|
+
data: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => ({
|
|
41
|
+
describe: '1. 修复已知问题<br>2. 优化用户体验',
|
|
42
|
+
edition_url: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-6bef1fe3-e3e3-4909-9f0c-6ed9bd11c93b/aae2360a-6628-4c93-b873-ce1600b9a852.apk', //安装包下载地址或者通用应用市场地址
|
|
43
|
+
edition_force: 1, //是否强制更新 0代表否 1代表是
|
|
44
|
+
package_type: 0, //0是整包升级 1是wgt升级
|
|
45
|
+
edition_name: '1.0.1', //后端返回的版本名称
|
|
46
|
+
}),
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
data() {
|
|
50
|
+
return {
|
|
51
|
+
version: '1.0.0', //当前运行版本(打包时manifest里的版本名称)
|
|
52
|
+
percent: 0, //进度条百分比
|
|
53
|
+
updateBtn: true, //是否显示立即更新
|
|
54
|
+
cancleBtn: false, //是否显示取消按钮
|
|
55
|
+
downloadedSize: 0, //当前已下载大小
|
|
56
|
+
packageFileSize: 0, //安装包大小
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
onHide() {
|
|
60
|
+
//解决应用切换到后台再次打开更新弹窗叠加多个的问题
|
|
61
|
+
// console.log('切换到后台');
|
|
62
|
+
this.data.edition_force = 0;
|
|
63
|
+
uni.navigateBack({
|
|
64
|
+
delta: 1,
|
|
65
|
+
});
|
|
66
|
+
},
|
|
67
|
+
onLoad({ obj }) {
|
|
68
|
+
this.data = JSON.parse(obj);
|
|
69
|
+
if (this.data.edition_force == 0) {
|
|
70
|
+
this.cancleBtn = true;
|
|
71
|
+
}
|
|
72
|
+
plus.runtime.getProperty(plus.runtime.appid, inf => {
|
|
73
|
+
this.version = inf.version;
|
|
74
|
+
});
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
onBackPress() {
|
|
78
|
+
// 强制更新不允许返回
|
|
79
|
+
if (this.data.edition_force == 1) {
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
methods: {
|
|
85
|
+
cancel() {
|
|
86
|
+
//取消升级 返回上一页
|
|
87
|
+
uni.navigateBack({
|
|
88
|
+
delta: 1,
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
confirm() {
|
|
92
|
+
if (this.data.package_type == 0) {
|
|
93
|
+
//apk整包升级 下载地址必须以.apk结尾
|
|
94
|
+
if (this.data.edition_url.includes('.apk')) {
|
|
95
|
+
this.updateBtn = false;
|
|
96
|
+
this.cancleBtn = false;
|
|
97
|
+
this.download();
|
|
98
|
+
} else {
|
|
99
|
+
//外部下载 一般是手机应用市场或者其他h5页面
|
|
100
|
+
this.data.edition_force = 0; // 解决跳转外部链接后,更新提示还在的问题
|
|
101
|
+
plus.runtime.openURL(this.data.edition_url);
|
|
102
|
+
uni.navigateBack({
|
|
103
|
+
delta: 1,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
this.updateBtn = false;
|
|
108
|
+
this.cancleBtn = false;
|
|
109
|
+
//wgt资源包升级 下载地址必须以.wgt结尾
|
|
110
|
+
this.download();
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
download() {
|
|
114
|
+
let package_type = this.data.package_type;
|
|
115
|
+
let that = this;
|
|
116
|
+
const downloadTask = uni.downloadFile({
|
|
117
|
+
url: this.data.edition_url,
|
|
118
|
+
success: res => {
|
|
119
|
+
if (res.statusCode === 200) {
|
|
120
|
+
plus.runtime.install(
|
|
121
|
+
res.tempFilePath,
|
|
122
|
+
{
|
|
123
|
+
force: true, //true表示强制安装,不进行版本号的校验;false则需要版本号校验,
|
|
124
|
+
},
|
|
125
|
+
function () {
|
|
126
|
+
// console.log('success', success);
|
|
127
|
+
if (package_type == 1) {
|
|
128
|
+
plus.runtime.restart();
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
function (e) {
|
|
132
|
+
//提示部分wgt包无法安装的问题
|
|
133
|
+
that.data.edition_force = 0;
|
|
134
|
+
uni.showToast({
|
|
135
|
+
title: e.message,
|
|
136
|
+
icon: 'none',
|
|
137
|
+
duration: 2500,
|
|
138
|
+
});
|
|
139
|
+
setTimeout(() => {
|
|
140
|
+
uni.navigateBack();
|
|
141
|
+
}, 2000);
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
if (package_type == 0) {
|
|
145
|
+
// 解决安装app点击取消,更新还在的问题
|
|
146
|
+
this.data.edition_force = 0;
|
|
147
|
+
uni.navigateBack();
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
});
|
|
152
|
+
// 进度条
|
|
153
|
+
downloadTask.onProgressUpdate(res => {
|
|
154
|
+
this.percent = res.progress;
|
|
155
|
+
this.downloadedSize = (res.totalBytesWritten / Math.pow(1024, 2)).toFixed(2);
|
|
156
|
+
this.packageFileSize = (res.totalBytesExpectedToWrite / Math.pow(1024, 2)).toFixed(2);
|
|
157
|
+
});
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
</script>
|
|
162
|
+
|
|
163
|
+
<style>
|
|
164
|
+
page {
|
|
165
|
+
background: transparent;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.flex-center {
|
|
169
|
+
/* #ifndef APP-NVUE */
|
|
170
|
+
display: flex;
|
|
171
|
+
/* #endif */
|
|
172
|
+
justify-content: center;
|
|
173
|
+
align-items: center;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.update-mask {
|
|
177
|
+
position: fixed;
|
|
178
|
+
left: 0;
|
|
179
|
+
top: 0;
|
|
180
|
+
right: 0;
|
|
181
|
+
bottom: 0;
|
|
182
|
+
background-color: rgba(0, 0, 0, 0.65);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.botton-radius {
|
|
186
|
+
border-bottom-left-radius: 30rpx;
|
|
187
|
+
border-bottom-right-radius: 30rpx;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.content {
|
|
191
|
+
position: relative;
|
|
192
|
+
top: 0;
|
|
193
|
+
width: 600rpx;
|
|
194
|
+
background-color: #fff;
|
|
195
|
+
box-sizing: border-box;
|
|
196
|
+
padding: 0 50rpx;
|
|
197
|
+
font-family: Source Han Sans CN;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.text {
|
|
201
|
+
/* #ifndef APP-NVUE */
|
|
202
|
+
display: block;
|
|
203
|
+
/* #endif */
|
|
204
|
+
line-height: 200px;
|
|
205
|
+
text-align: center;
|
|
206
|
+
color: #ffffff;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.content-top {
|
|
210
|
+
position: absolute;
|
|
211
|
+
top: -195rpx;
|
|
212
|
+
left: 0;
|
|
213
|
+
width: 600rpx;
|
|
214
|
+
height: 270rpx;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.content-top-text {
|
|
218
|
+
font-size: 40rpx;
|
|
219
|
+
font-weight: bold;
|
|
220
|
+
color: #f8f8fa;
|
|
221
|
+
position: absolute;
|
|
222
|
+
top: 120rpx;
|
|
223
|
+
left: 50rpx;
|
|
224
|
+
z-index: 1;
|
|
225
|
+
display: flex;
|
|
226
|
+
flex-direction: column;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.content-header {
|
|
230
|
+
height: 70rpx;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.title {
|
|
234
|
+
font-size: 33rpx;
|
|
235
|
+
font-weight: bold;
|
|
236
|
+
color: #3da7ff;
|
|
237
|
+
line-height: 38px;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.footer {
|
|
241
|
+
height: 150rpx;
|
|
242
|
+
display: flex;
|
|
243
|
+
align-items: center;
|
|
244
|
+
justify-content: space-around;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.box-des-scroll {
|
|
248
|
+
box-sizing: border-box;
|
|
249
|
+
padding: 0 40rpx;
|
|
250
|
+
text-align: left;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.box-des {
|
|
254
|
+
font-size: 26rpx;
|
|
255
|
+
color: #000000;
|
|
256
|
+
line-height: 50rpx;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.progress-box {
|
|
260
|
+
width: 100%;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.progress {
|
|
264
|
+
width: 83%;
|
|
265
|
+
height: 40rpx;
|
|
266
|
+
border-radius: 35px;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.close-img {
|
|
270
|
+
width: 70rpx;
|
|
271
|
+
height: 70rpx;
|
|
272
|
+
z-index: 1000;
|
|
273
|
+
position: absolute;
|
|
274
|
+
bottom: -120rpx;
|
|
275
|
+
left: calc(50% - 70rpx / 2);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.content-button {
|
|
279
|
+
text-align: center;
|
|
280
|
+
flex: 1;
|
|
281
|
+
font-size: 30rpx;
|
|
282
|
+
font-weight: 400;
|
|
283
|
+
color: #ffffff;
|
|
284
|
+
border-radius: 40rpx;
|
|
285
|
+
margin: 0 18rpx;
|
|
286
|
+
|
|
287
|
+
height: 80rpx;
|
|
288
|
+
line-height: 80rpx;
|
|
289
|
+
|
|
290
|
+
background: linear-gradient(to right, #1785ff, #3da7ff);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.flex-column {
|
|
294
|
+
display: flex;
|
|
295
|
+
flex-direction: column;
|
|
296
|
+
align-items: center;
|
|
297
|
+
}
|
|
298
|
+
.fs24 {
|
|
299
|
+
font-size: 24rpx;
|
|
300
|
+
}
|
|
301
|
+
.version {
|
|
302
|
+
font-size: 24rpx;
|
|
303
|
+
margin-top: 10rpx;
|
|
304
|
+
color: #eeeeee;
|
|
305
|
+
text-decoration: underline;
|
|
306
|
+
}
|
|
307
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ste-app-update",
|
|
3
|
+
"description": "按钮组件",
|
|
4
|
+
"example": "<ste-app-update></ste-app-update>",
|
|
5
|
+
"tutorial": "https://stellar-ui.intecloud.com.cn/plus/#/?active=app-update",
|
|
6
|
+
"attributes": [
|
|
7
|
+
{
|
|
8
|
+
"name": "title",
|
|
9
|
+
"description": "尺寸",
|
|
10
|
+
"type": "string",
|
|
11
|
+
"default": "日期选择"
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { watch, onMounted, computed, nextTick } from 'vue';
|
|
3
|
+
import propsData from './props';
|
|
4
|
+
import UniUpdate from './rt-uni-update.vue';
|
|
5
|
+
|
|
6
|
+
const props = defineProps(propsData);
|
|
7
|
+
|
|
8
|
+
interface Data {
|
|
9
|
+
id: number;
|
|
10
|
+
createUser: number;
|
|
11
|
+
createDept: number;
|
|
12
|
+
createTime: string;
|
|
13
|
+
updateUser: number;
|
|
14
|
+
updateTime: string;
|
|
15
|
+
status: number;
|
|
16
|
+
isDeleted: number;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
/** 应用id(关联inte_client表id字段) */
|
|
19
|
+
inteClientId: number;
|
|
20
|
+
/** 版本号 */
|
|
21
|
+
code: string;
|
|
22
|
+
/** 版本名称 */
|
|
23
|
+
name: string;
|
|
24
|
+
/** 版本说明 */
|
|
25
|
+
desc: string;
|
|
26
|
+
/** 版本更新内容 */
|
|
27
|
+
content: string;
|
|
28
|
+
/** 版本更新文件地址 */
|
|
29
|
+
updateFile: string;
|
|
30
|
+
/** 版本完整文件地址 */
|
|
31
|
+
entireFile: string;
|
|
32
|
+
/** 是否当前版本 */
|
|
33
|
+
isCurrent: true;
|
|
34
|
+
/** 是否强制更新 */
|
|
35
|
+
isForce: true;
|
|
36
|
+
/** 发布状态 TO_RELEASE待发布、RELEASED已发布 */
|
|
37
|
+
publishStatus: 'TO_RELEASE' | 'RELEASED';
|
|
38
|
+
createUserName: string;
|
|
39
|
+
updateUserName: string;
|
|
40
|
+
createDeptName: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
uni.request({
|
|
44
|
+
url: 'http://172.16.118.216:30043/blade-system/api/inte/client/ver/currentDetail',
|
|
45
|
+
method: 'GET',
|
|
46
|
+
header: {
|
|
47
|
+
Authorization: props.Authorization,
|
|
48
|
+
'Blade-Auth': props.BladeAuth,
|
|
49
|
+
},
|
|
50
|
+
success: (res: any) => {
|
|
51
|
+
const data: {
|
|
52
|
+
code: number;
|
|
53
|
+
success: boolean;
|
|
54
|
+
msg: string;
|
|
55
|
+
data: Data;
|
|
56
|
+
} = res.data;
|
|
57
|
+
if (data.code == 200) {
|
|
58
|
+
console.log(data.data);
|
|
59
|
+
} else {
|
|
60
|
+
console.log(data.msg);
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
</script>
|
|
65
|
+
<template>
|
|
66
|
+
<view class="ste-app-update-root">
|
|
67
|
+
<UniUpdate />
|
|
68
|
+
</view>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.ste-app-update-root {
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
| `zIndex` | 弹窗层级z-index | `number` | - | - | - |
|
|
13
13
|
| `type` | 下拉选项的形状 | `string` | `block` | `round`:圆形<br/>`block`:块状 | - |
|
|
14
14
|
| `max` | 可选数量 | `number` | `1` | - | - |
|
|
15
|
-
| `showPopup` | 是否显示菜单弹窗 | `boolean` | `false` | - | `1.21.0` |
|
|
16
15
|
|
|
17
16
|
|
|
18
17
|
#### Events
|
|
@@ -246,11 +246,11 @@
|
|
|
246
246
|
{
|
|
247
247
|
"name": "[event]click-suggest",
|
|
248
248
|
"description": "点击建议模块触发",
|
|
249
|
-
"type": "(type: 'method' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }) => void",
|
|
249
|
+
"type": "(type: 'method' | 'input' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }) => void",
|
|
250
250
|
"params": [
|
|
251
251
|
{
|
|
252
252
|
"name": "type",
|
|
253
|
-
"description": "点击的区域:`method`, `back`, `item`, `right`"
|
|
253
|
+
"description": "点击的区域:`method`, `input` ,`back`, `item`, `right`"
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
256
|
"name": "item",
|
|
@@ -19,7 +19,7 @@ const emits = defineEmits<{
|
|
|
19
19
|
(e: 'click', type: 'empty' | 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper'): void;
|
|
20
20
|
(e: 'plus', value: number | string, suspend: () => void, next: () => void, stop: () => void): void;
|
|
21
21
|
(e: 'minus', value: number | string, suspend: () => void, next: () => void, stop: () => void): void;
|
|
22
|
-
(e: 'click-suggest', type: 'method' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }): void;
|
|
22
|
+
(e: 'click-suggest', type: 'method' | 'input' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }): void;
|
|
23
23
|
(e: 'click-stepper-input'): void;
|
|
24
24
|
}>();
|
|
25
25
|
|
|
@@ -142,7 +142,7 @@ watch(
|
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
);
|
|
145
|
-
const clickSuggest = (type: 'method' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }) => {
|
|
145
|
+
const clickSuggest = (type: 'method' | 'input' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }) => {
|
|
146
146
|
if (type === 'method') {
|
|
147
147
|
showSuggestList.value = !showSuggestList.value;
|
|
148
148
|
}
|
|
@@ -248,9 +248,11 @@ const viewClass = computed(() => {
|
|
|
248
248
|
<view class="ste-goods-info-apply-for" v-if="suggesData.applyForText">
|
|
249
249
|
<view class="ste-goods-info-apply-for-text">{{ suggesData.applyForText }}:</view>
|
|
250
250
|
<view class="ste-goods-info-apply-for-number">
|
|
251
|
-
<
|
|
251
|
+
<view class="ste-goods-info-apply-for-input" @click.stop="clickSuggest('input')">
|
|
252
|
+
<input class="ste-goods-info-apply-for-input" :class="{ readonly: readonlySuggestInput }" v-model="suggesData.applyForNumber" />
|
|
253
|
+
</view>
|
|
252
254
|
<view class="ste-goods-info-apply-for-back" @click="clickSuggest('back')">
|
|
253
|
-
<ste-icon />
|
|
255
|
+
<ste-icon code="" size="16" />
|
|
254
256
|
</view>
|
|
255
257
|
</view>
|
|
256
258
|
</view>
|
|
@@ -408,10 +410,17 @@ const viewClass = computed(() => {
|
|
|
408
410
|
min-height: 30rpx;
|
|
409
411
|
font-size: 22rpx;
|
|
410
412
|
text-align: center;
|
|
413
|
+
&.readonly {
|
|
414
|
+
pointer-events: none;
|
|
415
|
+
}
|
|
411
416
|
}
|
|
412
417
|
.ste-goods-info-apply-for-back {
|
|
413
418
|
width: 32rpx;
|
|
414
419
|
border-left: 2rpx solid #e6e8ea;
|
|
420
|
+
display: flex;
|
|
421
|
+
align-items: center;
|
|
422
|
+
justify-content: center;
|
|
423
|
+
cursor: pointer;
|
|
415
424
|
}
|
|
416
425
|
}
|
|
417
426
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
| `marginRight` | 右外边距,单位rpx | `string / number` | `0` | - | - |
|
|
10
10
|
| `marginTop` | 上外边距,单位rpx | `string / number` | `0` | - | - |
|
|
11
11
|
| `marginBottom` | 下外边距,单位rpx | `string / number` | `0` | - | - |
|
|
12
|
-
| `fontFamily` | 字体名 | `string` |
|
|
12
|
+
| `fontFamily` | 字体名 | `string` | `` | - | - |
|
|
13
13
|
| `inlineBlock` | 容器对齐方式 | `boolean` | `true` | - | - |
|
|
14
14
|
|
|
15
15
|
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* #ifdef APP */
|
|
2
2
|
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
|
3
|
+
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
|
3
4
|
@font-face {
|
|
4
|
-
font-family: 'ste-iconfont-1709689042473';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
url('https://at.alicdn.com/t/c/
|
|
8
|
-
url('https://at.alicdn.com/t/c/
|
|
5
|
+
font-family: 'ste-iconfont-1709689042473'; /* Project id 4457057 */
|
|
6
|
+
src:
|
|
7
|
+
url('https://at.alicdn.com/t/c/font_4457057_74vgslmjyas.woff2?t=1749781466318') format('woff2'),
|
|
8
|
+
url('https://at.alicdn.com/t/c/font_4457057_74vgslmjyas.woff?t=1749781466318') format('woff'),
|
|
9
|
+
url('https://at.alicdn.com/t/c/font_4457057_74vgslmjyas.ttf?t=1749781466318') format('truetype');
|
|
9
10
|
}
|
|
10
|
-
|
|
11
11
|
/* #endif */
|
|
12
12
|
/* #ifndef APP */
|
|
13
13
|
/* 在线链接服务仅供平台体验和调试使用,平台不承诺服务的稳定性,企业客户需下载字体包自行发布使用并做好备份。 */
|
|
14
14
|
@font-face {
|
|
15
|
-
font-family: 'ste-iconfont-1709689042473';
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
url('//at.alicdn.com/t/c/
|
|
19
|
-
url('//at.alicdn.com/t/c/
|
|
15
|
+
font-family: 'ste-iconfont-1709689042473'; /* Project id 4457057 */
|
|
16
|
+
src:
|
|
17
|
+
url('//at.alicdn.com/t/c/font_4457057_74vgslmjyas.woff2?t=1749781466318') format('woff2'),
|
|
18
|
+
url('//at.alicdn.com/t/c/font_4457057_74vgslmjyas.woff?t=1749781466318') format('woff'),
|
|
19
|
+
url('//at.alicdn.com/t/c/font_4457057_74vgslmjyas.ttf?t=1749781466318') format('truetype');
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
/* #endif */
|
|
22
|
+
/* #endif */
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
@secondary-btn-click="handleClick"
|
|
95
95
|
@protocol-click="protocolClick"
|
|
96
96
|
@form-data-change="formDataChange"
|
|
97
|
+
@get-code="getCode"
|
|
97
98
|
/>
|
|
98
99
|
</view>
|
|
99
100
|
</template>
|
|
@@ -196,6 +197,16 @@
|
|
|
196
197
|
const protocolClick = (item: any) => {
|
|
197
198
|
console.log(item);
|
|
198
199
|
};
|
|
200
|
+
|
|
201
|
+
const getCode = (suspend: () => {}, next: () => {}) => {
|
|
202
|
+
suspend();
|
|
203
|
+
console.log('调用获取验证码接口');
|
|
204
|
+
|
|
205
|
+
setTimeout(() => {
|
|
206
|
+
console.log('验证码发送成功,开始倒计时');
|
|
207
|
+
next();
|
|
208
|
+
}, 2000);
|
|
209
|
+
};
|
|
199
210
|
</script>
|
|
200
211
|
```
|
|
201
212
|
|
|
@@ -112,8 +112,6 @@ const props = defineProps({
|
|
|
112
112
|
});
|
|
113
113
|
const emits = defineEmits(['update:modelValue', 'change', 'getCode']);
|
|
114
114
|
|
|
115
|
-
console.log('config is ', props.config);
|
|
116
|
-
|
|
117
115
|
const defaultConfig = {
|
|
118
116
|
placeholder: '请输入',
|
|
119
117
|
};
|
|
@@ -142,10 +140,28 @@ const handleChange = () => {
|
|
|
142
140
|
|
|
143
141
|
const defaultCountValue = 60;
|
|
144
142
|
let codeTimer: any;
|
|
145
|
-
const getCode = () => {
|
|
143
|
+
const getCode = async () => {
|
|
146
144
|
if (count.value > 0) return;
|
|
145
|
+
|
|
146
|
+
let next = true;
|
|
147
|
+
const stop = new Promise<void>((resolve, reject) => {
|
|
148
|
+
emits(
|
|
149
|
+
'getCode',
|
|
150
|
+
() => (next = false),
|
|
151
|
+
() => resolve(),
|
|
152
|
+
() => reject()
|
|
153
|
+
);
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
if (!next) {
|
|
157
|
+
try {
|
|
158
|
+
await stop;
|
|
159
|
+
} catch (e) {
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
147
164
|
count.value = defaultCountValue;
|
|
148
|
-
emits('getCode');
|
|
149
165
|
codeTimer = setInterval(() => {
|
|
150
166
|
if (count.value <= 0) {
|
|
151
167
|
clearInterval(codeTimer);
|
|
@@ -32,7 +32,7 @@ export const loginEmits = {
|
|
|
32
32
|
secondaryBtnClick: (item: BtnItem) => item,
|
|
33
33
|
tabChange: (item: BaseConfigItem) => item,
|
|
34
34
|
formDataChange: (data: Record<string, any>) => data,
|
|
35
|
-
getCode: () =>
|
|
35
|
+
getCode: (suspend: () => void, next: () => void, stop: () => void) => typeof suspend === 'function' && typeof next === 'function' && typeof stop === 'function',
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export default loginProps;
|