feat:完成自定义文字涂色卡
This commit is contained in:
@@ -26,7 +26,6 @@ Component({
|
||||
lifetimes: {
|
||||
attached() {
|
||||
const { platform } = wx.getDeviceInfo();
|
||||
console.log('platform:', platform);
|
||||
this.setData({
|
||||
platform,
|
||||
});
|
||||
@@ -53,6 +52,6 @@ Component({
|
||||
});
|
||||
},
|
||||
|
||||
preventScroll() {},
|
||||
preventScroll() { },
|
||||
},
|
||||
});
|
||||
|
||||
@@ -14,7 +14,7 @@ Component({
|
||||
type: Number,
|
||||
value: 0,
|
||||
},
|
||||
selectedWords: {
|
||||
cardList: {
|
||||
type: Array,
|
||||
value: [],
|
||||
},
|
||||
@@ -24,11 +24,18 @@ Component({
|
||||
*/
|
||||
data: {
|
||||
wordList: WORDS,
|
||||
selectedWords: [] as string[],
|
||||
},
|
||||
lifetimes: {
|
||||
ready() {
|
||||
},
|
||||
},
|
||||
observers: {
|
||||
cardList(newVal: CardList) {
|
||||
const selectedWords = newVal.map((item) => item.word);
|
||||
this.setData({ selectedWords });
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user