1. 微信小程序開發知識點
1.1. 公共引用
1.1.1. 公共 wxss
??在app.wxss文件下寫入組件樣式,也可使用import方式應用單獨公共樣式,避免了每個頁面單獨引用。
@import "./public/wxss/base.wxss";
1.1.2. 公共組件
??在app.json文件下寫入組件,避免了每個頁面單獨引用。
"usingComponents": {"cu-custom": "/ui/components/cu-custom"},
??頁面組件使用。
<view class='cu-custom'><view class="cu-bar fixed bg-shadeTop" style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;"><navigator class='action' open-type="navigateBack" delta="1" hover-class="none"><text class='cuIcon-back'></text> 返回</navigator><view class='content' style='top:{{StatusBar}}px;'>Tab索引</view></view>
</view>