mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 02:31:21 +00:00
[bugfix] Toast: ssr error (#1910)
This commit is contained in:
@@ -136,6 +136,11 @@ export default create({
|
||||
|
||||
methods: {
|
||||
handler(action) {
|
||||
/* istanbul ignore if */
|
||||
if (this.$isServer) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (action !== this.handlerStatus && this.hideOnClickOutside) {
|
||||
this.handlerStatus = action;
|
||||
document.body[(action ? 'add' : 'remove') + 'EventListener']('touchstart', this.onBlur);
|
||||
|
Reference in New Issue
Block a user