From ac216279cad285f504b3e3ac917963ec462692f4 Mon Sep 17 00:00:00 2001 From: 2betop <2betop.cn@gmail.com> Date: Mon, 6 Jan 2020 18:56:30 +0800 Subject: [PATCH] =?UTF-8?q?Select=20=E5=A4=9A=E9=80=89=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=20tip=20=E6=B2=A1=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Select.tsx | 186 +++++++++++++++++++------------------- src/renderers/PopOver.tsx | 11 +-- 2 files changed, 98 insertions(+), 99 deletions(-) diff --git a/src/components/Select.tsx b/src/components/Select.tsx index 7ffbfafc..d56788f4 100644 --- a/src/components/Select.tsx +++ b/src/components/Select.tsx @@ -5,24 +5,24 @@ * @date 2017-11-07 */ -import uncontrollable = require("uncontrollable"); -import React from "react"; -import "react-datetime/css/react-datetime.css"; -import Overlay from "./Overlay"; -import PopOver from "./PopOver"; -import Downshift, { ControllerStateAndHelpers } from "downshift"; -import { closeIcon, Icon } from "./icons"; +import uncontrollable = require('uncontrollable'); +import React from 'react'; +import 'react-datetime/css/react-datetime.css'; +import Overlay from './Overlay'; +import PopOver from './PopOver'; +import Downshift, {ControllerStateAndHelpers} from 'downshift'; +import {closeIcon, Icon} from './icons'; // @ts-ignore -import matchSorter from "match-sorter"; -import { noop, isObject } from "../utils/helper"; -import find = require("lodash/find"); -import isPlainObject = require("lodash/isPlainObject"); -import union = require("lodash/union"); -import { highlight } from "../renderers/Form/Options"; -import { findDOMNode } from "react-dom"; -import { ClassNamesFn, themeable } from "../theme"; -import Checkbox from "./Checkbox"; -import Input from "./Input"; +import matchSorter from 'match-sorter'; +import {noop, isObject} from '../utils/helper'; +import find = require('lodash/find'); +import isPlainObject = require('lodash/isPlainObject'); +import union = require('lodash/union'); +import {highlight} from '../renderers/Form/Options'; +import {findDOMNode} from 'react-dom'; +import {ClassNamesFn, themeable} from '../theme'; +import Checkbox from './Checkbox'; +import Input from './Input'; export interface Option { label?: string; @@ -46,7 +46,7 @@ export interface OptionProps { delimiter?: string; clearable?: boolean; placeholder?: string; - autoFill?: { [propName: string]: any }; + autoFill?: {[propName: string]: any}; creatable?: boolean; onAdd?: ( idx?: number | Array, @@ -68,8 +68,8 @@ export function value2array( props: Partial ): Array