小程式學習 day1

2022-07-03 01:54:11 字數 1611 閱讀 8306

先介紹下小程式的目錄結構

1、icon:我是用來存icon素材

js:存放js檔案的地方;

json:寫頁面全域性樣式的地方;

wxml:類似html/vue 寫頁面標籤的地方;

wxss:類似css 寫頁面樣式的地方;

我這裡新建的四個頁面。cat god index panda

panda.js 相關學習

//

pages/panda/panda.js

page(,

list:[

, , ]},

//輸入input事件的執行邏輯

handleinput(e) )

},//

輸入input事件的執行邏輯

handletap(e) )

},/*

* * 生命週期函式--監聽頁面載入

*/onload: function (options) ,

/** * 生命週期函式--監聽頁面初次渲染完成

*/onready: function () ,

/** * 生命週期函式--監聽頁面顯示

*/onshow: function () ,

/** * 生命週期函式--監聽頁面隱藏

*/onhide: function () ,

/** * 生命週期函式--監聽頁面解除安裝

*/onunload: function () ,

/** * 頁面相關事件處理函式--監聽使用者下拉動作

*/onpulldownrefresh: function () ,

/** * 頁面上拉觸底事件的處理函式

*/onreachbottom: function () ,

/** * 使用者點選右上角分享

*/}})

panda.wxml 頁面標籤

pages/panda/panda.wxml

view}}

}}}}

}迴圈for="

}" wx:key="

id">}---------------}

for="

}" wx:key="

age">}---------------}

判斷if="

}"> true

if="

}"> 1

"}"> 2

else> 3

if="

}">

view1

view2

"handleinput

"/>

"handletap

" data-operation="

}">+

"handletap

" data-operation="

}">-

}

panda.wxss:樣式

樣式。。。。還不會

**改變世界!

學習日記 Day1

for 迴圈變數型別 迴圈變數名稱 要被遍歷的物件 迴圈體 int c for int a c 廣播的動態註冊 過程總結 1.定義乙個intentfiler和乙個繼承broadcastreceiver的內部類 receiver 2.在oncreate中例項1中的2個定義。intentfiler新增個...

英語學習Day1

單詞 cast sb in sth 選演員扮演某個角色 underdog 劣勢方,弱者 debilitated 使衰弱,使削弱 bitter 艱苦的 churn out 快速,大批量的生產 successive 接連不斷的 high caliber 高質量的 might make right 強權就...

網頁學習 day1

初始準備 write some function write a titie write a article write some button button function寫法 function name 用法 out name 換行 something 或something 在換行的基礎上再隔...