@tongfun/tf-widget 0.1.12 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -74,16 +74,16 @@ import TfRotateBox from './tf-rotate-box.vue'
74
74
  import TfRightMenu from './tf-right-menu'
75
75
  export default {
76
76
  name: 'TfLaberBar',
77
- params: {
77
+ components: {
78
+ TfRotateBox,
79
+ TfRightMenu
80
+ },
81
+ props: {
78
82
  routeBase: {
79
83
  default: null,
80
84
  type: String
81
85
  }
82
86
  },
83
- components: {
84
- TfRotateBox,
85
- TfRightMenu
86
- },
87
87
  data () {
88
88
  return {
89
89
  closeMenu: false,
@@ -97,6 +97,7 @@ export default {
97
97
  watch: {
98
98
  $route: {
99
99
  handler: function (newValue) {
100
+ console.log(this.routeBase)
100
101
  if (newValue && newValue.matched[0]?.meta.base === this.routeBase) {
101
102
  const { meta, path, name, params, query } = newValue
102
103
  if (!path) return
@@ -6,7 +6,7 @@
6
6
  />
7
7
  <div class="tf-layout-subject">
8
8
  <TfLaberBar
9
- :routeBase="routeBase"
9
+ :route-base="routeBase"
10
10
  @setCache="setCache"
11
11
  @changeMenuState="changeMenuState"
12
12
  @deleteCache="deleteCache"
@@ -49,6 +49,14 @@ export default {
49
49
  thirdCacheArr: []
50
50
  }
51
51
  },
52
+ watch: {
53
+ routeBase: {
54
+ handler: function (newValue) {
55
+ console.log(newValue)
56
+ },
57
+ immediate: true
58
+ }
59
+ },
52
60
  methods: {
53
61
  changeMenuState (state) {
54
62
  this.menuState = state
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tongfun/tf-widget",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "tf-widget",
5
5
  "main": "lib/tf-widget.umd.js",
6
6
  "private": false,