feat:base64字体格式

This commit is contained in:
2025-06-11 07:15:46 +08:00
parent 13a0afe97e
commit ed0ca16e7e
31 changed files with 552 additions and 5667 deletions
+11 -31
View File
@@ -10,6 +10,7 @@ Page({
data: {
cardList: [] as Array<{ color: string; word: string }>,
showPopup: false,
},
onReady() {
@@ -30,37 +31,6 @@ Page({
.exec();
},
// renderCanvas() {
// // wx.nextTick(() => {
// // this.setCanvasBoxSize();
// // });
// console.log('this.boxWidth:', this.boxWidth);
// console.log('this.boxHeight:', this.boxHeight);
// if (this.boxWidth && this.boxHeight) {
// this.initCanvas(this.boxWidth, this.boxHeight);
// }
// },
// setCanvasBoxSize() {
// const { windowWidth } = wx.getWindowInfo();
// console.log('windowWidth---:', windowWidth);
// const query = wx.createSelectorQuery();
// query
// .select('#canvasWrapper')
// .boundingClientRect((rect) => {
// if (rect) {
// const boxWidth = rect.width;
// const boxHeight = boxWidth / (width / height);
// console.log('boxWidth----:', boxWidth);
// console.log('boxHeight----:', boxHeight);
// this.initCanvas(boxHeight, boxWidth);
// }
// })
// .exec();
// },
initCanvas(boxWidth: number, boxHeight: number) {
wx.createSelectorQuery()
.select('#canvasContent')
@@ -150,4 +120,14 @@ Page({
return;
}
},
onClickColor(e: WechatMiniprogram.CustomEvent) {
const { key, word, color } = e.detail;
console.log('onClickColor key:', key, 'word:', word, 'color:', color);
this.setData({ showPopup: true });
},
onClosePopup() {
this.setData({ showPopup: false });
},
});