Skip to content

Commit

Permalink
fix(fixednav): active state watch bug
Browse files Browse the repository at this point in the history
  • Loading branch information
richard1015 committed May 27, 2021
1 parent 42408c2 commit f892410
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/packages/fixednav/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export default {
## Prop
| 字段 | 说明 | 类型 | 默认值 |
|:---------------|:---------------------------|:--------|:-----------|
| active | 是否打开 | Boolean | false |
| active.sync | 是否打开 | Boolean | false |
| navList | 悬浮列表内容数据 | Array | [] |
| active-text | 收起列表按钮文案 | String | '收起导航' |
| un-active-text | 展开列表按钮文案 | String | '快速导航' |
Expand Down
3 changes: 3 additions & 0 deletions src/packages/fixednav/fixednav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export default {
}
},
watch: {
active(newV, oldV) {
this.defaultActive = newV;
},
defaultActive(newV, oldV) {
this.$emit('update:active', newV);
}
Expand Down

0 comments on commit f892410

Please sign in to comment.