Browse Source

fix: 修复点击内容区全屏报错问题

xiaoxian521 2 năm trước cách đây
mục cha
commit
6ebcb0a259
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      src/store/modules/settings.ts

+ 1 - 2
src/store/modules/settings.ts

@@ -23,8 +23,7 @@ export const useSettingStore = defineStore({
   },
   },
   actions: {
   actions: {
     CHANGE_SETTING({ key, value }) {
     CHANGE_SETTING({ key, value }) {
-      // eslint-disable-next-line no-prototype-builtins
-      if (this.hasOwnProperty(key)) {
+      if (Reflect.has(this, key)) {
         this[key] = value;
         this[key] = value;
       }
       }
     },
     },