Browse Source

feat: update vc-select to 8.4.4

pull/309/head
tangjinzhou 6 years ago
parent
commit
56b06b71e1
  1. 12
      components/auto-complete/__tests__/__snapshots__/demo.test.js.snap
  2. 20
      components/calendar/__tests__/__snapshots__/demo.test.js.snap
  3. 12
      components/form/__tests__/__snapshots__/demo.test.js.snap
  4. 20
      components/input/__tests__/__snapshots__/demo.test.js.snap
  5. 10
      components/locale-provider/__tests__/__snapshots__/demo.test.js.snap
  6. 288
      components/locale-provider/__tests__/__snapshots__/index.test.js.snap
  7. 2
      components/notification/__tests__/__snapshots__/demo.test.js.snap
  8. 8
      components/pagination/__tests__/__snapshots__/demo.test.js.snap
  9. 30
      components/select/__tests__/__snapshots__/demo.test.js.snap
  10. 56
      components/vc-select/DropdownMenu.jsx
  11. 6
      components/vc-select/PropTypes.js
  12. 454
      components/vc-select/Select.jsx
  13. 24
      components/vc-select/assets/index.less
  14. 2
      components/vc-select/index.js

12
components/auto-complete/__tests__/__snapshots__/demo.test.js.snap

@ -10,7 +10,7 @@ exports[`renders ./components/auto-complete/demo/basic.md correctly 1`] = `
<div class="ant-select-search__field__wrap"><input value="" type="text" class="ant-input ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -26,7 +26,7 @@ exports[`renders ./components/auto-complete/demo/certain-category.md correctly 1
<div class="ant-select-search__field__wrap"><span class="ant-input-affix-wrapper ant-select-search__field" value=""><input value="" type="text" class="ant-input"><span class="ant-input-suffix"><i class="certain-category-icon anticon anticon-search"></i></span></span><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</div>
@ -41,7 +41,7 @@ exports[`renders ./components/auto-complete/demo/custom.md correctly 1`] = `
<div class="ant-select-search__field__wrap"><textarea value="" placeholder="input here" class="custom ant-input ant-select-search__field" style="height: 50px;"></textarea><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -56,7 +56,7 @@ exports[`renders ./components/auto-complete/demo/non-case-sensitive.md correctly
<div class="ant-select-search__field__wrap"><input value="" type="text" class="ant-input ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -71,7 +71,7 @@ exports[`renders ./components/auto-complete/demo/options.md correctly 1`] = `
<div class="ant-select-search__field__wrap"><input value="" type="text" class="ant-input ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -87,7 +87,7 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.md correctly
<div class="ant-select-search__field__wrap"><span class="ant-input-affix-wrapper ant-select-search__field" value=""><input value="" type="text" class="ant-input"><span class="ant-input-suffix"><button type="button" class="search-btn ant-btn ant-btn-primary ant-btn-lg"><i class="anticon anticon-search"></i></button></span></span><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</div>

20
components/calendar/__tests__/__snapshots__/demo.test.js.snap

