wepy - 与原生有什么不同(单文件模式)

小程序采用同文件夹(文件名),统一通过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>

 

posted @ 2018-10-27 19:47  Sunsin  阅读(339)  评论(0编辑  收藏  举报