You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.1 KiB
51 lines
1.1 KiB
<template>
|
|
<!-- template里只能有一个根节点 -->
|
|
<div class="demo-page">
|
|
<text class="title">欢迎打开{{title}}</text>
|
|
<!-- 点击跳转详情页 -->
|
|
<input class="btn" type="button" value="跳转到详情页" @click="routeDetail" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import router from '@system.router'
|
|
|
|
export default {
|
|
// 页面级组件的数据模型,影响传入数据的覆盖机制:private内定义的属性不允许被覆盖
|
|
private: {
|
|
title: '示例页面'
|
|
},
|
|
methods: {
|
|
routeDetail () {
|
|
// 跳转到应用内的某个页面,router用法详见:文档->接口->页面路由
|
|
router.push ({
|
|
uri: '/DemoDetail'
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
.demo-page {
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 100%;
|
|
}
|
|
|
|
.title {
|
|
font-size: 40px;
|
|
text-align: center;
|
|
}
|
|
|
|
.btn {
|
|
width: 550px;
|
|
height: 86px;
|
|
margin-top: 75px;
|
|
border-radius: 43px;
|
|
background-color: #09ba07;
|
|
font-size: 30px;
|
|
color: #ffffff;
|
|
}
|
|
</style>
|
|
|