1
0
forked from dyf/APP

018A初步完成

This commit is contained in:
liub
2026-04-14 15:19:05 +08:00
parent d82ae6445e
commit 01ff9c7a05
43 changed files with 2626 additions and 892 deletions

View File

@ -33,7 +33,7 @@
<image v-if="item.icon" :src="item.icon" mode="aspectFit"></image>
</view>
<text>{{ item.text }}</text>
<text class="itemTxt">{{ item.text }}</text>
</view>
@ -139,6 +139,9 @@
</script>
<style>
.itemTxt{
text-indent: 20rpx;
}
.message-popup {
position: relative;
display: none;

View File

@ -135,30 +135,42 @@
},
methods: {
getTypeStyle(styleType) {
debugger;
const styles = {
success: {
bgColor: '#f0fff0',
borderColor: '#52c41a',
bgColor: '#383934cc',
borderColor: '#52c41a4d',
textColor: '#389e0d',
buttonBgColor: '#52c41a',
buttonTextColor: '#FFFFFF'
},
error: {
bgColor: '#fff0f0',
borderColor: '#ff4d4f',
bgColor: '#383934cc',
borderColor: '#ff4d4f4d',
textColor: '#cf1322',
buttonBgColor: '#ff4d4f',
buttonTextColor: '#FFFFFF'
},
info: {
bgColor: '#e6f7ff',
bgColor: '#383934cc',
borderColor: '#1890ff',
textColor: '#0050b3',
buttonBgColor: '#1890ff',
buttonTextColor: '#FFFFFF'
},
customer:{
bgColor: '#383934cc',
borderColor: '#52c41a4d',
textColor: '#389e0d',
buttonBgColor: '#52c41a',
buttonTextColor: '#232323de'
}
}
return styles[this.type][styleType]
let f= styles[this.type];
if(f){
return f[styleType];
}
},
handleButtonClick() {

View File

@ -140,25 +140,28 @@
icoUrl: '/static/images/common/uploadErr.png',
borderColor: "#e034344d",
buttonBgColor: "#E03434",
bgColor:'#38393466',
bgColor:'#383934cc',
buttonTextColor:'#FFFFFFde'
},
succ: {
icoUrl: '/static/images/common/success.png',
borderColor: "#BBE6004d",
buttonBgColor: "#BBE600",
bgColor:'#38393466'
buttonTextColor:'#232323de',
bgColor:'#383934cc'
},
warn: {
icoUrl: '/static/images/common/warning.png',
borderColor: "#FFC84E4d",
buttonBgColor: "#FFC84E",
bgColor:'#38393466'
buttonTextColor:'#FFFFFFde',
bgColor:'#383934cc'
},
info:{
borderColor: "#BBE6004d",
buttonBgColor: "#BBE600",
bgColor:'#38393466'
bgColor:'#383934cc',
buttonTextColor:'#232323de'
},
prompt:{

View File

@ -29,7 +29,7 @@
},
currentCanvasWidth: {
type: Number,
default: 80
default: 96
},
currentCanvasHeight: {
type: Number,
@ -147,22 +147,10 @@
let a = imageData[k + 3];
// if (r === 255 && a >= 0) {
// r = 255;
// } else {
// r = 0;
// }
// if (r === 255) {
// tmpArr.push(1);
// } else {
// tmpArr.push(0);
// }
// 黑色像素R值较低视为1白色视为0
let isBlack = r < 128;
// let isBlack = r < 128;
let gray = (r + g + b) / 3;
let isBlack = gray < 255 ;
let byte1 = 0;
@ -216,7 +204,7 @@
ctx.setTextBaseline('middle');
// ctx.setTextAlign('center')
ctx.setFontSize(this.fontSize);
ctx.font = `${this.fontSize}px "PingFangBold", "PingFang SC", Arial, sans-serif`;
ctx.font = `${this.fontSize}px "PingFang SC","PingFangBold", Arial, sans-serif`;
// 4. 绘制当前行文本
let currentX = 0;

View File

@ -167,7 +167,7 @@
ctx.setTextBaseline('middle');
// ctx.setTextAlign('center')
ctx.setFontSize(this.fontSize);
ctx.font = `${this.fontSize}px "PingFangBold", "PingFang SC", Arial, sans-serif`;
ctx.font = `${this.fontSize}px "PingFang SC","PingFangBold", Arial, sans-serif`;
// 4. 绘制当前行文本
let currentX = 0;

View File

@ -171,7 +171,7 @@
ctx.setTextBaseline('middle');
// ctx.setTextAlign('center')
ctx.setFontSize(this.fontSize);
ctx.font = `${this.fontSize}px PingFangBold", "PingFang SC", Arial, sans-serif`;
ctx.font = `${this.fontSize}px "PingFang SC",PingFangBold", Arial, sans-serif`;
// 4. 绘制当前行文本
let currentX = 0;