微信小程序的數據綁定

微信小程序的數據綁定是單向綁定,是從js文件到wxml文件。 上代碼說明 新建一個dataBind頁面 dataBind.js // pages/dataBind/dataBind.js Page({ /** * 頁面的初始數據 */ data: { str1: "數據綁定測試1" }, /** * 生命週期函數--監聽頁面加載 */ onLoad: function (options) { },
相關文章
相關標籤/搜索