@ -7,14 +7,14 @@ exports[`renders ./components/calendar/demo/basic.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="2016" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">2016</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-enabled ant-fullcalendar-month-select">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Nov" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Nov</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-radio-group ant-radio-group-outline ant-radio-group-default"><label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"><span class="ant-radio-button ant-radio-button-checked"><input type="radio" class="ant-radio-button-input" value="date"><span class="ant-radio-button-inner"></span></span><span>Month</span></label><label class="ant-radio-button-wrapper"><span class="ant-radio-button"><input type="radio" class="ant-radio-button-input" value="month"><span class="ant-radio-button-inner"></span></span><span>Year</span></label></div>
@ -313,14 +313,14 @@ exports[`renders ./components/calendar/demo/card.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="2016" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">2016</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-enabled ant-select-sm ant-fullcalendar-month-select">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Nov" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Nov</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-radio-group ant-radio-group-outline ant-radio-group-small"><label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"><span class="ant-radio-button ant-radio-button-checked"><input type="radio" class="ant-radio-button-input" value="date"><span class="ant-radio-button-inner"></span></span><span>Month</span></label><label class="ant-radio-button-wrapper"><span class="ant-radio-button"><input type="radio" class="ant-radio-button-input" value="month"><span class="ant-radio-button-inner"></span></span><span>Year</span></label></div>
@ -619,14 +619,14 @@ exports[`renders ./components/calendar/demo/notice-calendar.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="2016" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">2016</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-enabled ant-fullcalendar-month-select">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Nov" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Nov</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-radio-group ant-radio-group-outline ant-radio-group-default"><label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"><span class="ant-radio-button ant-radio-button-checked"><input type="radio" class="ant-radio-button-input" value="date"><span class="ant-radio-button-inner"></span></span><span>Month</span></label><label class="ant-radio-button-wrapper"><span class="ant-radio-button"><input type="radio" class="ant-radio-button-input" value="month"><span class="ant-radio-button-inner"></span></span><span>Year</span></label></div>
@ -1032,14 +1032,14 @@ exports[`renders ./components/calendar/demo/select.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="2017" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">2017</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-enabled ant-fullcalendar-month-select">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Jan" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Jan</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-radio-group ant-radio-group-outline ant-radio-group-default"><label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"><span class="ant-radio-button ant-radio-button-checked"><input type="radio" class="ant-radio-button-input" value="date"><span class="ant-radio-button-inner"></span></span><span>Month</span></label><label class="ant-radio-button-wrapper"><span class="ant-radio-button"><input type="radio" class="ant-radio-button-input" value="month"><span class="ant-radio-button-inner"></span></span><span>Year</span></label></div>
@ -1336,14 +1336,14 @@ exports[`renders ./components/calendar/demo/select.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="2017" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">2017</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-enabled ant-fullcalendar-month-select">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Jan" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Jan</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-radio-group ant-radio-group-outline ant-radio-group-default"><label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"><span class="ant-radio-button ant-radio-button-checked"><input type="radio" class="ant-radio-button-input" value="date"><span class="ant-radio-button-inner"></span></span><span>Month</span></label><label class="ant-radio-button-wrapper"><span class="ant-radio-button"><input type="radio" class="ant-radio-button-input" value="month"><span class="ant-radio-button-inner"></span></span><span>Year</span></label></div>

12
components/form/__tests__/__snapshots__/demo.test.js.snap

@ -126,7 +126,7 @@ exports[`renders ./components/form/demo/coordinated.vue correctly 1`] = `
<div class="ant-row ant-form-item">
<div class="ant-col-5 ant-form-item-label"><label for="gender" title="Gender" class="ant-form-item-required">Gender</label></div>
<div class="ant-col-12 ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-select ant-select-enabled" data-__meta="[object Object]" data-__field="[object Object]" id="gender"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div unselectable="on" class="ant-select-selection__placeholder" style="display: block;">Select a option and change input text above</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-select ant-select-enabled" data-__meta="[object Object]" data-__field="[object Object]" id="gender"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div unselectable="on" class="ant-select-selection__placeholder" style="display: block;">Select a option and change input text above</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div></span>
<!---->
</div>
@ -147,7 +147,7 @@ exports[`renders ./components/form/demo/customized-form-controls.vue correctly 1
<div class="ant-row ant-form-item">
<div class="ant-form-item-label"><label for="price" title="Price" class="">Price</label></div>
<div class="ant-form-item-control-wrapper">
<div class="ant-form-item-control has-success"><span class="ant-form-item-children"><span data-__meta="[object Object]" data-__field="[object Object]" id="price" class=""><input value="0" type="text" class="ant-input" style="width: 65%; margin-right: 3%;"><div class="ant-select ant-select-enabled" style="width: 32%;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="RMB" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">RMB</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
<div class="ant-form-item-control has-success"><span class="ant-form-item-children"><span data-__meta="[object Object]" data-__field="[object Object]" id="price" class=""><input value="0" type="text" class="ant-input" style="width: 65%; margin-right: 3%;"><div class="ant-select ant-select-enabled" style="width: 32%;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="RMB" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">RMB</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div></span></span>
<!---->
</div>
@ -379,7 +379,7 @@ exports[`renders ./components/form/demo/register.vue correctly 1`] = `
<div class="ant-row ant-form-item">
<div class="ant-col-xs-24 ant-col-sm-8 ant-form-item-label"><label for="phone" title="Phone Number" class="ant-form-item-required">Phone Number</label></div>
<div class="ant-col-xs-24 ant-col-sm-16 ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><span class="ant-input-group-wrapper" style="width: 100%;"><span class="ant-input-wrapper ant-input-group"><span class="ant-input-group-addon"><div class="ant-select ant-select-enabled" style="width: 70px;" data-__meta="[object Object]" data-__field="[object Object]" id="prefix"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="+86" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">+86</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
<div class="ant-form-item-control"><span class="ant-form-item-children"><span class="ant-input-group-wrapper" style="width: 100%;"><span class="ant-input-wrapper ant-input-group"><span class="ant-input-group-addon"><div class="ant-select ant-select-enabled" style="width: 70px;" data-__meta="[object Object]" data-__field="[object Object]" id="prefix"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="+86" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">+86</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div></span><input type="text" data-__meta="[object Object]" data-__field="[object Object]" id="phone" class="ant-input"></span></span></span>
<!---->
</div>
@ -391,7 +391,7 @@ exports[`renders ./components/form/demo/register.vue correctly 1`] = `
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-select ant-select-combobox ant-select-enabled ant-select-show-search ant-select-auto-complete" data-__meta="[object Object]" data-__field="[object Object]" id="website"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div unselectable="on" class="ant-select-selection__placeholder" style="display: block;">website</div><ul><li class="ant-select-search ant-select-search--inline"><div class="ant-select-search__field__wrap"><input value="" type="text" class="ant-input ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div></span>
<!---->
@ -498,7 +498,7 @@ exports[`renders ./components/form/demo/validate-other.vue correctly 1`] = `
<div class="ant-row ant-form-item">
<div class="ant-col-6 ant-form-item-label"><label for="select" title="Select" class="ant-form-item-required">Select</label></div>
<div class="ant-col-14 ant-form-item-control-wrapper">
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-select ant-select-enabled" data-__meta="[object Object]" data-__field="[object Object]" id="select"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div unselectable="on" class="ant-select-selection__placeholder" style="display: block;">Please select a country</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
<div class="ant-form-item-control"><span class="ant-form-item-children"><div class="ant-select ant-select-enabled" data-__meta="[object Object]" data-__field="[object Object]" id="select"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div unselectable="on" class="ant-select-selection__placeholder" style="display: block;">Please select a country</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div></span>
<!---->
</div>
@ -666,7 +666,7 @@ exports[`renders ./components/form/demo/validate-static.vue correctly 1`] = `
<div class="ant-row ant-form-item">
<div class="ant-col-xs-24 ant-col-sm-5 ant-form-item-label"><label title="Error" class="">Error</label></div>
<div class="ant-col-xs-24 ant-col-sm-12 ant-form-item-control-wrapper">
<div class="ant-form-item-control has-feedback has-error"><span class="ant-form-item-children"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Option 1" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Option 1</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
<div class="ant-form-item-control has-feedback has-error"><span class="ant-form-item-children"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Option 1" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Option 1</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div></span>
<!---->
</div>

20
components/input/__tests__/__snapshots__/demo.test.js.snap

@ -3,8 +3,8 @@
exports[`renders ./components/input/demo/addon.md correctly 1`] = `
<div>
<div style="margin-bottom: 16px;"><span class="ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><span class="ant-input-group-addon">Http://</span><input defaultvalue="mysite" type="text" class="ant-input"><span class="ant-input-group-addon">.com</span></span></span></div>
<div style="margin-bottom: 16px;"><span class="ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><span class="ant-input-group-addon"><div class="ant-select ant-select-enabled" style="width: 90px;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Http://" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Http://</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
</div></span><input defaultvalue="mysite" type="text" class="ant-input"><span class="ant-input-group-addon"><div class="ant-select ant-select-enabled" style="width: 80px;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title=".com" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">.com</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
<div style="margin-bottom: 16px;"><span class="ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><span class="ant-input-group-addon"><div class="ant-select ant-select-enabled" style="width: 90px;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Http://" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Http://</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div></span><input defaultvalue="mysite" type="text" class="ant-input"><span class="ant-input-group-addon"><div class="ant-select ant-select-enabled" style="width: 80px;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title=".com" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">.com</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div></span></span></span></div>
<div style="margin-bottom: 16px;"><span class="ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><input defaultvalue="mysite" type="text" class="ant-input"><span class="ant-input-group-addon"><i class="anticon anticon-setting"></i></span></span></span></div>
</div>
@ -18,19 +18,19 @@ exports[`renders ./components/input/demo/autosize-textarea.md correctly 1`] = `
exports[`renders ./components/input/demo/basic.md correctly 1`] = `<input placeholder="Basic usage" type="text" class="ant-input">`;
exports[`renders ./components/input/demo/group.md correctly 1`] = `
<div><span class="ant-input-group ant-input-group-lg"><div class="ant-col-5"><input defaultvalue="0571" type="text" class="ant-input"></div><div class="ant-col-8"><input defaultvalue="26888888" type="text" class="ant-input"></div></span> <br> <span class="ant-input-group ant-input-group-compact"><input defaultvalue="0571" type="text" class="ant-input" style="width: 20%;"><input defaultvalue="26888888" type="text" class="ant-input" style="width: 30%;"></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Zhejiang" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Zhejiang</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
</div><input defaultvalue="Xihu District, Hangzhou" type="text" class="ant-input" style="width: 50%;"></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Option1" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Option1</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
</div><input defaultvalue="input content" type="text" class="ant-input" style="width: 50%;"></span> <br> <span class="ant-input-group ant-input-group-compact"><input defaultvalue="input content" type="text" class="ant-input" style="width: 50%;"><span class="ant-calendar-picker"><div class=""><input readonly="true" placeholder="Select date" class="ant-calendar-picker-input ant-input"><span class="ant-calendar-picker-icon"></span></div></span></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Option1-1" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Option1-1</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
<div><span class="ant-input-group ant-input-group-lg"><div class="ant-col-5"><input defaultvalue="0571" type="text" class="ant-input"></div><div class="ant-col-8"><input defaultvalue="26888888" type="text" class="ant-input"></div></span> <br> <span class="ant-input-group ant-input-group-compact"><input defaultvalue="0571" type="text" class="ant-input" style="width: 20%;"><input defaultvalue="26888888" type="text" class="ant-input" style="width: 30%;"></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Zhejiang" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Zhejiang</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div><input defaultvalue="Xihu District, Hangzhou" type="text" class="ant-input" style="width: 50%;"></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Option1" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Option1</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div><input defaultvalue="input content" type="text" class="ant-input" style="width: 50%;"></span> <br> <span class="ant-input-group ant-input-group-compact"><input defaultvalue="input content" type="text" class="ant-input" style="width: 50%;"><span class="ant-calendar-picker"><div class=""><input readonly="true" placeholder="Select date" class="ant-calendar-picker-input ant-input"><span class="ant-calendar-picker-icon"></span></div></span></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Option1-1" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Option1-1</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div>
<div class="ant-select ant-select-enabled">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Option2-2" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Option2-2</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Between" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Between</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
</div><input placeholder="Minimum" type="text" class="ant-input" style="width: 100px; text-align: center;"><input placeholder="~" type="text" disabled="disabled" class="ant-input ant-input-disabled" style="width: 30px; border-left: 0; pointer-events: none; background-color: rgb(255, 255, 255);"><input placeholder="Maximum" type="text" class="ant-input" style="width: 100px; text-align: center; border-left: 0;"></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Sign Up" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Sign Up</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
</span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Between" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Between</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div><input placeholder="Minimum" type="text" class="ant-input" style="width: 100px; text-align: center;"><input placeholder="~" type="text" disabled="disabled" class="ant-input ant-input-disabled" style="width: 30px; border-left: 0; pointer-events: none; background-color: rgb(255, 255, 255);"><input placeholder="Maximum" type="text" class="ant-input" style="width: 100px; text-align: center; border-left: 0;"></span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Sign Up" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Sign Up</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div>
<div class="ant-select ant-select-combobox ant-select-enabled ant-select-show-search ant-select-auto-complete" style="width: 200px;">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" class="ant-select-selection ant-select-selection--single">
@ -41,10 +41,10 @@ exports[`renders ./components/input/demo/group.md correctly 1`] = `
<div class="ant-select-search__field__wrap"><input value="" type="text" class="ant-input ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</li>
</ul>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled" style="width: 30%;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Home" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Home</div></div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span></div>
</span> <br> <span class="ant-input-group ant-input-group-compact"><div class="ant-select ant-select-enabled" style="width: 30%;"><div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single"><div class="ant-select-selection__rendered"><div title="Home" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Home</div></div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span></div>
</div><span tabindex="0" class="ant-cascader-picker" style="width: 70%;"><input value="" placeholder="Select Address" type="text" readonly="true" class="ant-input ant-cascader-input ant-cascader-input "><span class="ant-cascader-picker-label"></span><i class="anticon anticon-down ant-cascader-picker-arrow"></i></span></span></div>
`;

10
components/locale-provider/__tests__/__snapshots__/demo.test.js.snap

@ -20,7 +20,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="10 / page" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">10 / page</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</li>
@ -33,7 +33,7 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
<div class="ant-select-search ant-select-search--inline" style="display: none;">
<div class="ant-select-search__field__wrap"><input autocomplete="off" value="" class="ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div> <span class="ant-calendar-picker"><div class=""><input readonly="true" placeholder="Select date" class="ant-calendar-picker-input ant-input"><span class="ant-calendar-picker-icon"></span>
</div></span> <span class="ant-time-picker"><input type="text" placeholder="Select time" id="" class="ant-time-picker-input"><span class="ant-time-picker-icon"></span></span> <span tabindex="0" class="ant-calendar-picker" style="width: 200px;"><span class="ant-calendar-picker-input ant-input"><input readonly="true" placeholder="Start date" tabindex="-1" class="ant-calendar-range-picker-input"><span class="ant-calendar-range-picker-separator"> ~ </span><input readonly="true" placeholder="End date" tabindex="-1" class="ant-calendar-range-picker-input"><span class="ant-calendar-picker-icon"></span></span></span>
@ -71,14 +71,14 @@ exports[`renders ./components/locale-provider/demo/all.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="2016" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">2016</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-enabled ant-select-sm ant-fullcalendar-month-select">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Nov" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Nov</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-radio-group ant-radio-group-outline ant-radio-group-small"><label class="ant-radio-button-wrapper ant-radio-button-wrapper-checked"><span class="ant-radio-button ant-radio-button-checked"><input type="radio" class="ant-radio-button-input" value="date"><span class="ant-radio-button-inner"></span></span><span>Month</span></label><label class="ant-radio-button-wrapper"><span class="ant-radio-button"><input type="radio" class="ant-radio-button-input" value="month"><span class="ant-radio-button-inner"></span></span><span>Year</span></label></div>
@ -387,7 +387,7 @@ exports[`renders ./components/locale-provider/demo/basic.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="10 / page" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">10 / page</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</li>

288
components/locale-provider/__tests__/__snapshots__/index.test.js.snap

File diff suppressed because it is too large Load Diff

2
components/notification/__tests__/__snapshots__/demo.test.js.snap

@ -14,7 +14,7 @@ exports[`renders ./components/notification/demo/placement.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="topRight" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">topRight</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div> <button type="button" class="ant-btn ant-btn-primary"><span>Open the notification box</span></button>
</div>

8
components/pagination/__tests__/__snapshots__/demo.test.js.snap

@ -30,7 +30,7 @@ exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="10 / page" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">10 / page</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</li>
@ -51,7 +51,7 @@ exports[`renders ./components/pagination/demo/changer.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="20 / page" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">20 / page</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</li>
@ -88,7 +88,7 @@ exports[`renders ./components/pagination/demo/custom-changer.md correctly 1`] =
<div class="ant-select-selection-selected-value" style="display: block; opacity: 1;"><span>10条/页</span>
<!---->
</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</li>
@ -152,7 +152,7 @@ exports[`renders ./components/pagination/demo/mini.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="10 / page" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">10 / page</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-pagination-options-quick-jumper">Goto<input type="text"></div>

30
components/select/__tests__/__snapshots__/demo.test.js.snap

@ -20,14 +20,14 @@ exports[`renders ./components/select/demo/basic.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Lucy" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Lucy</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-disabled" style="width: 120px;">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="-1" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Lucy" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Lucy</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</div>
@ -39,14 +39,14 @@ exports[`renders ./components/select/demo/coordinate.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Zhejiang" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Zhejiang</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
<div class="ant-select ant-select-enabled" style="width: 120px;">
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Hangzhou" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Hangzhou</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
</div>
@ -57,7 +57,7 @@ exports[`renders ./components/select/demo/label-in-value.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Lucy (101)" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Lucy (101)</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -69,10 +69,10 @@ exports[`renders ./components/select/demo/multiple.md correctly 1`] = `
<div unselectable="on" class="ant-select-selection__placeholder" style="display: none;">Please select</div>
<div>
<li unselectable="unselectable" title="a1" class="ant-select-selection__choice">
<div class="ant-select-selection__choice__content">a1</div><span class="ant-select-selection__choice__remove"></span>
<div class="ant-select-selection__choice__content">a1</div><span class="ant-select-selection__choice__remove"><i class="ant-select-selection__choice__remove-icon">×</i></span>
</li>
<li unselectable="unselectable" title="b2" class="ant-select-selection__choice">
<div class="ant-select-selection__choice__content">b2</div><span class="ant-select-selection__choice__remove"></span>
<div class="ant-select-selection__choice__content">b2</div><span class="ant-select-selection__choice__remove"><i class="ant-select-selection__choice__remove-icon">×</i></span>
</li>
<li class="ant-select-search ant-select-search--inline">
<div class="ant-select-search__field__wrap"><input autocomplete="off" value="" class="ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
@ -88,7 +88,7 @@ exports[`renders ./components/select/demo/optgroup.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="Lucy" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">Lucy</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -98,7 +98,7 @@ exports[`renders ./components/select/demo/options.md correctly 1`] = `
<div role="combobox" aria-autocomplete="list" aria-haspopup="true" tabindex="0" class="ant-select-selection ant-select-selection--single">
<div class="ant-select-selection__rendered">
<div title="北京 010" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">北京</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -111,7 +111,7 @@ exports[`renders ./components/select/demo/search.md correctly 1`] = `
<div class="ant-select-search ant-select-search--inline" style="display: none;">
<div class="ant-select-search__field__wrap"><input autocomplete="off" value="" class="ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div>
`;
@ -155,7 +155,7 @@ exports[`renders ./components/select/demo/size.md correctly 1`] = `
" class="ant-select-selection-selected-value" style="display: block; opacity: 1;">
a1
</div>
</div><span unselectable="unselectable" class="ant-select-arrow"><b></b></span>
</div><span unselectable="unselectable" class="ant-select-arrow"><i class="ant-select-arrow-icon"></i></span>
</div>
</div> <br>
<div class="ant-select ant-select-enabled" style="width: 200px;">
@ -168,14 +168,14 @@ exports[`renders ./components/select/demo/size.md correctly 1`] = `
" class="ant-select-selection__choice">
<div class="ant-select-selection__choice__content">
a1
</div><span class="ant-select-selection__choice__remove"></span>
</div><span class="ant-select-selection__choice__remove"><i class="ant-select-selection__choice__remove-icon">×</i></span>
</li>
<li unselectable="unselectable" title="
b2
" class="ant-select-selection__choice">
<div class="ant-select-selection__choice__content">
b2
</div><span class="ant-select-selection__choice__remove"></span>
</div><span class="ant-select-selection__choice__remove"><i class="ant-select-selection__choice__remove-icon">×</i></span>
</li>
<li class="ant-select-search ant-select-search--inline">
<div class="ant-select-search__field__wrap"><input autocomplete="off" value="" class="ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>
@ -194,14 +194,14 @@ exports[`renders ./components/select/demo/size.md correctly 1`] = `
" class="ant-select-selection__choice">
<div class="ant-select-selection__choice__content">
a1
</div><span class="ant-select-selection__choice__remove"></span>
</div><span class="ant-select-selection__choice__remove"><i class="ant-select-selection__choice__remove-icon">×</i></span>
</li>
<li unselectable="unselectable" title="
b2
" class="ant-select-selection__choice">
<div class="ant-select-selection__choice__content">
b2
</div><span class="ant-select-selection__choice__remove"></span>
</div><span class="ant-select-selection__choice__remove"><i class="ant-select-selection__choice__remove-icon">×</i></span>
</li>
<li class="ant-select-search ant-select-search--inline">
<div class="ant-select-search__field__wrap"><input autocomplete="off" value="" class="ant-select-search__field"><span class="ant-select-search__field__mirror">&nbsp;</span></div>

56
components/vc-select/DropdownMenu.jsx

@ -5,7 +5,7 @@ import scrollIntoView from 'dom-scroll-into-view'
import { getSelectKeys, preventDefaultEvent } from './util'
import { cloneElement } from '../_util/vnode'
import BaseMixin from '../_util/BaseMixin'
import { getSlotOptions } from '../_util/props-util'
import { getSlotOptions, getComponentFromProp } from '../_util/props-util'
export default {
name: 'DropdownMenu',
@ -24,6 +24,8 @@ export default {
inputValue: PropTypes.string,
visible: PropTypes.bool,
backfillValue: PropTypes.any,
firstActiveValue: PropTypes.string,
menuItemSelectedIcon: PropTypes.any,
},
beforeMount () {
@ -54,32 +56,37 @@ export default {
this.lastInputValue = props.inputValue
this.prevVisible = this.visible
},
beforeDestroy () {
if (this.rafInstance && this.rafInstance.cancel) {
this.rafInstance.cancel()
}
},
methods: {
scrollActiveItemToView () {
// scroll into view
const itemComponent = this.firstActiveItem && this.firstActiveItem.$el
const props = this.$props
if (itemComponent) {
const scrollIntoViewOpts = {
onlyScrollIfNeeded: true,
}
if (
(!props.value || props.value.length === 0) &&
props.firstActiveValue
) {
scrollIntoViewOpts.alignWithTop = true
}
// Delay to scroll since current frame item position is not ready when pre view is by filter
// https://github.com/ant-design/ant-design/issues/11268#issuecomment-406634462
raf(() => {
scrollIntoView(
itemComponent,
this.$refs.menuRef.$el,
scrollIntoViewOpts
)
})
const { value, visible, firstActiveValue } = props
if (!itemComponent || !visible) {
return
}
const scrollIntoViewOpts = {
onlyScrollIfNeeded: true,
}
if (
(!value || value.length === 0) && firstActiveValue
) {
scrollIntoViewOpts.alignWithTop = true
}
// Delay to scroll since current frame item position is not ready when pre view is by filter
// https://github.com/ant-design/ant-design/issues/11268#issuecomment-406634462
this.rafInstance = raf(() => {
scrollIntoView(
itemComponent,
this.$refs.menuRef.$el,
scrollIntoViewOpts
)
})
},
renderMenu () {
@ -95,6 +102,7 @@ export default {
dropdownMenuStyle,
backfillValue,
} = props
const menuItemSelectedIcon = getComponentFromProp(this, 'menuItemSelectedIcon')
const { menuDeselect, menuSelect, popupScroll } = this.$listeners
if (menuItems && menuItems.length) {
const selectedKeys = getSelectKeys(menuItems, value)
@ -102,6 +110,7 @@ export default {
props: {
multiple,
defaultActiveFirst: defaultActiveFirstOption,
itemIcon: multiple ? menuItemSelectedIcon : null,
selectedKeys,
prefixCls: `${prefixCls}-menu`,
},
@ -185,7 +194,10 @@ export default {
const { popupFocus, popupScroll } = this.$listeners
return renderMenu ? (
<div
style={{ overflow: 'auto' }}
style={{
overflow: 'auto',
transform: 'translateZ(0)',
}}
onFocus={popupFocus}
onMousedown={preventDefaultEvent}
onScroll={popupScroll}

6
components/vc-select/PropTypes.js

@ -17,6 +17,8 @@ export const SelectPropTypes = {
optionFilterProp: PropTypes.string,
animation: PropTypes.string,
choiceTransitionName: PropTypes.string,
open: PropTypes.bool,
defaultOpen: PropTypes.bool,
// onChange: PropTypes.func,
// onBlur: PropTypes.func,
// onFocus: PropTypes.func,
@ -41,4 +43,8 @@ export const SelectPropTypes = {
showAction: PropTypes.arrayOf(PropTypes.string),
autoFocus: PropTypes.bool,
getPopupContainer: PropTypes.func,
clearIcon: PropTypes.any,
inputIcon: PropTypes.any,
removeIcon: PropTypes.any,
menuItemSelectedIcon: PropTypes.any,
}

454
components/vc-select/Select.jsx

@ -41,6 +41,8 @@ import {
import SelectTrigger from './SelectTrigger'
import { SelectPropTypes } from './PropTypes'
const SELECT_EMPTY_VALUE_KEY = 'RC_SELECT_EMPTY_VALUE_KEY'
function noop () {}
function chaining (...fns) {
@ -132,43 +134,6 @@ const Select = {
__propsSymbol__ () {
Object.assign(this.$data, this.getDerivedStateFromProps(getOptionProps(this), this.$data))
},
// value (val) {
// let sValue = toArray(val)
// if (this.labelInValue) {
// sValue.forEach(v => {
// v.key = v.key !== undefined ? v.key : v.value
// })
// } else {
// sValue = sValue.map(v => {
// return {
// key: v,
// }
// })
// }
// this.sValue = sValue
// this.initLabelAndTitleMap(sValue)
// sValue.forEach((val) => {
// const key = val.key
// let { label, title } = val
// label = label === undefined ? this.labelMap.get(key) : label
// title = title === undefined ? this.titleMap.get(key) : title
// this.labelMap.set(key, label === undefined ? key : label)
// this.titleMap.set(key, title)
// })
// if (this.combobox) {
// this.setState({
// _inputValue: sValue.length ? this.labelMap.get((sValue[0].key)) : '',
// })
// }
// },
// combobox (val) {
// if (val) {
// this.setState({
// _inputValue: this.sValue.length ? this.labelMap.get((this.sValue[0].key)) : '',
// })
// }
// },
},
updated () {
this.$nextTick(() => {
@ -220,39 +185,7 @@ const Select = {
}
return newState
},
// initLabelAndTitleMap (sValue) {
// // label and title
// const labelArr = []
// const titleArr = []
// const values = sValue || this.sValue
// values.forEach((val) => {
// const key = val.key
// let { label, title } = val
// label = label === undefined ? this.labelMap.get(key) : label
// title = title === undefined ? this.titleMap.get(key) : title
// title = typeof title === 'string' ? title.trim() : title
// labelArr.push([key, label === undefined ? key : label])
// titleArr.push([key, title])
// })
// this.labelMap = new Map(labelArr)
// this.titleMap = new Map(titleArr)
// this.updateLabelAndTitleMap(this.$props.children)
// },
// updateLabelAndTitleMap (children = []) {
// children.forEach(child => {
// if (!child.data || child.data.slot !== undefined) {
// return
// }
// if (getSlotOptions(child).isSelectOptGroup) {
// this.updateLabelAndTitleMap(child.componentOptions.children)
// } else {
// const key = getValuePropValue(child)
// this.titleMap.set(key, getValue(child, 'title'))
// this.labelMap.set(key, this.getLabelFromOption(child))
// }
// })
// },
onInputChange (event) {
const { tokenSeparators } = this.$props
const val = event.target.value
@ -290,21 +223,31 @@ const Select = {
// combobox ignore
onKeyDown (event) {
const props = this.$props
if (props.disabled) {
const { _open: open } = this.$data
const { disabled } = this.$props
if (disabled) {
return
}
const keyCode = event.keyCode
if (this.$data._open && !this.getInputDOMNode()) {
if (open && !this.getInputDOMNode()) {
this.onInputKeydown(event)
} else if (keyCode === KeyCode.ENTER || keyCode === KeyCode.DOWN) {
} else if (
keyCode === KeyCode.ENTER ||
keyCode === KeyCode.DOWN
) {
// vue stateonKeyDownonMenuSelectsetOpenState
if (keyCode === KeyCode.ENTER && !isMultipleOrTags(props)) {
if (keyCode === KeyCode.ENTER && !isMultipleOrTags(this.$props)) {
this.maybeFocus(true)
} else {
} else if (!open) {
this.setOpenState(true)
}
event.preventDefault()
} else if (keyCode === KeyCode.SPACE) {
// Not block space if popup is shown
if (!open) {
this.setOpenState(true)
event.preventDefault()
}
}
},
@ -347,7 +290,7 @@ const Select = {
return
}
if (state._open) {
if (this.getRealOpenState(state)) {
const menu = this.selectTriggerRef.getInnerMenu()
if (menu && menu.onKeyDown(event, this.handleBackfill)) {
event.preventDefault()
@ -371,7 +314,9 @@ const Select = {
}
value = value.concat([selectedValue])
} else {
if (lastValue && lastValue === selectedValue && selectedValue !== this.$data._backfillValue) {
if (lastValue !== undefined &&
lastValue === selectedValue &&
selectedValue !== this.$data._backfillValue) {
this.setOpenState(false, true)
return
}
@ -391,6 +336,10 @@ const Select = {
},
onMenuDeselect ({ item, domEvent }) {
if (domEvent.type === 'keydown' && domEvent.keyCode === KeyCode.ENTER) {
this.removeSelected(getValuePropValue(item))
return
}
if (domEvent.type === 'click') {
this.removeSelected(getValuePropValue(item))
}
@ -408,77 +357,16 @@ const Select = {
},
onPlaceholderClick (e) {
// if (this.openStatus) {
// e.stopPropagation()
// }
if (this.getInputDOMNode()) {
this.getInputDOMNode().focus()
}
},
// onOuterFocus (e) {
// if (this.disabled) {
// e.preventDefault()
// return
// }
// this.clearBlurTime()
// if (
// !isMultipleOrTagsOrCombobox(this.$props) &&
// e.target === this.getInputDOMNode()
// ) {
// return
// }
// if (this._focused) {
// return
// }
// this._focused = true
// this.updateFocusClassName()
// this.timeoutFocus()
// },
onPopupFocus () {
// fix ie scrollbar, focus element again
this.maybeFocus(true, true)
},
// onOuterBlur (e) {
// if (this.disabled) {
// e.preventDefault()
// return
// }
// this.blurTimer = setTimeout(() => {
// this._focused = false
// this.updateFocusClassName()
// const props = this.$props
// let { sValue } = this
// const { inputValue } = this
// if (
// isSingleMode(props) &&
// props.showSearch &&
// inputValue &&
// props.defaultActiveFirstOption
// ) {
// const options = this._options || []
// if (options.length) {
// const firstOption = findFirstMenuItem(options)
// if (firstOption) {
// sValue = [
// {
// key: firstOption.key,
// label: this.getLabelFromOption(firstOption),
// },
// ]
// this.fireChange(sValue)
// }
// }
// } else if (isMultipleOrTags(props) && inputValue) {
// this.inputValue = this.getInputDOMNode().value = ''
// }
// this.$emit('blur', this.getVLForOnChange(sValue))
// this.setOpenState(false)
// }, 10)
// },
onClearSelection (event) {
const props = this.$props
const state = this.$data
@ -619,42 +507,7 @@ const Select = {
return this.getOptionBySingleValue(value)
})
},
// getSingleOptionByValueKey (key) {
// return this.getOptionsFromChildren({
// key,
// label: key,
// }, this.$props.children)
// },
// getOptionsByValue (value) {
// if (value === undefined) {
// return undefined
// }
// if (value.length === 0) {
// return []
// }
// return this.getOptionsFromChildren(value, this.$props.children)
// },
// getLabelBySingleValue (children = [], value) {
// if (value === undefined) {
// return null
// }
// let label = null
// children.forEach(child => {
// if (!child.data || child.data.slot !== undefined) {
// return
// }
// if (getSlotOptions(child).isSelectOptGroup) {
// const maybe = this.getLabelBySingleValue(child.componentOptions.children, value)
// if (maybe !== null) {
// label = maybe
// }
// } else if (getValuePropValue(child) === value) {
// label = this.getLabelFromOption(child)
// }
// })
// return label
// },
getValueByLabel (label) {
if (label === undefined) {
return null
@ -668,34 +521,7 @@ const Select = {
})
return value
},
// getValueByLabel (children = [], label) {
// if (label === undefined) {
// return null
// }
// let value = null
// children.forEach(child => {
// if (!child.data || child.data.slot !== undefined) {
// return
// }
// if (getSlotOptions(child).isSelectOptGroup) {
// const maybe = this.getValueByLabel(child.componentOptions.children, label)
// if (maybe !== null) {
// value = maybe
// }
// } else if (toArray(this.getLabelFromOption(child)).join('') === label) {
// value = getValuePropValue(child)
// }
// })
// return value
// },
// getLabelFromOption (child) {
// let label = getPropValue(child, this.optionLabelProp)
// if (Array.isArray(label) && label.length === 1 && !label[0].tag) {
// label = label[0].text
// }
// return label
// },
getVLBySingleValue (value) {
if (this.$props.labelInValue) {
return {
@ -705,9 +531,6 @@ const Select = {
}
return value
},
// getLabelFromProps (value) {
// return this.getLabelByValue(this.$props.children || [], value)
// },
getVLForOnChange (vls_) {
let vls = vls_
@ -730,14 +553,6 @@ const Select = {
return label
},
// getLabelByValue (children, value) {
// const label = this.getLabelBySingleValue(children, value)
// if (label === null) {
// return value
// }
// return label
// },
getDropdownContainer () {
if (!this.dropdownContainer) {
this.dropdownContainer = document.createElement('div')
@ -814,20 +629,49 @@ const Select = {
}
}
} else if (isMultipleOrTags(props) && inputValue) {
this.$data._inputValue = this.getInputDOMNode().value = ''
if (this._mouseDown) {
// need update dropmenu when not blur
this.setInputValue('')
} else {
// why not use setState?
this.$data._inputValue = this.getInputDOMNode().value = ''
}
value = this.getValueByInput(inputValue)
if (value !== undefined) {
this.fireChange(value)
}
}
this.$emit('blur', this.getVLForOnChange(value))
// if click the rest space of Select in multiple mode
if (isMultipleOrTags(props) && this._mouseDown) {
this.maybeFocus(true, true)
this._mouseDown = false
return
}
this.setOpenState(false)
this.$emit('blur', this.getVLForOnChange(value))
}, 10)
},
inputFocus (e) {
if (this.$props.disabled) {
e.preventDefault()
return
}
this.clearBlurTime()
this.clearFocusTime()
this.timeoutFocus()
if (
!isMultipleOrTagsOrCombobox(this.$props) &&
e.target === this.getInputDOMNode()
) {
return
}
if (this._focused) {
return
}
this._focused = true
this.updateFocusClassName()
// only effect multiple or tag mode
if (!isMultipleOrTags(this.$props) || !this._mouseDown) {
this.timeoutFocus()
}
},
_getInputElement () {
const props = this.$props
@ -918,6 +762,7 @@ const Select = {
this.maybeFocus(open, needFocus)
return
}
this.__emit('dropdownVisibleChange', open)
const nextState = {
_open: open,
_backfillValue: undefined,
@ -971,8 +816,13 @@ const Select = {
return hasNewValue ? nextValue : undefined
},
getRealOpenState () {
let open = this.$data._open
getRealOpenState (state) {
const { open: _open } = this.$props
if (typeof _open === 'boolean') {
return _open
}
let open = (state || this.$data)._open
const options = this._options || []
if (isMultipleOrTagsOrCombobox(this.$props) || !this.$props.showSearch) {
if (open && !options.length) {
@ -981,29 +831,6 @@ const Select = {
}
return open
},
// getValueByInput (string) {
// const { multiple, tokenSeparators, $slots } = this
// let nextValue = this.sValue
// splitBySeparators(string, tokenSeparators).forEach(label => {
// const selectedValue = { key: label, label }
// if (findIndexInValueByLabel(nextValue, label) === -1) {
// if (multiple) {
// const value = this.getValueByLabel($props.children, label)
// if (value) {
// selectedValue.key = value
// nextValue = nextValue.concat(selectedValue)
// }
// } else {
// nextValue = nextValue.concat(selectedValue)
// }
// }
// this.fireSelect({
// key: label,
// label,
// })
// })
// return nextValue
// },
focus () {
if (isSingleMode(this.$props)) {
@ -1020,6 +847,13 @@ const Select = {
this.getInputDOMNode().blur()
}
},
markMouseDown () {
this._mouseDown = true
},
markMouseLeave () {
this._mouseDown = false
},
handleBackfill (item) {
if (!this.backfill || !(isSingleMode(this.$props) || isCombobox(this.$props))) {
@ -1067,8 +901,8 @@ const Select = {
this.clearFocusTime()
}
this.focusTimer = setTimeout(() => {
this._focused = true
this.updateFocusClassName()
// this._focused = true
// this.updateFocusClassName()
this.$emit('focus')
}, 10)
},
@ -1106,52 +940,13 @@ const Select = {
input.focus()
this._focused = true
}
} else {
if (activeElement !== this.selectionRef) {
this.selectionRef.focus()
this._focused = true
}
} else if (activeElement !== this.selectionRef) {
this.selectionRef.focus()
this._focused = true
}
}
},
// addLabelToValue (value_) {
// let value = value_
// if (this.labelInValue) {
// value.forEach(v => {
// v.label = v.label || this.getLabelFromProps(v.key)
// })
// } else {
// value = value.map(v => {
// return {
// key: v,
// label: this.getLabelFromProps(v),
// }
// })
// }
// return value
// },
// addTitleToValue (children = [], values) {
// let nextValues = values
// const keys = values.map(v => v.key)
// children.forEach(child => {
// if (!child) {
// return
// }
// if (getSlotOptions(child).isSelectOptGroup) {
// nextValues = this.addTitleToValue(child.componentOptions.children, nextValues)
// } else {
// const value = getValuePropValue(child)
// const valueIndex = keys.indexOf(value)
// if (valueIndex > -1) {
// nextValues[valueIndex].title = getValue(child, 'title')
// }
// }
// })
// return nextValues
// },
removeSelected (selectedKey, e) {
const props = this.$props
if (props.disabled || this.isChildDisabled(selectedKey)) {
@ -1208,42 +1003,11 @@ const Select = {
})
},
forcePopupAlign () {
if (!this.$data._open) {
return
}
this.selectTriggerRef && this.selectTriggerRef.triggerRef.forcePopupAlign()
},
// getOptionsAndOpenStatus () {
// let sOpen = this.sOpen
// if (this.skipAdjustOpen) {
// this.openStatus = sOpen
// return {
// options: this._options,
// open: sOpen,
// }
// }
// const { $props, showSearch } = this
// let options = []
// // If hidden menu due to no options, then it should be calculated again
// if (sOpen || this.hiddenForNoOptions) {
// options = this.renderFilterOptions()
// }
// this._options = options
// if (isMultipleOrTagsOrCombobox($props) || !showSearch) {
// if (sOpen && !options.length) {
// sOpen = false
// this.hiddenForNoOptions = true
// }
// // Keep menu open if there are options and hidden for no options before
// if (this.hiddenForNoOptions && options.length) {
// sOpen = true
// this.hiddenForNoOptions = false
// }
// }
// this.openStatus = sOpen
// return {
// options,
// open: sOpen,
// }
// },
renderFilterOptions () {
const { _inputValue: inputValue } = this.$data
const { children, tags, filterOption, notFoundContent } = this.$props
@ -1417,6 +1181,7 @@ const Select = {
maxTagPlaceholder,
showSearch,
} = props
const removeIcon = getComponentFromProp(this, 'removeIcon')
const className = `${prefixCls}-selection__rendered`
// search input is inside topControlNode in single, multiple & combobox. 2016/04/13
let innerNode = null
@ -1427,15 +1192,13 @@ const Select = {
let opacity = 1
if (!showSearch) {
showSelectedValue = true
} else {
if (open) {
showSelectedValue = !inputValue
if (showSelectedValue) {
opacity = 0.4
}
} else {
showSelectedValue = true
} else if (open) {
showSelectedValue = !inputValue
if (showSelectedValue) {
opacity = 0.4
}
} else {
showSelectedValue = true
}
const singleValue = value[0]
const { label, title } = this.getOptionInfoBySingleValue(singleValue)
@ -1486,7 +1249,7 @@ const Select = {
unselectable='unselectable'
onMousedown={preventDefaultEvent}
class={`${prefixCls}-selection__choice ${prefixCls}-selection__choice__disabled`}
key={'maxTagPlaceholder'}
key='maxTagPlaceholder'
title={toTitle(content)}
>
<div class={`${prefixCls}-selection__choice__content`}>{content}</div>
@ -1514,7 +1277,7 @@ const Select = {
unselectable='unselectable'
onMousedown={preventDefaultEvent}
class={choiceClassName}
key={singleValue}
key={singleValue || SELECT_EMPTY_VALUE_KEY}
title={toTitle(title)}
>
<div class={`${prefixCls}-selection__choice__content`}>
@ -1522,11 +1285,13 @@ const Select = {
</div>
{disabled ? null : (
<span
class={`${prefixCls}-selection__choice__remove`}
onClick={(event) => {
this.removeSelected(singleValue, event)
}}
/>)}
class={`${prefixCls}-selection__choice__remove`}
>
{removeIcon || <i class={`${prefixCls}-selection__choice__remove-icon`}>×</i>}
</span>)}
</li>
)
})
@ -1585,15 +1350,16 @@ const Select = {
renderClear () {
const { prefixCls, allowClear } = this.$props
const { _value: value, _inputValue: inputValue } = this.$data
const clearIcon = getComponentFromProp(this, 'clearIcon')
const clear = (
<span
key='clear'
class={`${prefixCls}-selection__clear`}
onMousedown={preventDefaultEvent}
style={UNSELECTABLE_STYLE}
unselectable='unselectable'
class={`${prefixCls}-selection__clear`}
onClick={this.onClearSelection}
/>
>{clearIcon || <i class={`${prefixCls}-selection__clear-icon`}>×</i>}</span>
)
if (!allowClear) {
return null
@ -1609,16 +1375,7 @@ const Select = {
}
return null
},
// rootRefClick (e) {
// // e.stopPropagation()
// if (this._focused) {
// // this.getInputDOMNode().blur()
// this.onOuterBlur()
// } else {
// this.onOuterFocus()
// // this.getInputDOMNode().focus()
// }
// },
selectionRefClick (e) {
e.stopPropagation()
if (!this.disabled) {
@ -1655,6 +1412,7 @@ const Select = {
const multiple = isMultipleOrTags(props)
const state = this.$data
const { disabled, prefixCls } = props
const inputIcon = getComponentFromProp(this, 'inputIcon')
const ctrlNode = this.renderTopControlNode()
const { _open: open, _inputValue: inputValue, _value: value } = this.$data
if (open) {
@ -1729,6 +1487,7 @@ const Select = {
onMouseenter={mouseenter}
onMouseleave={mouseleave}
showAction={props.showAction}
menuItemSelectedIcon={getComponentFromProp(this, 'menuItemSelectedIcon')}
{...{ directives: [{
name: 'ref',
value: this.saveSelectTriggerRef,
@ -1741,6 +1500,9 @@ const Select = {
}] }}
style={getStyle(this)}
class={classnames(rootCls)}
onMousedown={this.markMouseDown}
onMouseup={this.markMouseLeave}
onMouseout={this.markMouseLeave}
// tabindex='-1'
// onBlur={this.onOuterBlur}
// onFocus={this.onOuterFocus}
@ -1756,7 +1518,7 @@ const Select = {
unselectable='unselectable'
// onClick={this.onArrowClick}
>
<b />
{inputIcon || <i class={`${prefixCls}-arrow-icon`} />}
</span>)}
</div>
</div>

24
components/vc-select/assets/index.less

@ -14,12 +14,6 @@
color: #666;
line-height: 28px;
&-allow-clear {
.@{selectPrefixCls}-selection--single .@{selectPrefixCls}-selection__rendered {
padding-right: 40px;
}
}
ul, li {
margin: 0;
padding: 0;
@ -39,8 +33,10 @@
right: 1px;
width: 20px;
outline: none;
b {
border-color: #999999 transparent transparent transparent;
}
&-arrow &-arrow-icon {
border-color: #999999 transparent transparent transparent;
border-style: solid;
border-width: 5px 4px 0 4px;
height: 0;
@ -50,7 +46,6 @@
position: absolute;
top: 50%;
left: 50%;
}
}
&-selection {
@ -75,9 +70,8 @@
font-weight: bold;
position: absolute;
line-height: 28px;
&:after {
content: '×'
&-icon {
font-style: normal;
}
}
}
@ -118,7 +112,6 @@
white-space: nowrap;
text-overflow: ellipsis;
margin-left: 10px;
padding-right: 20px;
line-height: 28px;
}
@ -318,8 +311,9 @@
top: 0;
right: 2px;
transition: opacity .3s, transform .3s;
&:before {
content: '×'
&-icon {
font-style: normal;
}
&:hover {

2
components/vc-select/index.js

@ -1,4 +1,4 @@
// based on vc-select 7.7.5
// based on vc-select 8.4.4
import ProxySelect, { Select } from './Select'
import Option from './Option'
import { SelectPropTypes } from './PropTypes'

Loading…
Cancel
Save