一. 小程序中無法使用vue中那樣的對一個點擊事件進行傳參, 我們需要獲取一些標簽的內容就比較
麻煩, 需要借助data屬相定義個參數, 通過data屬相定義的可以通過e.target.dataset來獲取值.
js文件內的取值: var prop = e.target.dataset['prop']
頁面中用法: <input data-prop='值' bindinput='處理的函數名'/>
bindinput方法是小程序提供的方法,用來指定對象事件的執行函數,
當input框值有變時觸發執行.
data-xx是固定語法, 使用該形式定義的屬相可被e.target.dataset獲取到.