This commit is contained in:
花裤衩
2020-01-09 17:21:43 +08:00
committed by GitHub
6 changed files with 43 additions and 40 deletions

View File

@@ -248,7 +248,8 @@ export default {
// 浏览器是否支持该控件
isSupported,
// 浏览器是否支持触屏事件
isSupportTouch: document.hasOwnProperty('ontouchstart'),
isSupportTouch: Object.prototype.hasOwnProperty.call(document, 'ontouchstart'),
// 步骤
step: 1, // 1选择文件 2剪裁 3上传
// 上传状态及进度

View File

@@ -22,7 +22,7 @@ export default {
},
methods: {
click() {
if (!screenfull.enabled) {
if (!screenfull.isEnabled) {
this.$message({
message: 'you browser can not work',
type: 'warning'
@@ -35,12 +35,12 @@ export default {
this.isFullscreen = screenfull.isFullscreen
},
init() {
if (screenfull.enabled) {
if (screenfull.isEnabled) {
screenfull.on('change', this.change)
}
},
destroy() {
if (screenfull.enabled) {
if (screenfull.isEnabled) {
screenfull.off('change', this.change)
}
}

View File

@@ -13,7 +13,8 @@ const state = {
const mutations = {
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
}
}

View File

@@ -104,6 +104,7 @@ const actions = {
// dynamically modify permissions
changeRoles({ commit, dispatch }, role) {
// eslint-disable-next-line
return new Promise(async resolve => {
const token = role + '-token'