How to bind existing variables to fillText in Mini Program canvas?

when I got the two variables ss1 and the array Human, bound in fitttext, they showed me the code directly.

.fillText ("{this.data.human[ SS1] .operations}", 20,10)

how to bind?

Oct.22,2021

when you write this, you directly draw a string of'{this.data.humanity [SS1]. Curly}'. Just remove the quotation marks and curly braces.


es6 template string, .fillText (`${this.data.humanss1] .string}`, 20,10)


Direct context.fillText (this.data.tips, 1062)

Menu