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 @@