feat:完成自定义文字涂色卡
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"backgroundColor": "#F6F6F6",
|
||||
"enablePullDownRefresh": false,
|
||||
"usingComponents": {
|
||||
"van-cell": "@vant/weapp/cell/index",
|
||||
"van-icon": "@vant/weapp/icon/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"word-input": "../../components/word-input/word-input",
|
||||
|
||||
@@ -10,12 +10,13 @@ Page({
|
||||
textDrawService: null as TextDrawService | null,
|
||||
|
||||
data: {
|
||||
cardList: [] as Array<{ color: string; word: string }>,
|
||||
cardList: [] as CardList,
|
||||
showColorPopup: false,
|
||||
currentKey: 0,
|
||||
currentColor: '',
|
||||
showIntroductionPopup: false,
|
||||
showSelectWordPopup: false, // 选择文字弹窗
|
||||
env: getApp().globalData.env || 'release',
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
@@ -345,4 +346,10 @@ Page({
|
||||
this.setData({ showSelectWordPopup: false });
|
||||
this.drawCanvas(cardList);
|
||||
},
|
||||
|
||||
onDebugEntryTap() {
|
||||
wx.navigateTo({
|
||||
url: '/pages/debug/debug',
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
style="width:{{boxWidth}}px;height:{{boxHeight}}px" />
|
||||
</view>
|
||||
</view>
|
||||
<van-cell
|
||||
is-link
|
||||
title="debug页面"
|
||||
link-type="navigateTo"
|
||||
url="/pages/debug/debug" />
|
||||
<view class="empty"></view>
|
||||
<color-picker
|
||||
show="{{showColorPopup}}"
|
||||
@@ -78,7 +83,7 @@
|
||||
bind:onChange="onChangeColor" />
|
||||
<word-picker
|
||||
show="{{showSelectWordPopup}}"
|
||||
selectedWords="{{selectedWords}}"
|
||||
cardList="{{cardList}}"
|
||||
bind:onClose="closeSelectWordPopup"
|
||||
bind:onChange="onChangeWord" />
|
||||
</view>
|
||||
@@ -92,14 +97,6 @@
|
||||
icon-class-prefix="toy-icon">
|
||||
下载打印
|
||||
</toy-button>
|
||||
<!-- <toy-button
|
||||
type="green"
|
||||
width="680rpx"
|
||||
disabled="{{cardList.length <= 0}}"
|
||||
icon="download"
|
||||
icon-class-prefix="toy-icon">
|
||||
下载打印
|
||||
</toy-button> -->
|
||||
</view>
|
||||
<introduction-popup
|
||||
wx:if="{{showIntroductionPopup}}"
|
||||
|
||||
Reference in New Issue
Block a user