perf: fix eslint warning
This commit is contained in:
parent
c1ce24081e
commit
81a44a0284
|
@ -248,7 +248,8 @@ export default {
|
||||||
// 浏览器是否支持该控件
|
// 浏览器是否支持该控件
|
||||||
isSupported,
|
isSupported,
|
||||||
// 浏览器是否支持触屏事件
|
// 浏览器是否支持触屏事件
|
||||||
isSupportTouch: document.hasOwnProperty('ontouchstart'),
|
|
||||||
|
isSupportTouch: Object.prototype.hasOwnProperty.call(document, 'ontouchstart'),
|
||||||
// 步骤
|
// 步骤
|
||||||
step: 1, // 1选择文件 2剪裁 3上传
|
step: 1, // 1选择文件 2剪裁 3上传
|
||||||
// 上传状态及进度
|
// 上传状态及进度
|
||||||
|
|
|
@ -13,7 +13,8 @@ const state = {
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
CHANGE_SETTING: (state, { key, value }) => {
|
CHANGE_SETTING: (state, { key, value }) => {
|
||||||
if (state.hasOwnProperty(key)) {
|
// https://eslint.org/docs/rules/no-prototype-builtins
|
||||||
|
if (Object.prototype.hasOwnProperty.call(state, key)) {
|
||||||
state[key] = value
|
state[key] = value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ const actions = {
|
||||||
|
|
||||||
// dynamically modify permissions
|
// dynamically modify permissions
|
||||||
changeRoles({ commit, dispatch }, role) {
|
changeRoles({ commit, dispatch }, role) {
|
||||||
|
// eslint-disable-next-line
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
const token = role + '-token'
|
const token = role + '-token'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue