diff --git a/build/index.js b/build/index.js index 0c57de2a..d14fe2e7 100644 --- a/build/index.js +++ b/build/index.js @@ -1,4 +1,4 @@ -const { run } = require('runjs') +const { sh } = require('tasksfile') const chalk = require('chalk') const config = require('../vue.config.js') const rawArgv = process.argv.slice(2) @@ -7,7 +7,7 @@ const args = rawArgv.join(' ') if (process.env.npm_config_preview || rawArgv.includes('--preview')) { const report = rawArgv.includes('--report') - run(`vue-cli-service build ${args}`) + sh(`vue-cli-service build ${args}`) const port = 9526 const publicPath = config.publicPath @@ -31,5 +31,5 @@ if (process.env.npm_config_preview || rawArgv.includes('--preview')) { }) } else { - run(`vue-cli-service build ${args}`) + sh(`vue-cli-service build ${args}`) } diff --git a/package.json b/package.json index 9942fbac..00e6f2a7 100644 --- a/package.json +++ b/package.json @@ -45,61 +45,61 @@ "dependencies": { "axios": "0.18.1", "clipboard": "2.0.4", - "codemirror": "5.45.0", - "driver.js": "0.9.5", + "codemirror": "5.49.0", + "driver.js": "0.9.7", "dropzone": "5.5.1", - "echarts": "4.2.1", - "element-ui": "2.7.0", - "file-saver": "2.0.1", - "fuse.js": "3.4.4", - "js-cookie": "2.2.0", + "echarts": "4.3.0", + "element-ui": "2.12.0", + "file-saver": "2.0.2", + "fuse.js": "3.4.5", + "js-cookie": "2.2.1", "jsonlint": "1.6.3", - "jszip": "3.2.1", + "jszip": "3.2.2", "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", - "screenfull": "4.2.0", + "screenfull": "5.0.0", "showdown": "1.9.0", - "sortablejs": "1.8.4", - "tui-editor": "1.3.3", + "sortablejs": "1.10.1", + "tui-editor": "1.4.7", "vue": "2.6.10", "vue-count-to": "1.0.13", - "vue-router": "3.0.2", + "vue-router": "3.1.3", "vue-splitpane": "1.0.4", - "vuedraggable": "2.20.0", - "vuex": "3.1.0", - "xlsx": "0.14.1" + "vuedraggable": "2.23.2", + "vuex": "3.1.1", + "xlsx": "0.15.1" }, "devDependencies": { "@babel/core": "7.0.0", "@babel/register": "7.0.0", - "@vue/cli-plugin-babel": "3.5.3", - "@vue/cli-plugin-eslint": "^3.9.1", - "@vue/cli-plugin-unit-jest": "3.5.3", - "@vue/cli-service": "3.5.3", + "@vue/cli-plugin-babel": "3.11.0", + "@vue/cli-plugin-eslint": "3.11.0", + "@vue/cli-plugin-unit-jest": "3.11.0", + "@vue/cli-service": "3.11.0", "@vue/test-utils": "1.0.0-beta.29", "autoprefixer": "^9.5.1", "babel-core": "7.0.0-bridge.0", - "babel-eslint": "10.0.1", - "babel-jest": "23.6.0", + "babel-eslint": "10.0.3", + "babel-jest": "24.9.0", "chalk": "2.4.2", - "chokidar": "2.1.5", - "connect": "3.6.6", - "eslint": "5.15.3", - "eslint-plugin-vue": "5.2.2", + "chokidar": "3.1.1", + "connect": "3.7.0", + "eslint": "6.5.1", + "eslint-plugin-vue": "5.2.3", "html-webpack-plugin": "3.2.0", - "husky": "1.3.1", - "lint-staged": "8.1.5", + "husky": "3.0.8", + "lint-staged": "9.4.2", "mockjs": "1.0.1-beta3", "node-sass": "^4.9.0", - "plop": "2.3.0", - "runjs": "^4.3.2", + "plop": "2.4.0", + "tasksfile": "5.1.0", "sass-loader": "^7.1.0", - "script-ext-html-webpack-plugin": "2.1.3", + "script-ext-html-webpack-plugin": "2.1.4", "script-loader": "0.7.2", "serve-static": "^1.13.2", - "svg-sprite-loader": "4.1.3", - "svgo": "1.2.0", + "svg-sprite-loader": "4.1.6", + "svgo": "1.3.0", "vue-template-compiler": "2.6.10" }, "engines": { diff --git a/src/components/ImageCropper/index.vue b/src/components/ImageCropper/index.vue index 13ae9a11..7bb33685 100644 --- a/src/components/ImageCropper/index.vue +++ b/src/components/ImageCropper/index.vue @@ -248,7 +248,8 @@ export default { // 浏览器是否支持该控件 isSupported, // 浏览器是否支持触屏事件 - isSupportTouch: document.hasOwnProperty('ontouchstart'), + + isSupportTouch: Object.prototype.hasOwnProperty.call(document, 'ontouchstart'), // 步骤 step: 1, // 1选择文件 2剪裁 3上传 // 上传状态及进度 diff --git a/src/components/Screenfull/index.vue b/src/components/Screenfull/index.vue index 260c90de..ea128b21 100644 --- a/src/components/Screenfull/index.vue +++ b/src/components/Screenfull/index.vue @@ -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) } } diff --git a/src/store/modules/settings.js b/src/store/modules/settings.js index e389af79..67bd4160 100644 --- a/src/store/modules/settings.js +++ b/src/store/modules/settings.js @@ -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 } } diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 1391fa4a..f9d725b8 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -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'