123456789101112131415161718192021222324252627282930313233343536373839 |
- // import {Toast} from "vant";
- export default {
- methods: {
- goTopic(id) {
- this.$router.push({
- name: 'topic-detail',
- params: {
- id
- }
- })
- },
- /**
- * @description '路由跳转'
- * @param {String} name 跳转的路由name
- * @param {Object} params 跳转参数
- * @param {String} type 跳转方式,可选值:push|replace 默认push
- *
- */
- goNavigator(name, params, type = 'push') {
- if(name){
- if (type === 'push') {
- this.$router.push({
- name,
- params
- })
- } else {
- this.$router.replace({
- name,
- params
- })
- }
- }else{
- alert('建设中,敬请期待...')
- }
- }
- }
- }
|