From 0eab2424d55d45bc01ebe8848fc9ec39c99ed2bc Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Thu, 15 Aug 2019 22:24:53 +0800 Subject: [PATCH] style: update prettier --- .prettierrc | 9 ++------- components/vc-select/Select.jsx | 16 ++++++++-------- scripts/prettier.js | 1 + 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.prettierrc b/.prettierrc index 9f5ab919f..3dc446bfa 100644 --- a/.prettierrc +++ b/.prettierrc @@ -2,18 +2,13 @@ "singleQuote": true, "trailingComma": "all", "printWidth": 100, + "proseWrap": "never", "overrides": [ { "files": ".prettierrc", "options": { "parser": "json" } - }, - { - "files": ".stylelintrc", - "options": { - "parser": "json" - } } ] -} +} \ No newline at end of file diff --git a/components/vc-select/Select.jsx b/components/vc-select/Select.jsx index 35fcfd43e..c13f3c113 100644 --- a/components/vc-select/Select.jsx +++ b/components/vc-select/Select.jsx @@ -619,10 +619,10 @@ const Select = { inputBlur(e) { const target = e.relatedTarget || document.activeElement; if ( - target && - this.selectTriggerRef && - this.selectTriggerRef.getInnerMenu() && - this.selectTriggerRef.getInnerMenu().$el === target || + (target && + this.selectTriggerRef && + this.selectTriggerRef.getInnerMenu() && + this.selectTriggerRef.getInnerMenu().$el === target) || contains(e.target, target) ) { e.target.focus(); @@ -1519,10 +1519,10 @@ const Select = { key: 'selection', }; //if (!isMultipleOrTagsOrCombobox(props)) { - // selectionProps.on.keydown = this.onKeyDown; - // selectionProps.on.focus = this.selectionRefFocus; - // selectionProps.on.blur = this.selectionRefBlur; - // selectionProps.attrs.tabIndex = props.disabled ? -1 : props.tabIndex; + // selectionProps.on.keydown = this.onKeyDown; + // selectionProps.on.focus = this.selectionRefFocus; + // selectionProps.on.blur = this.selectionRefBlur; + // selectionProps.attrs.tabIndex = props.disabled ? -1 : props.tabIndex; //} const rootCls = { [prefixCls]: true, diff --git a/scripts/prettier.js b/scripts/prettier.js index 48951a72b..27d5c28f4 100644 --- a/scripts/prettier.js +++ b/scripts/prettier.js @@ -18,6 +18,7 @@ let files = []; const ignoreFiles = [ '**/node_modules/**', + 'package.json', 'build/**', 'es/**', 'lib/**',