订单相关修改提测
This commit is contained in:
@@ -156,10 +156,10 @@
|
||||
type: {
|
||||
type: String,
|
||||
default: () => {
|
||||
// #ifdef MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
return '2d';
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
// #ifndef MP-WEIXIN || MP-ALIPAY
|
||||
return 'normal';
|
||||
// #endif
|
||||
}
|
||||
@@ -294,6 +294,7 @@
|
||||
},
|
||||
value: {
|
||||
handler() {
|
||||
console.log(this.auto)
|
||||
if (this.auto) {
|
||||
this.remake();
|
||||
}
|
||||
@@ -331,7 +332,7 @@
|
||||
this.templateOptions.canvasWidth = this.templateOptions.size;
|
||||
this.templateOptions.canvasHeight = this.templateOptions.size;
|
||||
if (this.canvasType == '2d') {
|
||||
// #ifndef MP-WEIXIN
|
||||
// #ifndef MP-WEIXIN || MP-ALIPAY
|
||||
this.templateOptions.canvasTransform = `scale(${this.templateOptions.size / this.templateOptions.canvasWidth}, ${this.templateOptions.size /
|
||||
this.templateOptions.canvasHeight})`;
|
||||
// #endif
|
||||
@@ -462,7 +463,7 @@
|
||||
let canvasContext = null;
|
||||
// #ifndef APP-NVUE
|
||||
if (this.canvasType === '2d') {
|
||||
// #ifdef MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
/* 微信小程序获取canvas2d上下文方式 */
|
||||
const canvas = (this.canvas = await new Promise(resolve => {
|
||||
uni
|
||||
@@ -502,7 +503,7 @@
|
||||
});
|
||||
});
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
// #ifndef MP-WEIXIN || MP-ALIPAY
|
||||
/* 非微信小程序不支持2d,切换回uniapp获取canvas上下文方式 */
|
||||
canvasContext = this.canvasContext = uni.createCanvasContext(this.canvasId, this);
|
||||
/* 使用dynamicSize,可以解决小块间出现白线问题,再通过scale缩放至size,使其达到所设尺寸 */
|
||||
@@ -752,7 +753,7 @@
|
||||
|
||||
// #ifndef APP-NVUE
|
||||
if (this.canvasType === '2d') {
|
||||
// #ifdef MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
try {
|
||||
let dataURL = null;
|
||||
// #ifdef VUE3
|
||||
@@ -831,7 +832,7 @@
|
||||
success: res => {
|
||||
// #ifndef H5
|
||||
if (this.canvasType === '2d') {
|
||||
// #ifdef MP-WEIXIN
|
||||
// #ifdef MP-WEIXIN || MP-ALIPAY
|
||||
/* 需要将 data:image/png;base64, 这段去除 writeFile 才能正常打开文件,否则是损坏文件,无法打开 */
|
||||
const reg = new RegExp('^data:image/png;base64,', 'g');
|
||||
const dataURL = res.tempFilePath.replace(reg, '');
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
:key="index"
|
||||
class="u-picker__view__column"
|
||||
>
|
||||
<text
|
||||
<view
|
||||
v-if="$u.test.array(item)"
|
||||
class="u-picker__view__column__item u-line-1"
|
||||
v-for="(item1, index1) in item"
|
||||
@@ -39,7 +39,7 @@
|
||||
lineHeight: $u.addUnit(itemHeight),
|
||||
fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal'
|
||||
}"
|
||||
>{{ getItemText(item1) }}</text>
|
||||
>{{ getItemText(item1) }}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
<view
|
||||
@@ -242,12 +242,13 @@ export default {
|
||||
&__view {
|
||||
|
||||
&__column {
|
||||
@include flex;
|
||||
@include flex(column);
|
||||
flex: 1;
|
||||
justify-content: center;
|
||||
|
||||
// flex-direction: column;
|
||||
&__item {
|
||||
@include flex;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: 16px;
|
||||
|
||||
Reference in New Issue
Block a user