Skip to content

Commit a3b3b3f

Browse files
committed
fix: fix custom header mode
1 parent b380de2 commit a3b3b3f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/components/withHeader.vue

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div>
33
<div class="vm2__header" v-if="hasDefaultSlot">
44
<div>
5-
<h4 style="margin: 5px 10px">{{ title }}</h4>
5+
<h4 style="margin: 5px 10px" @click="tes()">{{ title }}</h4>
66
</div>
77
<button
88
tabindex="1"
@@ -26,7 +26,7 @@ export default {
2626
methods: {
2727
handleIconClick() {
2828
this.$emit("on-icon-click");
29-
},
29+
}
3030
},
3131
computed: {
3232
hasDefaultSlot() {
@@ -47,10 +47,14 @@ export default {
4747
},
4848
mounted () {
4949
this.$nextTick(() => {
50-
this.$refs.closeButton.focus();
50+
if (this.$refs && this.$refs.closeButton) {
51+
this.$refs.closeButton.focus();
52+
}
5153
});
5254
setTimeout(() => {
53-
this.$refs.closeButton.focus();
55+
if (this.$refs && this.$refs.closeButton) {
56+
this.$refs.closeButton.focus();
57+
}
5458
}, 300);
5559
}
5660
};

0 commit comments

Comments
 (0)