Commit 1b03442f by LinChengbiao

readme update

parent e1d86260
...@@ -21,24 +21,26 @@ ...@@ -21,24 +21,26 @@
* `src/pages/temp.wpy` 文件为页面模板文件,新建页面直接复制这个然后修改就可以了。(一般情况下,改成如下形式就可以自由添加内容了) * `src/pages/temp.wpy` 文件为页面模板文件,新建页面直接复制这个然后修改就可以了。(一般情况下,改成如下形式就可以自由添加内容了)
```javascript ```javascript
// 假如文件名是 test.wpy 则改成如下形式
<template> <template>
<view class="{文件名}Wpy"> <view class="testWpy">
{文件名} test
</view> </view>
</template> </template>
<script> <script>
import wepy from 'wepy' import wepy from 'wepy'
export default class {文件名首字母大写} extends wepy.page { export default class Test extends wepy.page {
onLoad () { onLoad () {
console.log('{文件名}') console.log('test')
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.{文件名}Wpy{} .testWpy{}
</style> </style>
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment