viewToolNav.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template src="./viewToolNav.html">
  2. </template>
  3. <script>
  4. const util = require('@/static/utils/util.js');
  5. const config = require('@/static/config.js');
  6. import Bus from '@/common/bus';
  7. import commonMethod from '@/common/commonMethod.js';
  8. import requestConfig from '@/static/lib/requestConfig';
  9. // import bgLoading from "@/components/bgLoading/bgLoading.vue"
  10. // import { nextTick } from "vue";
  11. const app = getApp(); //获取应用实例
  12. export default {
  13. data: function() {
  14. return {
  15. title:"",
  16. }
  17. },
  18. props:{
  19. seedItem: {
  20. type: Object,
  21. default: {},
  22. },
  23. },
  24. watch: {
  25. seedItem: {
  26. handler(newVal) {
  27. if (newVal) {
  28. this.title = newVal.spaceName
  29. console.warn("***seedItem-change***",newVal)
  30. }
  31. },
  32. },
  33. },
  34. mounted() {//组件挂载时事件
  35. console.warn("***mounted-nav***",this.seedItem)
  36. if(this.seedItem){
  37. this.title = this.seedItem.spaceName;
  38. }
  39. },
  40. // 页面被展示时执行
  41. onPageShow: function() {
  42. },
  43. //页面被隐藏时执行
  44. onPageHide: function() {
  45. },
  46. methods:{
  47. navBack(){
  48. this.$emit("downCom");
  49. },
  50. }
  51. }
  52. </script>
  53. <style lang="css" scoped>
  54. @import "./viewToolNav.css";
  55. @import "@/common/css/common.css";
  56. </style>