index.vue 699 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <div class='full-height light-green-bg rounded-3xl min-h-4rem'>
  3. <el-button @click='push'>确定</el-button>
  4. </div>
  5. </template>
  6. <route>
  7. {
  8. path: '/',
  9. name: '首页',
  10. }
  11. </route>
  12. <script>
  13. import useCounterStore from '../../store/user.js'
  14. import tokenStore from '../../store/token.js'
  15. import { setToken } from '../../utils/auth.js'
  16. export default {
  17. setup () {
  18. const store = useCounterStore()
  19. const token = tokenStore()
  20. return { store, token }
  21. },
  22. created () {
  23. setToken('asfddas129rq34-rda')
  24. },
  25. methods: {
  26. push () {
  27. this.$router.push({ path: '/setting', query: { id: 12, type: 'test' } })
  28. }
  29. }
  30. }
  31. </script>
  32. <style scoped>
  33. </style>