個人作法是將 源碼下了下來, 源碼中將zanUI組件 用Wepy的文件類型 寫了出來 , 而後在項目中須要用到的那個,再添加進來,加以應用;css
步驟截圖 html
1: 在src下建立文件夾, 存放zanUI的樣式文件, helper.scss 與 common.scss 基礎樣式, 接着看本身用到什麼,就引入什麼, 好比要用 icon圖標, 就加入icon.scss樣式.前端
![](http://static.javashuo.com/static/loading.gif)
2: 入口處 app.wpy引入zanUI樣式文件, 注意 引入時結尾是 .wxss ;
![](http://static.javashuo.com/static/loading.gif)
在helper樣式文件中 引入其他的zanUI樣式
![](http://static.javashuo.com/static/loading.gif)
使用icon圖標 (使用按鈕樣式也是同樣的過程)
![](http://static.javashuo.com/static/loading.gif)
3: 使用zanUI組件中的佈局; 好比使用 zan-tab, 在src的components文件下 建立單獨文件夾, 存放tabBar佈局;
效果圖 zan-tab![](http://static.javashuo.com/static/loading.gif)
在頁面中使用時 import導入 ,
![](http://static.javashuo.com/static/loading.gif)
新手小白, 剛踏上前端路沒多久, 文章寫的不對的地方 多多指教,