uview-plus 3.8.49 → 3.8.86
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/changelog.md +2043 -1827
- package/components/u-action-sheet/props.js +3 -1
- package/components/u-action-sheet/u-action-sheet.vue +1 -0
- package/components/u-album/props.js +3 -1
- package/components/u-alert/props.js +4 -2
- package/components/u-avatar/props.js +4 -1
- package/components/u-avatar-group/props.js +4 -1
- package/components/u-back-top/props.js +4 -1
- package/components/u-badge/props.js +4 -1
- package/components/u-barcode/u-barcode.vue +46 -15
- package/components/u-box/props.js +5 -2
- package/components/u-button/props.js +4 -1
- package/components/u-button/vue.scss +3 -3
- package/components/u-calendar/calendar.js +14 -2
- package/components/u-calendar/month.vue +41 -6
- package/components/u-calendar/props.js +63 -1
- package/components/u-calendar/u-calendar.vue +311 -2
- package/components/u-calendar-strip/props.js +3 -1
- package/components/u-canvas/u-canvas.vue +734 -423
- package/components/u-car-keyboard/props.js +3 -1
- package/components/u-card/props.js +3 -1
- package/components/u-cell/props.js +4 -1
- package/components/u-cell/u-cell.vue +1 -1
- package/components/u-cell-group/props.js +4 -1
- package/components/u-checkbox/props.js +4 -1
- package/components/u-checkbox/u-checkbox.vue +7 -3
- package/components/u-checkbox-group/props.js +3 -1
- package/components/u-circle-progress/props.js +4 -1
- package/components/u-code/props.js +4 -1
- package/components/u-code-input/props.js +4 -1
- package/components/u-col/props.js +4 -1
- package/components/u-collapse/props.js +4 -1
- package/components/u-collapse-item/props.js +4 -1
- package/components/u-color-picker/u-color-picker.vue +1 -0
- package/components/u-column-notice/props.js +4 -1
- package/components/u-count-down/props.js +4 -1
- package/components/u-count-to/props.js +4 -1
- package/components/u-cropper/u-cropper.vue +95 -51
- package/components/u-datetime-picker/props.js +4 -1
- package/components/u-divider/props.js +4 -1
- package/components/u-dragsort/u-dragsort.vue +2 -1
- package/components/u-dropdown/props.js +3 -1
- package/components/u-dropdown-item/props.js +3 -1
- package/components/u-empty/props.js +4 -1
- package/components/u-form/props.js +4 -1
- package/components/u-form-item/props.js +4 -1
- package/components/u-gap/props.js +4 -1
- package/components/u-grid/props.js +4 -1
- package/components/u-grid-item/props.js +4 -1
- package/components/u-guide/props.js +3 -1
- package/components/u-icon/props.js +4 -1
- package/components/u-icon/u-icon.vue +2 -2
- package/components/u-icon/upicon.ttf +0 -0
- package/components/u-icon/util.js +29 -7
- package/components/u-image/props.js +4 -1
- package/components/u-image/u-image.vue +280 -267
- package/components/u-index-anchor/props.js +4 -1
- package/components/u-index-item/props.js +2 -1
- package/components/u-index-list/props.js +4 -1
- package/components/u-input/props.js +3 -1
- package/components/u-input/u-input.vue +10 -1
- package/components/u-keyboard/props.js +4 -1
- package/components/u-line/props.js +4 -1
- package/components/u-line-progress/props.js +6 -3
- package/components/u-link/props.js +4 -1
- package/components/u-list/props.js +4 -1
- package/components/u-list-item/props.js +4 -1
- package/components/u-loading-icon/props.js +4 -1
- package/components/u-loading-page/props.js +3 -1
- package/components/u-loadmore/props.js +4 -1
- package/components/u-markdown/u-markdown.vue +45 -3
- package/components/u-modal/props.js +4 -1
- package/components/u-navbar/props.js +4 -2
- package/components/u-navbar/u-navbar.vue +15 -9
- package/components/u-no-network/props.js +4 -1
- package/components/u-notice-bar/props.js +4 -1
- package/components/u-notify/props.js +4 -1
- package/components/u-number-box/props.js +4 -1
- package/components/u-number-box/u-number-box.vue +2 -2
- package/components/u-number-keyboard/props.js +4 -1
- package/components/u-overlay/props.js +4 -1
- package/components/u-pagination/u-pagination.vue +60 -39
- package/components/u-parse/props.js +4 -1
- package/components/u-picker/props.js +4 -1
- package/components/u-picker/u-picker.vue +15 -0
- package/components/u-picker-column/props.js +3 -1
- package/components/u-popover/props.js +2 -1
- package/components/u-popup/props.js +4 -1
- package/components/u-poster/u-poster.vue +29 -14
- package/components/u-qrcode/qrcode.js +88 -87
- package/components/u-qrcode/u-qrcode.vue +138 -256
- package/components/u-radio/props.js +4 -1
- package/components/u-radio/u-radio.vue +7 -3
- package/components/u-radio-group/props.js +4 -1
- package/components/u-rate/props.js +4 -1
- package/components/u-read-more/props.js +4 -1
- package/components/u-row/props.js +4 -1
- package/components/u-row-notice/props.js +4 -1
- package/components/u-safe-bottom/props.js +2 -1
- package/components/u-scroll-list/props.js +4 -1
- package/components/u-search/props.js +3 -1
- package/components/u-skeleton/props.js +4 -1
- package/components/u-slider/props.js +3 -1
- package/components/u-slider/u-slider.vue +70 -28
- package/components/u-status-bar/props.js +4 -1
- package/components/u-steps/props.js +4 -1
- package/components/u-steps-item/props.js +4 -1
- package/components/u-sticky/props.js +4 -1
- package/components/u-sticky/u-sticky.vue +11 -0
- package/components/u-subsection/props.js +3 -1
- package/components/u-swipe-action/props.js +4 -1
- package/components/u-swipe-action-item/props.js +4 -1
- package/components/u-swipe-action-item/u-swipe-action-item.vue +14 -0
- package/components/u-swiper/props.js +9 -1
- package/components/u-swiper/swiper.js +1 -0
- package/components/u-swiper/u-swiper.vue +2 -0
- package/components/u-swiper-indicator/props.js +4 -1
- package/components/u-switch/props.js +4 -1
- package/components/u-tabbar/props.js +3 -1
- package/components/u-tabbar-item/props.js +4 -1
- package/components/u-table/props.js +3 -1
- package/components/u-table2/tableRow.vue +155 -69
- package/components/u-table2/u-table2.vue +328 -140
- package/components/u-tabs/props.js +4 -1
- package/components/u-tabs-item/props.js +3 -1
- package/components/u-tag/props.js +4 -1
- package/components/u-td/props.js +3 -1
- package/components/u-text/props.js +4 -1
- package/components/u-textarea/props.js +3 -1
- package/components/u-textarea/u-textarea.vue +16 -5
- package/components/u-th/props.js +3 -1
- package/components/u-toolbar/props.js +4 -1
- package/components/u-tooltip/props.js +10 -2
- package/components/u-tooltip/tooltip.js +2 -1
- package/components/u-tooltip/u-tooltip.vue +31 -3
- package/components/u-tr/props.js +3 -1
- package/components/u-transition/nvue-ani-map.js +75 -68
- package/components/u-transition/props.js +4 -1
- package/components/u-transition/transitionMixin.js +164 -163
- package/components/u-upload/props.js +4 -1
- package/components/u-upload/u-upload.vue +47 -40
- package/components/u-waterfall/u-waterfall.vue +50 -51
- package/index.js +65 -8
- package/libs/config/props.js +179 -204
- package/libs/css/components.scss +3 -0
- package/libs/function/uni-api-shims.js +29 -0
- package/libs/i18n/index.js +71 -36
- package/libs/i18n/locale-packs.js +11 -0
- package/libs/i18n/locales/all.js +23 -0
- package/libs/i18n/locales/{de.json → de.js} +1 -1
- package/libs/i18n/locales/{en.json → en.js} +2 -2
- package/libs/i18n/locales/{es.json → es.js} +1 -1
- package/libs/i18n/locales/{fr.json → fr.js} +2 -2
- package/libs/i18n/locales/{ja.json → ja.js} +1 -1
- package/libs/i18n/locales/{ko.json → ko.js} +1 -1
- package/libs/i18n/locales/{ru.json → ru.js} +1 -1
- package/libs/i18n/locales/{th.json → th.js} +1 -1
- package/libs/i18n/locales/{zh-Hans.json → zh-Hans.js} +1 -1
- package/libs/i18n/locales/{zh-Hant.json → zh-Hant.js} +1 -1
- package/libs/mixin/mixin.js +14 -4
- package/libs/util/gcanvas/bridge/bridge-weex.js +10 -5
- package/package.json +4 -5
- package/tsconfig.json +18 -0
- package/types/comps/calendar.d.ts +57 -0
- package/types/comps/checkbox.d.ts +12 -0
- package/types/comps/lineProgress.d.ts +5 -0
- package/types/comps/navbar.d.ts +3 -3
- package/types/comps/swiper.d.ts +5 -0
- package/types/comps/tooltip.d.ts +36 -1
- /package/components/u-markdown/{marked.esm.js → marked.esm.mjs} +0 -0
|
@@ -1032,9 +1032,10 @@ let QRCode = {};
|
|
|
1032
1032
|
pdground: '#000000',
|
|
1033
1033
|
image: '',
|
|
1034
1034
|
imageSize: 30,
|
|
1035
|
-
canvasId: opt.canvasId,
|
|
1036
|
-
ctx: opt.ctx,
|
|
1037
|
-
|
|
1035
|
+
canvasId: opt.canvasId,
|
|
1036
|
+
ctx: opt.ctx,
|
|
1037
|
+
canvasHost: opt.canvasHost,
|
|
1038
|
+
isNvue: opt.isNvue,
|
|
1038
1039
|
vuectx: opt.vuectx,
|
|
1039
1040
|
usingComponents: opt.usingComponents,
|
|
1040
1041
|
showLoading: opt.showLoading,
|
|
@@ -1126,11 +1127,7 @@ let QRCode = {};
|
|
|
1126
1127
|
count: count,
|
|
1127
1128
|
options: options
|
|
1128
1129
|
});
|
|
1129
|
-
|
|
1130
|
-
ctx.setFillStyle(isDark ? foreground : options.background);
|
|
1131
|
-
} else {
|
|
1132
|
-
ctx.fillStyle = isDark ? foreground : options.background;
|
|
1133
|
-
}
|
|
1130
|
+
setFillStyle(ctx, isDark ? foreground : options.background);
|
|
1134
1131
|
ctx.fillRect(Math.round(col * tileW), Math.round(row * tileH), w, h);
|
|
1135
1132
|
}
|
|
1136
1133
|
}
|
|
@@ -1138,19 +1135,12 @@ let QRCode = {};
|
|
|
1138
1135
|
var x = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
|
|
1139
1136
|
var y = Number(((ratioSize - ratioImgSize) / 2).toFixed(2));
|
|
1140
1137
|
drawRoundedRect(ctx, x, y, ratioImgSize, ratioImgSize, 2, 6, true, true)
|
|
1141
|
-
options.vuectx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
|
|
1142
|
-
// 画圆角矩形
|
|
1143
|
-
function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
ctxi.setStrokeStyle(options.background);
|
|
1148
|
-
}
|
|
1149
|
-
else {
|
|
1150
|
-
ctxi.lineWidth = lineWidth;
|
|
1151
|
-
ctxi.fillStyle = options.background;
|
|
1152
|
-
ctxi.strokeStyle = options.background;
|
|
1153
|
-
}
|
|
1138
|
+
await options.vuectx.drawImage(options.image, x, y, ratioImgSize, ratioImgSize);
|
|
1139
|
+
// 画圆角矩形
|
|
1140
|
+
function drawRoundedRect(ctxi, x, y, width, height, r, lineWidth, fill, stroke) {
|
|
1141
|
+
setLineWidth(ctxi, lineWidth);
|
|
1142
|
+
setFillStyle(ctxi, options.background);
|
|
1143
|
+
setStrokeStyle(ctxi, options.background);
|
|
1154
1144
|
ctxi.beginPath(); // draw top and top right corner
|
|
1155
1145
|
ctxi.moveTo(x + r, y);
|
|
1156
1146
|
ctxi.lineTo(x + width, y); // move to top-right corner
|
|
@@ -1176,60 +1166,50 @@ let QRCode = {};
|
|
|
1176
1166
|
}
|
|
1177
1167
|
setTimeout(() => {
|
|
1178
1168
|
// canvas2 绘制是自动的不需要手动绘制
|
|
1179
|
-
if(options.isNvue || isApp){
|
|
1180
|
-
|
|
1181
|
-
// 保存到临时区域
|
|
1182
|
-
setTimeout(() => {
|
|
1183
|
-
if (options.
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
options.width,
|
|
1188
|
-
options.height,
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
options.cbResult(res)
|
|
1224
|
-
}
|
|
1225
|
-
},
|
|
1226
|
-
complete: function () {
|
|
1227
|
-
uni.hideLoading();
|
|
1228
|
-
},
|
|
1229
|
-
}, options.vuectx);
|
|
1230
|
-
}
|
|
1231
|
-
}, options.text.length + 100);
|
|
1232
|
-
});
|
|
1169
|
+
if(options.isNvue || isApp){
|
|
1170
|
+
const exportCode = () => {
|
|
1171
|
+
// 保存到临时区域
|
|
1172
|
+
setTimeout(() => {
|
|
1173
|
+
if (options.canvasHost && typeof options.canvasHost.toTempFilePath === 'function') {
|
|
1174
|
+
options.canvasHost.toTempFilePath({
|
|
1175
|
+
width: options.width || options.size,
|
|
1176
|
+
height: options.height || options.size,
|
|
1177
|
+
destWidth: options.width || options.size,
|
|
1178
|
+
destHeight: options.height || options.size,
|
|
1179
|
+
quality: Number(1),
|
|
1180
|
+
success: function (res) {
|
|
1181
|
+
if (options.cbResult) {
|
|
1182
|
+
if (!empty(res.tempFilePath)) {
|
|
1183
|
+
options.cbResult(res.tempFilePath)
|
|
1184
|
+
} else if (!empty(res.apFilePath)) {
|
|
1185
|
+
options.cbResult(res.apFilePath)
|
|
1186
|
+
} else {
|
|
1187
|
+
options.cbResult(res.tempFilePath)
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
},
|
|
1191
|
+
fail: function (res) {
|
|
1192
|
+
console.log('绘制失败', res)
|
|
1193
|
+
if (options.cbResult) {
|
|
1194
|
+
options.cbResult(res)
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
complete: function () {
|
|
1198
|
+
uni.hideLoading();
|
|
1199
|
+
},
|
|
1200
|
+
}).catch(function(res) {
|
|
1201
|
+
console.log('绘制失败', res)
|
|
1202
|
+
});
|
|
1203
|
+
}
|
|
1204
|
+
}, options.text.length + 100);
|
|
1205
|
+
};
|
|
1206
|
+
if (options.canvasHost && typeof options.canvasHost.draw === 'function') {
|
|
1207
|
+
options.canvasHost.draw(true, exportCode);
|
|
1208
|
+
} else if (ctx && typeof ctx.draw === 'function') {
|
|
1209
|
+
ctx.draw(true, exportCode);
|
|
1210
|
+
} else {
|
|
1211
|
+
exportCode();
|
|
1212
|
+
}
|
|
1233
1213
|
}
|
|
1234
1214
|
else{
|
|
1235
1215
|
options.cbResult("")
|
|
@@ -1239,7 +1219,7 @@ let QRCode = {};
|
|
|
1239
1219
|
}
|
|
1240
1220
|
createCanvas(this.options);
|
|
1241
1221
|
// 空判定
|
|
1242
|
-
let empty = function (v) {
|
|
1222
|
+
let empty = function (v) {
|
|
1243
1223
|
let tp = typeof v,
|
|
1244
1224
|
rt = false;
|
|
1245
1225
|
if (tp == "number" && String(v) == "") {
|
|
@@ -1253,17 +1233,38 @@ let QRCode = {};
|
|
|
1253
1233
|
} else if (tp == "function") {
|
|
1254
1234
|
rt = false
|
|
1255
1235
|
}
|
|
1256
|
-
return rt
|
|
1257
|
-
}
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1236
|
+
return rt
|
|
1237
|
+
}
|
|
1238
|
+
function setFillStyle(ctx, value) {
|
|
1239
|
+
if (ctx && typeof ctx.setFillStyle === 'function') {
|
|
1240
|
+
ctx.setFillStyle(value);
|
|
1241
|
+
} else if (ctx) {
|
|
1242
|
+
ctx.fillStyle = value;
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
function setStrokeStyle(ctx, value) {
|
|
1246
|
+
if (ctx && typeof ctx.setStrokeStyle === 'function') {
|
|
1247
|
+
ctx.setStrokeStyle(value);
|
|
1248
|
+
} else if (ctx) {
|
|
1249
|
+
ctx.strokeStyle = value;
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
function setLineWidth(ctx, value) {
|
|
1253
|
+
if (ctx && typeof ctx.setLineWidth === 'function') {
|
|
1254
|
+
ctx.setLineWidth(value);
|
|
1255
|
+
} else if (ctx) {
|
|
1256
|
+
ctx.lineWidth = value;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
};
|
|
1260
|
+
QRCode.prototype.clear = function (fn) {
|
|
1261
|
+
if (this.options.canvasHost && typeof this.options.canvasHost.clearCanvas === 'function') {
|
|
1262
|
+
this.options.canvasHost.clearCanvas()
|
|
1263
|
+
if (fn) fn()
|
|
1264
|
+
return
|
|
1265
|
+
}
|
|
1266
|
+
var ctx = this.options.ctx;
|
|
1267
|
+
ctx.clearRect(0, 0, this.options.size, this.options.size)
|
|
1267
1268
|
ctx.draw(false, () => {
|
|
1268
1269
|
if (fn) {
|
|
1269
1270
|
fn()
|