1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| <template>
| <!-- template里只能有一个根节点 -->
| <div class="demo-page">
| <text class="title">{{text}}</text>
| </div>
| </template>
|
| <script>
| export default {
| private: {
| text: '欢迎打开详情页'
| },
| /**
| * 当用户点击菜单按钮时触发,调用app中定义的方法showMenu
| * 注意:使用加载器测试`创建桌面快捷方式`功能时,请先在`系统设置`中打开`应用加载器`的`桌面快捷方式`权限
| */
| onMenuPress() {
| this.$app.$def.showMenu()
| }
| }
| </script>
|
| <style>
| .demo-page {
| flex-direction: column;
| justify-content: center;
| align-items: center;
| width: 100%;
| }
|
| .title {
| font-size: 40px;
| text-align: center;
| }
| </style>
|
|