谁用过Hanz Writer,我再网页上正常没问题但是在微信小程序里不显示字背景方格也没有,用鼠标在屏幕应该显示字的区域乱画,控制台console.log输出正常,但就是不显示字,看生成的页面html代码没有生成svg标签
部分代码
onLoad: function (options) {
this.writerCtx = HanziWriterContext({
id: 'hz-writer',
character: '是',
page: this,
padding:20,
strokeColor: '#EE00FF'//偏旁部首颜色
});
// You can call any normal HanziWriter method here
console.log(this.writerCtx);
//this.writerCtx.showCharacter();
this.writerCtx.quiz({
onMistake: function(strokeData) {
console.log('Oh no! you made a mistake on stroke ' + strokeData.strokeNum);
console.log("You've made " + strokeData.mistakesOnStroke + " mistakes on this stroke so far");
console.log("You've made " + strokeData.totalMistakes + " total mistakes on this quiz");
console.log("There are " + strokeData.strokesRemaining + " strokes remaining in this character");
},
onCorrectStroke: function(strokeData) {
console.log('Yes!!! You got stroke ' + strokeData.strokeNum + ' correct!');
console.log('You made ' + strokeData.mistakesOnStroke + ' mistakes on this stroke');
console.log("You've made " + strokeData.totalMistakes + ' total mistakes on this quiz');
console.log('There are ' + strokeData.strokesRemaining + ' strokes remaining in this character');
},
onComplete: function(summaryData) {
console.log('You did it! You finished drawing ' + summaryData.character);
console.log('You made ' + summaryData.totalMistakes + ' total mistakes on this quiz');
}
});
下面这是生成的页面html代码