From e56c0f5d350c678480684a63259fbb9d5537b0f7 Mon Sep 17 00:00:00 2001 From: EdwinBetanc0urt Date: Thu, 27 Aug 2020 10:41:41 -0400 Subject: [PATCH] ref: Remove eslint-disbale. --- src/components/ImageCropper/index.vue | 9 +- src/components/JsonEditor/index.vue | 8 +- src/components/MDinput/index.vue | 32 ++-- src/components/PanThumb/index.vue | 3 +- src/components/UploadExcel/index.vue | 22 ++- src/directive/clipboard/clipboard.js | 20 ++- src/store/modules/settings.js | 4 +- src/vendor/Export2Excel.js | 247 ++++++++++++++------------ src/vendor/Export2Zip.js | 8 +- 9 files changed, 208 insertions(+), 145 deletions(-) diff --git a/src/components/ImageCropper/index.vue b/src/components/ImageCropper/index.vue index 65a4262b..73139dc8 100644 --- a/src/components/ImageCropper/index.vue +++ b/src/components/ImageCropper/index.vue @@ -247,9 +247,8 @@ export default { lang, // 浏览器是否支持该控件 isSupported, - // 浏览器是否支持触屏事件 - // eslint-disable-next-line no-prototype-builtins - isSupportTouch: document.hasOwnProperty('ontouchstart'), + // Does the browser support touch screen events? + isSupportTouch: Object.prototype.hasOwnProperty.call(document, 'ontouchstart'), // 步骤 step: 1, // 1选择文件 2剪裁 3上传 // 上传状态及进度 @@ -574,7 +573,9 @@ export default { const dY = nY - mY let rX = x + dX let rY = y + dY - if (!on) return + if (!on) { + return + } if (rX > 0) { rX = 0 } diff --git a/src/components/JsonEditor/index.vue b/src/components/JsonEditor/index.vue index c05b090c..dfebed91 100644 --- a/src/components/JsonEditor/index.vue +++ b/src/components/JsonEditor/index.vue @@ -16,8 +16,12 @@ import 'codemirror/addon/lint/json-lint' export default { name: 'JsonEditor', - /* eslint-disable vue/require-prop-types */ - props: ['value'], + props: { + value: { + type: [Array, Boolean, Number, Object, String, Symbol], + default: undefined + } + }, data() { return { jsonEditor: false diff --git a/src/components/MDinput/index.vue b/src/components/MDinput/index.vue index c59ea34a..4772c1f7 100644 --- a/src/components/MDinput/index.vue +++ b/src/components/MDinput/index.vue @@ -111,26 +111,38 @@