titles.vue 769 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <section class="head">
  3. <img src="~/static/img/back.png" alt @click="go">
  4. <span>{{tname}}</span>
  5. <!-- <nuxt-link :to="tolink">{{todos}}</nuxt-link> -->
  6. </section>
  7. </template>
  8. <script>
  9. export default {
  10. props: {
  11. tname: String, //定义传值的类型<br>
  12. // todos: String, //定义传值的类型<br>
  13. // tolink 这里有多个值,最好做成数组
  14. },
  15. mounted(){
  16. // 所有数据铺完了。。。忘记了
  17. },
  18. methods: {
  19. go(e) {
  20. this.$router.go(-1)
  21. }
  22. },
  23. watch: {}
  24. }
  25. </script>
  26. <style scoped lang="scss">
  27. .head {
  28. background-color: #fff;
  29. }
  30. .head img {
  31. float: left;
  32. padding-left: 6px;
  33. }
  34. .head span {
  35. width: auto;
  36. padding: 0;
  37. padding-right: 20px;
  38. }
  39. .head a{
  40. float: right;
  41. }
  42. </style>