qiantaoluyou/src/pages/index.vue
2022-03-08 14:52:34 +08:00

40 lines
817 B
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div style="width: 100%">
这是首页 <button @click="next">去下一页</button> <br />
用户名<input v-model="user1" type="text" name="user1" /><br />
账号<input v-model="user2" type="text" name="user2" /><br />
密码 <input v-model="user3" type="password" name="user3" />
</div>
</template>
<script>
export default {
name: "PageIndex",
data() {
return {
user: "",
user2: "",
user3: "",
}
},
methods: {
next() {
this.$router.push({
path: "user",
query: {
// 传入参数
canshu1: this.user1,
canshu2: this.user2,
canshu3: this.user3,
// 自定义传入参数
// canshu4: 123
},
});
}
}
}
</script>
<style scoped>
</style>