1. 程式人生 > >wepy - 與原生有什麽不同(單文件模式)

wepy - 與原生有什麽不同(單文件模式)

color round temp change hang inf app.js image family

小程序采用同文件夾(文件名),統一通過app.json來管理

技術分享圖片

而vue以及wepy采用的是單文件模式(js、html、css)合並在一起了!

wepy單文件模式

 1 <style>
 2   .ok{
 3     color: #fff;
 4   }
 5 </style>
 6 
 7 <template>
 8   <picker-view @change="bindChange" value="{{items}}">
 9     <picker-view-column>
10 <view wx:for="{{item}}">{{item}}</view> 11 </picker-view-column> 12 </picker-view> 13 </template> 14 15 <script> 16 17 import xxxxx from @/xx/xxx // alias example 18 19 export default { 20 21 } 22 </script>

wepy - 與原生有什麽不同(單文件模式)