uview-plus 3.6.29 → 3.7.0
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/README.md +20 -5
- package/changelog.md +312 -0
- package/components/u-album/album.js +1 -1
- package/components/u-avatar/avatar.js +4 -4
- package/components/u-avatar-group/avatarGroup.js +4 -4
- package/components/u-back-top/backtop.js +4 -4
- package/components/u-badge/badge.js +4 -4
- package/components/u-button/button.js +4 -4
- package/components/u-calendar/calendar.js +4 -4
- package/components/u-canvas/u-canvas.vue +146 -0
- package/components/u-car-keyboard/carKeyboard.js +4 -4
- package/components/u-cascader/u-cascader.vue +19 -10
- package/components/u-cate-tab/u-cate-tab.vue +14 -4
- package/components/u-cell/cell.js +4 -4
- package/components/u-cell-group/cellGroup.js +4 -4
- package/components/u-checkbox/checkbox.js +4 -4
- package/components/u-checkbox-group/checkboxGroup.js +4 -4
- package/components/u-circle-progress/circleProgress.js +4 -4
- package/components/u-code/code.js +3 -3
- package/components/u-code-input/codeInput.js +4 -4
- package/components/u-col/col.js +4 -4
- package/components/u-collapse/collapse.js +4 -4
- package/components/u-collapse-item/collapseItem.js +4 -4
- package/components/u-column-notice/columnNotice.js +4 -4
- package/components/u-count-down/countDown.js +4 -4
- package/components/u-count-to/countTo.js +4 -4
- package/components/u-cropper/u-cropper.vue +6 -3
- package/components/u-datetime-picker/datetimePicker.js +4 -4
- package/components/u-divider/divider.js +4 -4
- package/components/u-dragsort/u-dragsort.vue +85 -72
- package/components/u-empty/empty.js +4 -4
- package/components/u-form/form.js +4 -4
- package/components/u-form-item/formItem.js +4 -4
- package/components/u-gap/gap.js +4 -4
- package/components/u-grid/grid.js +4 -4
- package/components/u-grid/u-grid.vue +1 -1
- package/components/u-grid-item/gridItem.js +4 -4
- package/components/u-icon/icon.js +4 -4
- package/components/u-image/image.js +4 -4
- package/components/u-index-anchor/indexAnchor.js +4 -4
- package/components/u-index-list/indexList.js +4 -4
- package/components/u-input/input.js +1 -1
- package/components/u-input/u-input.vue +5 -2
- package/components/u-keyboard/keyboard.js +4 -4
- package/components/u-line/line.js +4 -4
- package/components/u-line-progress/lineProgress.js +4 -4
- package/components/u-link/link.js +4 -4
- package/components/u-list/list.js +4 -4
- package/components/u-list/u-list.vue +4 -1
- package/components/u-list-item/listItem.js +4 -4
- package/components/u-loading-icon/loadingIcon.js +4 -4
- package/components/u-loading-page/loadingPage.js +4 -4
- package/components/u-loadmore/loadmore.js +4 -4
- package/components/u-modal/modal.js +5 -5
- package/components/u-navbar/navbar.js +4 -4
- package/components/u-no-network/noNetwork.js +4 -4
- package/components/u-no-network/u-no-network.vue +7 -3
- package/components/u-notice-bar/noticeBar.js +4 -4
- package/components/u-notify/notify.js +4 -4
- package/components/u-number-box/numberBox.js +4 -4
- package/components/u-number-keyboard/numberKeyboard.js +4 -4
- package/components/u-overlay/overlay.js +4 -4
- package/components/u-parse/props.js +1 -1
- package/components/u-picker/picker.js +4 -4
- package/components/u-picker/props.js +4 -0
- package/components/u-picker/u-picker.vue +1 -1
- package/components/u-popup/popup.js +4 -4
- package/components/u-qrcode/qrcode.js +17 -67
- package/components/u-qrcode/u-qrcode.vue +178 -85
- package/components/u-radio/radio.js +4 -4
- package/components/u-radio-group/radioGroup.js +3 -3
- package/components/u-rate/rate.js +4 -4
- package/components/u-read-more/readMore.js +4 -4
- package/components/u-row/row.js +4 -4
- package/components/u-row-notice/rowNotice.js +4 -4
- package/components/u-scroll-list/scrollList.js +4 -4
- package/components/u-search/search.js +7 -5
- package/components/u-search/u-search.vue +2 -2
- package/components/u-section/section.js +4 -4
- package/components/u-select/u-select.vue +4 -1
- package/components/u-signature/u-signature.vue +1 -0
- package/components/u-skeleton/skeleton.js +4 -4
- package/components/u-slider/slider.js +4 -4
- package/components/u-status-bar/statusBar.js +4 -4
- package/components/u-steps/steps.js +4 -4
- package/components/u-steps/u-steps.vue +1 -1
- package/components/u-steps-item/stepsItem.js +4 -4
- package/components/u-sticky/sticky.js +4 -4
- package/components/u-subsection/subsection.js +4 -4
- package/components/u-swipe-action/swipeAction.js +4 -4
- package/components/u-swipe-action-item/swipeActionItem.js +4 -4
- package/components/u-swiper/swiper.js +4 -4
- package/components/u-swiper-indicator/swipterIndicator.js +4 -4
- package/components/u-switch/switch.js +4 -4
- package/components/u-tabbar/tabbar.js +4 -4
- package/components/u-tabbar-item/tabbarItem.js +4 -4
- package/components/u-tabs/tabs.js +4 -4
- package/components/u-tag/tag.js +4 -4
- package/components/u-text/text.js +4 -4
- package/components/u-textarea/textarea.js +4 -4
- package/components/u-toast/toast.js +4 -4
- package/components/u-toolbar/toolbar.js +4 -4
- package/components/u-tooltip/tooltip.js +4 -4
- package/components/u-transition/transition.js +4 -4
- package/components/u-upload/upload.js +4 -4
- package/libs/function/index.js +9 -4
- package/libs/util/gcanvas/bridge/bridge-weex.js +2 -1
- package/libs/util/gcanvas/env/image.js +24 -16
- package/package.json +2 -2
- package/types/comps/radio.d.ts +6 -2
- package/types/func.d.ts +317 -0
- package/types/index.d.ts +73 -105
- package/components/u-scroll-list/other.js +0 -0
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
}"
|
|
8
8
|
@longpress="longpress">
|
|
9
9
|
<view class="u-qrcode__content" @click="preview">
|
|
10
|
-
|
|
11
|
-
<!-- #ifndef APP-NVUE || APP-PLUS -->
|
|
10
|
+
<!-- #ifdef MP || H5 -->
|
|
12
11
|
<canvas
|
|
13
12
|
class="u-qrcode__canvas"
|
|
14
13
|
:id="cid"
|
|
@@ -25,17 +24,12 @@
|
|
|
25
24
|
:style="{ width: sizeLocal + unit, height: sizeLocal + unit }" />
|
|
26
25
|
<!-- #endif -->
|
|
27
26
|
|
|
28
|
-
<!-- #ifdef APP-PLUS -->
|
|
29
|
-
<canvas
|
|
30
|
-
class="u-qrcode__canvas"
|
|
31
|
-
:id="cid"
|
|
32
|
-
:canvas-id="cid"
|
|
33
|
-
:style="{ width: sizeLocal + unit, height: sizeLocal + unit }" />
|
|
34
|
-
<!-- #endif -->
|
|
35
|
-
|
|
36
27
|
<!-- #ifdef APP-NVUE -->
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
<web-view v-if="icon != ''" ref="web" src="/static/app-plus/up-canvas/local.html"
|
|
29
|
+
:style="'width:' + sizeLocal + 'px;height:' + sizeLocal + 'px'"
|
|
30
|
+
@onPostMessage="_onMessage" />
|
|
31
|
+
<gcanvas v-else class="u-qrcode__canvas" ref="gcanvess"
|
|
32
|
+
:style="{ width: sizeLocal + unit, height: sizeLocal + unit }">
|
|
39
33
|
</gcanvas>
|
|
40
34
|
<!-- #endif -->
|
|
41
35
|
<view v-if="showLoading && loading" class="u-qrcode__loading"
|
|
@@ -49,20 +43,27 @@
|
|
|
49
43
|
|
|
50
44
|
<script>
|
|
51
45
|
import QRCode from "./qrcode.js"
|
|
46
|
+
import { sleep } from '../../libs/function/index';
|
|
52
47
|
// #ifdef APP-NVUE
|
|
53
48
|
// https://github.com/dcloudio/NvueCanvasDemo/blob/master/README.md
|
|
54
49
|
import {
|
|
55
50
|
enable,
|
|
56
|
-
WeexBridge
|
|
51
|
+
WeexBridge,
|
|
52
|
+
Image as GImage
|
|
57
53
|
} from '../../libs/util/gcanvas/index.js';
|
|
54
|
+
import { nextTick } from "vue";
|
|
58
55
|
// #endif
|
|
59
56
|
let qrcode
|
|
57
|
+
// 20260201不能在data中存储canvas,否则会导致在微信小程序getContext获取不到canvas对象报错Cannot read property 'type'
|
|
58
|
+
let canvas = null
|
|
60
59
|
export default {
|
|
61
60
|
name: "u-qrcode",
|
|
62
61
|
props: {
|
|
63
62
|
cid: {
|
|
64
63
|
type: String,
|
|
65
|
-
default: () =>
|
|
64
|
+
default: () => {
|
|
65
|
+
return `u-qrcode-canvas${Math.floor(Math.random() * 1000000)}`
|
|
66
|
+
}
|
|
66
67
|
},
|
|
67
68
|
size: {
|
|
68
69
|
type: Number,
|
|
@@ -147,11 +148,10 @@ export default {
|
|
|
147
148
|
],
|
|
148
149
|
rootId: `rootId${Number(Math.random() * 100).toFixed(0)}`,
|
|
149
150
|
ganvas: null,
|
|
150
|
-
context: '',
|
|
151
151
|
canvasObj: {},
|
|
152
152
|
sizeLocal: this.size,
|
|
153
|
-
ctx: null,
|
|
154
|
-
|
|
153
|
+
ctx: null,
|
|
154
|
+
_ready: false
|
|
155
155
|
}
|
|
156
156
|
},
|
|
157
157
|
async mounted(){
|
|
@@ -159,17 +159,18 @@ export default {
|
|
|
159
159
|
if(this.useRootHeightAndWidth){
|
|
160
160
|
await this.setNewSize()
|
|
161
161
|
}
|
|
162
|
+
canvas = await this.getCanvasNode(this.cid)
|
|
162
163
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
164
|
+
if (!canvas) return
|
|
165
|
+
// #ifdef MP
|
|
166
|
+
// 不清楚是小程序的bug还是什么原因,canvas的node节点宽高和设置的宽高不一致 重新设置下
|
|
167
|
+
canvas.width = this.sizeLocal
|
|
168
|
+
canvas.height = this.sizeLocal
|
|
169
|
+
// #endif
|
|
170
|
+
// #ifdef APP-PLUS-NVUE
|
|
171
|
+
this.isNvue = true
|
|
172
|
+
// #endif
|
|
173
|
+
this.ctx = this.getUPCanvasContext('2d')
|
|
173
174
|
|
|
174
175
|
if (this.loadMake) {
|
|
175
176
|
if (!this._empty(this.val)) {
|
|
@@ -182,31 +183,52 @@ export default {
|
|
|
182
183
|
}
|
|
183
184
|
},
|
|
184
185
|
methods: {
|
|
186
|
+
_onMessage(e) {
|
|
187
|
+
// console.log('post message', e)
|
|
188
|
+
const message = e.detail.data[0]
|
|
189
|
+
switch (message.action) {
|
|
190
|
+
// web-view 初始化完毕
|
|
191
|
+
case 'onJSBridgeReady':
|
|
192
|
+
this._ready = true
|
|
193
|
+
this.$refs.web.evalJs('setContent('+JSON.stringify(this.$props) +')')
|
|
194
|
+
break
|
|
195
|
+
// qrcodeOk
|
|
196
|
+
case 'qrcodeOk':
|
|
197
|
+
this._result(message.imageData)
|
|
198
|
+
// this.$emit('load')
|
|
199
|
+
break
|
|
200
|
+
}
|
|
201
|
+
},
|
|
185
202
|
_makeCode() {
|
|
186
203
|
let that = this
|
|
204
|
+
if (!canvas) return
|
|
187
205
|
if (!this._empty(this.val)) {
|
|
188
206
|
// #ifndef APP-NVUE
|
|
189
207
|
this.loading = true
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
// #endif
|
|
209
|
+
// nvue下时因为gcanvas的GImage不生效,因此icon模式会采用webview
|
|
210
|
+
if ((this.icon == '' && that.isNvue) || !that.isNvue) {
|
|
211
|
+
qrcode = new QRCode({
|
|
212
|
+
vuectx: that, // 上下文环境
|
|
213
|
+
canvasId: that.cid, // canvas-id
|
|
214
|
+
ctx: that.ctx,
|
|
215
|
+
isNvue: that.isNvue,
|
|
216
|
+
usingComponents: that.usingComponents, // 是否是自定义组件
|
|
217
|
+
showLoading: false, // 是否显示loading
|
|
218
|
+
loadingText: that.loadingText, // loading文字
|
|
219
|
+
text: that.val, // 生成内容
|
|
220
|
+
size: that.sizeLocal, // 二维码大小
|
|
221
|
+
background: that.background, // 背景色
|
|
222
|
+
foreground: that.foreground, // 前景色
|
|
223
|
+
pdground: that.pdground, // 定位角点颜色
|
|
224
|
+
correctLevel: that.lv, // 容错级别
|
|
225
|
+
image: that.icon, // 二维码图标
|
|
226
|
+
imageSize: that.iconSize,// 二维码图标大小
|
|
227
|
+
cbResult: function (res) { // 生成二维码的回调
|
|
228
|
+
that._result(res)
|
|
229
|
+
},
|
|
230
|
+
});
|
|
231
|
+
}
|
|
210
232
|
} else {
|
|
211
233
|
uni.showToast({
|
|
212
234
|
title: '二维码内容不能为空',
|
|
@@ -232,7 +254,25 @@ export default {
|
|
|
232
254
|
});
|
|
233
255
|
}
|
|
234
256
|
});
|
|
235
|
-
}
|
|
257
|
+
} else {
|
|
258
|
+
this.toTempFilePath({
|
|
259
|
+
success: res => {
|
|
260
|
+
that.result = res.tempFilePath
|
|
261
|
+
uni.saveImageToPhotosAlbum({
|
|
262
|
+
filePath: that.result,
|
|
263
|
+
success: function () {
|
|
264
|
+
uni.showToast({
|
|
265
|
+
title: '二维码保存成功',
|
|
266
|
+
icon: 'success',
|
|
267
|
+
duration: 2000
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
fail: err => {
|
|
273
|
+
}
|
|
274
|
+
})
|
|
275
|
+
}
|
|
236
276
|
},
|
|
237
277
|
preview(e) {
|
|
238
278
|
// 预览图片
|
|
@@ -261,7 +301,7 @@ export default {
|
|
|
261
301
|
}, e)
|
|
262
302
|
},
|
|
263
303
|
async toTempFilePath({success, fail}) {
|
|
264
|
-
if (this.
|
|
304
|
+
if (this.ct) {
|
|
265
305
|
this.ctx.toTempFilePath(
|
|
266
306
|
0,
|
|
267
307
|
0,
|
|
@@ -277,13 +317,13 @@ export default {
|
|
|
277
317
|
);
|
|
278
318
|
}
|
|
279
319
|
else {
|
|
280
|
-
// #ifdef
|
|
320
|
+
// #ifdef H5
|
|
281
321
|
success({
|
|
282
322
|
tempFilePath: this.ctx.canvas.toDataURL("image/png", 1)
|
|
283
323
|
})
|
|
284
324
|
// #endif
|
|
285
325
|
|
|
286
|
-
// #
|
|
326
|
+
// #ifndef H5
|
|
287
327
|
uni.canvasToTempFilePath(
|
|
288
328
|
{
|
|
289
329
|
canvasId: this.cid,
|
|
@@ -294,19 +334,6 @@ export default {
|
|
|
294
334
|
},
|
|
295
335
|
this)
|
|
296
336
|
// #endif
|
|
297
|
-
|
|
298
|
-
// #ifndef MP-TOUTIAO || H5 || APP-PLUS
|
|
299
|
-
const canvas = await this.getNode(this.cid,true);
|
|
300
|
-
uni.canvasToTempFilePath(
|
|
301
|
-
{
|
|
302
|
-
canvas,
|
|
303
|
-
success :res => {
|
|
304
|
-
success(res)
|
|
305
|
-
},
|
|
306
|
-
fail: fail
|
|
307
|
-
},
|
|
308
|
-
this)
|
|
309
|
-
// #endif
|
|
310
337
|
}
|
|
311
338
|
},
|
|
312
339
|
async longpress() {
|
|
@@ -324,7 +351,7 @@ export default {
|
|
|
324
351
|
* @return {Promise<void>}
|
|
325
352
|
*/
|
|
326
353
|
async setNewSize(){
|
|
327
|
-
const rootNode = await this.
|
|
354
|
+
const rootNode = await this.getCanvasNode(this.rootId, false);
|
|
328
355
|
const { width , height } = rootNode;
|
|
329
356
|
// 将最短的设置为二维码 的size
|
|
330
357
|
if(width > height){
|
|
@@ -341,27 +368,93 @@ export default {
|
|
|
341
368
|
* @param isCanvas 是否为Canvas节点
|
|
342
369
|
* @return {Promise<unknown>}
|
|
343
370
|
*/
|
|
344
|
-
async
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
371
|
+
async getCanvasNode(id, isCanvas = true) {
|
|
372
|
+
let that = this
|
|
373
|
+
return new Promise((resolve, reject) => {
|
|
374
|
+
try {
|
|
375
|
+
// #ifdef APP-NVUE
|
|
376
|
+
setTimeout(() => {
|
|
377
|
+
/*获取元素引用*/
|
|
378
|
+
this.ganvas = this.$refs["gcanvess"]
|
|
379
|
+
/*通过元素引用获取canvas对象*/
|
|
380
|
+
let canvasNode = enable(this.ganvas, {
|
|
381
|
+
bridge: WeexBridge
|
|
382
|
+
})
|
|
383
|
+
resolve(canvasNode)
|
|
384
|
+
}, 200)
|
|
385
|
+
// #endif
|
|
386
|
+
// #ifndef APP-PLUS-NVUE
|
|
387
|
+
const query = uni.createSelectorQuery().in(that).select(`#${id}`);
|
|
388
|
+
query.fields({
|
|
389
|
+
node: true,
|
|
390
|
+
size: true
|
|
391
|
+
})
|
|
392
|
+
.exec((res) => {
|
|
393
|
+
if (isCanvas) {
|
|
394
|
+
if (res[0]?.node) {
|
|
395
|
+
resolve(res[0].node)
|
|
396
|
+
} else {
|
|
397
|
+
resolve(false)
|
|
398
|
+
console.error("获取节点出错", res)
|
|
399
|
+
}
|
|
400
|
+
} else {
|
|
401
|
+
resolve(res[0])
|
|
402
|
+
}
|
|
403
|
+
})
|
|
404
|
+
// #endif
|
|
405
|
+
} catch (e) {
|
|
406
|
+
console.error("获取节点失败", e)
|
|
407
|
+
}
|
|
408
|
+
})
|
|
364
409
|
},
|
|
410
|
+
getUPCanvasContext() {
|
|
411
|
+
// #ifdef APP-PLUS
|
|
412
|
+
return uni.createCanvasContext(this.cid, this);
|
|
413
|
+
// #endif
|
|
414
|
+
// #ifdef APP-PLUS-NVUE || MP || H5
|
|
415
|
+
return canvas.getContext('2d');
|
|
416
|
+
// #endif
|
|
417
|
+
},
|
|
418
|
+
drawImage(url, x, y, w, h) {
|
|
419
|
+
try {
|
|
420
|
+
let img = {}
|
|
421
|
+
// #ifdef APP-NVUE
|
|
422
|
+
img = new GImage();
|
|
423
|
+
// #endif
|
|
424
|
+
|
|
425
|
+
// #ifdef H5
|
|
426
|
+
// APP下不支持会一直卡住
|
|
427
|
+
img = new Image();
|
|
428
|
+
// #endif
|
|
429
|
+
|
|
430
|
+
// #ifdef MP
|
|
431
|
+
// 小程序2d
|
|
432
|
+
// https://developers.weixin.qq.com/miniprogram/dev/api/canvas/Canvas.createImage.html
|
|
433
|
+
img = canvas.createImage();
|
|
434
|
+
// #endif
|
|
435
|
+
// #ifdef APP-NVUE
|
|
436
|
+
let that = this
|
|
437
|
+
// console.log(img)
|
|
438
|
+
img.onload = function(){
|
|
439
|
+
if (process.env.NODE_ENV === 'development') {
|
|
440
|
+
console.log('drawImage绘制2...')
|
|
441
|
+
}
|
|
442
|
+
that.cxt.drawImage(img, x, y, w, h);
|
|
443
|
+
}
|
|
444
|
+
// #endif
|
|
445
|
+
// #ifdef H5 || MP
|
|
446
|
+
img.onload = () => {
|
|
447
|
+
this.ctx.drawImage(img, x, y, w, h);
|
|
448
|
+
};
|
|
449
|
+
// #endif
|
|
450
|
+
img.src = url;
|
|
451
|
+
// #ifdef APP-VUE
|
|
452
|
+
this.ctx.drawImage(url, x, y, w, h);
|
|
453
|
+
// #endif
|
|
454
|
+
} catch (error) {
|
|
455
|
+
console.log('drawImage绘制出错', error)
|
|
456
|
+
}
|
|
457
|
+
},
|
|
365
458
|
|
|
366
459
|
selectClick(index) {
|
|
367
460
|
switch (index) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/radio.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// radio组件
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
6
|
* @LastAuthor : CPS
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/radioGroup.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// radio-group组件
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-18 22:43:09
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/rate.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// rate组件
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/readMore.js
|
|
9
9
|
*/
|
|
10
10
|
import { t } from '../../libs/i18n'
|
|
11
11
|
export default {
|
package/components/u-row/row.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/row.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// row
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/rowNotice.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// rowNotice
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/scrollList.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// scrollList
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/search.js
|
|
9
9
|
*/
|
|
10
10
|
import { t } from '../../libs/i18n'
|
|
11
11
|
export default {
|
|
@@ -34,6 +34,8 @@ export default {
|
|
|
34
34
|
value: '',
|
|
35
35
|
maxlength: '-1',
|
|
36
36
|
height: 32,
|
|
37
|
-
label: null
|
|
37
|
+
label: null,
|
|
38
|
+
adjustPosition: true,
|
|
39
|
+
autoBlur: true
|
|
38
40
|
}
|
|
39
41
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
</view>
|
|
31
31
|
<input
|
|
32
32
|
confirm-type="search"
|
|
33
|
-
@blur="
|
|
33
|
+
@blur="blurFunc"
|
|
34
34
|
:value="keyword"
|
|
35
35
|
@confirm="search"
|
|
36
36
|
@input="inputChange"
|
|
@@ -220,7 +220,7 @@
|
|
|
220
220
|
this.$emit('focus', this.keyword);
|
|
221
221
|
},
|
|
222
222
|
// 失去焦点
|
|
223
|
-
|
|
223
|
+
blurFunc() {
|
|
224
224
|
// 最开始使用的是监听图标@touchstart事件,自从hx2.8.4后,此方法在微信小程序出错
|
|
225
225
|
// 这里改为监听点击事件,手点击清除图标时,同时也发生了@blur事件,导致图标消失而无法点击,这里做一个延时
|
|
226
226
|
setTimeout(() => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/section.js
|
|
9
9
|
*/
|
|
10
10
|
import { t } from '../../libs/i18n'
|
|
11
11
|
export default {
|
|
@@ -46,9 +46,12 @@
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
48
|
<script>
|
|
49
|
+
import { mpMixin } from '../../libs/mixin/mpMixin';
|
|
50
|
+
import { mixin } from '../../libs/mixin/mixin';
|
|
49
51
|
import { getWindowInfo } from '../../libs/function/index';
|
|
50
52
|
export default {
|
|
51
53
|
name:"up-select",
|
|
54
|
+
mixins: [mpMixin, mixin],
|
|
52
55
|
emits: ['update:current', 'select'],
|
|
53
56
|
props: {
|
|
54
57
|
maxHeight: {
|
|
@@ -155,7 +158,6 @@ export default {
|
|
|
155
158
|
let wi = getWindowInfo();
|
|
156
159
|
let windowWidth = wi.windowWidth;
|
|
157
160
|
this.$uGetRect('.u-select__options__wrap').then(rect => {
|
|
158
|
-
console.log(rect)
|
|
159
161
|
if (rect.left + rect.width > windowWidth) {
|
|
160
162
|
// 如果右侧被遮挡,则调整到左侧
|
|
161
163
|
this.optionsWrapLeft = 'auto';
|
|
@@ -216,3 +218,4 @@ export default {
|
|
|
216
218
|
}
|
|
217
219
|
}
|
|
218
220
|
</style>
|
|
221
|
+
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/skeleton.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// skeleton
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/slider.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// slider组件
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/statusBar.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// statusBar
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* @Author : LQ
|
|
3
3
|
* @Description :
|
|
4
|
-
* @version :
|
|
4
|
+
* @version : 3.0
|
|
5
5
|
* @Date : 2021-08-20 16:44:21
|
|
6
|
-
* @LastAuthor :
|
|
7
|
-
* @lastTime :
|
|
8
|
-
* @FilePath : /
|
|
6
|
+
* @LastAuthor : jry
|
|
7
|
+
* @lastTime : 2025-12-19 08:55:21
|
|
8
|
+
* @FilePath : /uview-plus/libs/config/props/steps.js
|
|
9
9
|
*/
|
|
10
10
|
export default {
|
|
11
11
|
// steps组件
|