refactor: input

pull/5043/head
tangjinzhou 2021-12-15 22:27:07 +08:00
parent 5543ce6add
commit 296a2e549a
16 changed files with 42 additions and 47 deletions

View File

@ -17,7 +17,7 @@ exports[`renders ./components/auto-complete/demo/certain-category.vue correctly
<div class="ant-select ant-select-lg certain-category-search ant-select-lg ant-select-show-search ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search" style="width: 100%;"> <div class="ant-select ant-select-lg certain-category-search ant-select-lg ant-select-show-search ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search" style="width: 100%;">
<!----> <!---->
<!----> <!---->
<div class="ant-select-selector"><span class="ant-select-selection-search"><span class="ant-select-selection-search-input ant-input-affix-wrapper"><!----><input placeholder="input here" id="rc_select_TEST_OR_SSR" type="search" autocomplete="off" class="ant-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0"><span class="ant-input-suffix"><!----><span role="img" aria-label="search" class="anticon anticon-search certain-category-icon"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></span></span></span> <div class="ant-select-selector"><span class="ant-select-selection-search"><span class="ant-input-affix-wrapper ant-select-selection-search-input"><!----><input placeholder="input here" id="rc_select_TEST_OR_SSR" autocomplete="off" type="search" class="ant-input" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0"><span class="ant-input-suffix"><!----><span role="img" aria-label="search" class="anticon anticon-search certain-category-icon"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></span></span></span>
<!----><span class="ant-select-selection-placeholder"><!----></span> <!----><span class="ant-select-selection-placeholder"><!----></span>
</div> </div>
<!----> <!---->
@ -30,7 +30,7 @@ exports[`renders ./components/auto-complete/demo/custom.vue correctly 1`] = `
<div style="width: 200px;" class="ant-select ant-select-show-search ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search"> <div style="width: 200px;" class="ant-select ant-select-show-search ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search">
<!----> <!---->
<!----> <!---->
<div class="ant-select-selector"><span class="ant-select-selection-search"><textarea placeholder="input here" id="rc_select_TEST_OR_SSR" class="ant-input ant-select-selection-search-input" style="height: 50px;" autocomplete="off" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0"></textarea></span> <div class="ant-select-selector"><span class="ant-select-selection-search"><textarea placeholder="input here" id="rc_select_TEST_OR_SSR" autocomplete="off" class="ant-input ant-select-selection-search-input" style="height: 50px;" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0"></textarea></span>
<!----><span class="ant-select-selection-placeholder"><!----></span> <!----><span class="ant-select-selection-placeholder"><!----></span>
</div> </div>
<!----> <!---->
@ -67,7 +67,7 @@ exports[`renders ./components/auto-complete/demo/uncertain-category.vue correctl
<div class="ant-select ant-select-lg global-search ant-select-lg ant-select-show-search ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search" style="width: 100%;"> <div class="ant-select ant-select-lg global-search ant-select-lg ant-select-show-search ant-select-auto-complete ant-select-single ant-select-customize-input ant-select-show-search" style="width: 100%;">
<!----> <!---->
<!----> <!---->
<div class="ant-select-selector"><span class="ant-select-selection-search"><span class="ant-input-search ant-select-selection-search-input ant-input-search-enter-button ant-input-search-large ant-input-group-wrapper ant-input-group-wrapper-lg"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input here" id="rc_select_TEST_OR_SSR" type="search" autocomplete="off" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0" class="ant-input ant-input-lg"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-btn-lg ant-input-search-button" type="button"><!----><span role="img" aria-label="search" class="anticon anticon-search"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></button></span></span></span></span> <div class="ant-select-selector"><span class="ant-select-selection-search"><span class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button ant-select-selection-search-input"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input here" id="rc_select_TEST_OR_SSR" autocomplete="off" type="search" class="ant-input ant-input-lg" role="combobox" aria-haspopup="listbox" aria-owns="rc_select_TEST_OR_SSR_list" aria-autocomplete="list" aria-controls="rc_select_TEST_OR_SSR_list" aria-activedescendant="rc_select_TEST_OR_SSR_list_0"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-btn-lg ant-input-search-button" type="button"><!----><span role="img" aria-label="search" class="anticon anticon-search"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></button></span></span></span></span>
<!----><span class="ant-select-selection-placeholder"><!----></span> <!----><span class="ant-select-selection-placeholder"><!----></span>
</div> </div>
<!----> <!---->

View File

@ -1,56 +1,56 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders ./components/cascader/demo/basic.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/basic.vue correctly 1`] = `
<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
`; `;
exports[`renders ./components/cascader/demo/change-on-select.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/change-on-select.vue correctly 1`] = `
<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
`; `;
exports[`renders ./components/cascader/demo/custom-render.vue correctly 1`] = `<!----><span class="ant-cascader-picker" style="width: 100%;" tabindex="0"><span class="ant-cascader-picker-label"><span><span>Zhejiang /</span></span><span><span>Hangzhou /</span></span><span><span>West Lake ( <a>752100</a> ) </span></span></span><input type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-cascader-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>`; exports[`renders ./components/cascader/demo/custom-render.vue correctly 1`] = `<!----><span class="ant-cascader-picker" style="width: 100%;" tabindex="0"><span class="ant-cascader-picker-label"><span><span>Zhejiang /</span></span><span><span>Hangzhou /</span></span><span><span>West Lake ( <a>752100</a> ) </span></span></span><input autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-cascader-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>`;
exports[`renders ./components/cascader/demo/custom-trigger.vue correctly 1`] = `<span>Unselect &nbsp; <!----><a href="#" tabindex="0">Change city</a></span>`; exports[`renders ./components/cascader/demo/custom-trigger.vue correctly 1`] = `<span>Unselect &nbsp; <!----><a href="#" tabindex="0">Change city</a></span>`;
exports[`renders ./components/cascader/demo/disabled-option.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/disabled-option.vue correctly 1`] = `
<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
`; `;
exports[`renders ./components/cascader/demo/fields-name.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/fields-name.vue correctly 1`] = `
<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
`; `;
exports[`renders ./components/cascader/demo/hover.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/hover.vue correctly 1`] = `
<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"><!----></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"><!----></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
`; `;
exports[`renders ./components/cascader/demo/lazy.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/lazy.vue correctly 1`] = `
<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
`; `;
exports[`renders ./components/cascader/demo/search.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/search.vue correctly 1`] = `
<!----><span class="ant-cascader-picker ant-cascader-picker-show-search" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker ant-cascader-picker-show-search" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
`; `;
exports[`renders ./components/cascader/demo/size.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/size.vue correctly 1`] = `
<!----><span class="ant-cascader-picker ant-cascader-picker-large" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input ant-input-lg"> <!----><span class="ant-cascader-picker ant-cascader-picker-large" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input ant-input-lg">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span><br><br> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span><br><br>
<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span><br><br> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span><br><br>
<!----><span class="ant-cascader-picker ant-cascader-picker-small" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input ant-input-sm"> <!----><span class="ant-cascader-picker ant-cascader-picker-small" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input ant-input-sm">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span><br><br> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span><br><br>
`; `;
exports[`renders ./components/cascader/demo/suffix.vue correctly 1`] = ` exports[`renders ./components/cascader/demo/suffix.vue correctly 1`] = `
<!----><span class="ant-cascader-picker" style="margin-top: 1rem;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" style="margin-top: 1rem;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="smile" class="anticon anticon-smile ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span></span> <!----><span role="img" aria-label="smile" class="anticon anticon-smile ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg></span></span>
<!----><span class="ant-cascader-picker" style="margin-top: 1rem;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" readonly="" suffixicon="ab" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" style="margin-top: 1rem;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" readonly="" suffixicon="ab" class="ant-input ant-cascader-input">
<!----><span class="ant-cascader-picker-arrow">ab</span></span> <!----><span class="ant-cascader-picker-arrow">ab</span></span>
`; `;

View File

@ -113,4 +113,4 @@ exports[`Cascader popup correctly with defaultValue 1`] = `
</div> </div>
`; `;
exports[`Cascader support controlled mode 1`] = `<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label">Zhejiang / Hangzhou / West Lake</span><input type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-cascader-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>`; exports[`Cascader support controlled mode 1`] = `<!----><span class="ant-cascader-picker" tabindex="0"><span class="ant-cascader-picker-label">Zhejiang / Hangzhou / West Lake</span><input autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input"><span tabindex="-1" role="img" aria-label="close-circle" class="anticon anticon-close-circle ant-cascader-picker-clear"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>`;

View File

@ -77,7 +77,7 @@ exports[`MonthPicker and WeekPicker render WeekPicker 1`] = `
<div style="position: absolute; top: 0px; left: 0px; width: 100%;"> <div style="position: absolute; top: 0px; left: 0px; width: 100%;">
<div> <div>
<!----> <!---->
<div class="ant-picker-dropdown" style="pointer-events: none;"> <div class="ant-picker-dropdown ant-slide-up-enter-from ant-slide-up-enter-active" style="pointer-events: none; opacity: 0;">
<div class="ant-picker-panel-container"> <div class="ant-picker-panel-container">
<div tabindex="-1" class="ant-picker-panel ant-picker-panel-focused"> <div tabindex="-1" class="ant-picker-panel ant-picker-panel-focused">
<div class="ant-picker-week-panel"> <div class="ant-picker-week-panel">

View File

@ -50,7 +50,7 @@ exports[`renders ./components/empty/demo/config-provider.vue correctly 1`] = `
<!----> <!---->
</div> </div>
<h3>Cascader</h3> <h3>Cascader</h3>
<!----><span class="ant-cascader-picker ant-cascader-picker-show-search" style="width: 200px;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" type="text" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker ant-cascader-picker-show-search" style="width: 200px;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Please select" autocomplete="off" type="text" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
<h3>Transfer</h3> <h3>Transfer</h3>
<div class="ant-transfer"> <div class="ant-transfer">

View File

@ -141,7 +141,7 @@ exports[`renders ./components/form/demo/custom-validation.vue correctly 1`] = `
</label></div> </label></div>
<div class="ant-col ant-col-14 ant-form-item-control"> <div class="ant-col ant-col-14 ant-form-item-control">
<div class="ant-form-item-control-input"> <div class="ant-form-item-control-input">
<div class="ant-form-item-control-input-content"><input type="password" id="custom-validation_pass" autocomplete="off" class="ant-input"></div> <div class="ant-form-item-control-input-content"><input autocomplete="off" type="password" id="custom-validation_pass" class="ant-input"></div>
<!----> <!---->
</div> </div>
<!----> <!---->
@ -154,7 +154,7 @@ exports[`renders ./components/form/demo/custom-validation.vue correctly 1`] = `
</label></div> </label></div>
<div class="ant-col ant-col-14 ant-form-item-control"> <div class="ant-col ant-col-14 ant-form-item-control">
<div class="ant-form-item-control-input"> <div class="ant-form-item-control-input">
<div class="ant-form-item-control-input-content"><input type="password" id="custom-validation_checkPass" autocomplete="off" class="ant-input"></div> <div class="ant-form-item-control-input-content"><input autocomplete="off" type="password" id="custom-validation_checkPass" class="ant-input"></div>
<!----> <!---->
</div> </div>
<!----> <!---->

View File

@ -295,6 +295,7 @@ export default defineComponent({
'inputType', 'inputType',
'bordered', 'bordered',
'htmlSize', 'htmlSize',
'lazy',
]); ]);
const inputProps = { const inputProps = {
...otherProps, ...otherProps,
@ -314,6 +315,7 @@ export default defineComponent({
ref: inputRef, ref: inputRef,
key: 'ant-input', key: 'ant-input',
size: htmlSize, size: htmlSize,
id: otherProps.id ?? formItemContext.id.value,
}; };
if (valueModifiers.lazy) { if (valueModifiers.lazy) {
delete inputProps.onInput; delete inputProps.onInput;

View File

@ -82,7 +82,7 @@ export default defineComponent({
}); });
const omittedProps = { const omittedProps = {
...omit(restProps, ['suffix', 'iconRender']), ...omit(restProps, ['suffix', 'iconRender', 'action']),
...attrs, ...attrs,
type: visible.value ? 'text' : 'password', type: visible.value ? 'text' : 'password',
class: inputClassName, class: inputClassName,

View File

@ -73,7 +73,6 @@ export default defineComponent({
} = props; } = props;
let { enterButton = slots.enterButton?.() } = props; let { enterButton = slots.enterButton?.() } = props;
enterButton = enterButton || enterButton === ''; enterButton = enterButton || enterButton === '';
const searchIcon = typeof enterButton === 'boolean' ? <SearchOutlined /> : null;
const btnClassName = `${prefixCls.value}-button`; const btnClassName = `${prefixCls.value}-button`;
const enterButtonAsElement = Array.isArray(enterButton) ? enterButton[0] : enterButton; const enterButtonAsElement = Array.isArray(enterButton) ? enterButton[0] : enterButton;
@ -82,7 +81,6 @@ export default defineComponent({
enterButtonAsElement.type && enterButtonAsElement.type &&
isPlainObject(enterButtonAsElement.type) && isPlainObject(enterButtonAsElement.type) &&
enterButtonAsElement.type.__ANT_BUTTON; enterButtonAsElement.type.__ANT_BUTTON;
if (isAntdButton || enterButtonAsElement.tagName === 'button') { if (isAntdButton || enterButtonAsElement.tagName === 'button') {
button = cloneElement( button = cloneElement(
enterButtonAsElement, enterButtonAsElement,
@ -110,9 +108,8 @@ export default defineComponent({
onMousedown={onMousedown} onMousedown={onMousedown}
onClick={onSearch} onClick={onSearch}
loading={loading} loading={loading}
icon={searchIcon}
> >
{enterButton} {enterButton === true ? <SearchOutlined /> : enterButton}
</Button> </Button>
); );
} }
@ -131,7 +128,7 @@ export default defineComponent({
return ( return (
<Input <Input
ref={inputRef} ref={inputRef}
{...omit(restProps, ['onUpdate:value', 'onSearch'])} {...omit(restProps, ['onUpdate:value', 'onSearch', 'enterButton'])}
{...attrs} {...attrs}
onPressEnter={onSearch} onPressEnter={onSearch}
size={size.value} size={size.value}

View File

@ -113,7 +113,7 @@ export default defineComponent({
const resizeProps = { const resizeProps = {
...omit(props, ['allowClear']), ...omit(props, ['allowClear']),
...attrs, ...attrs,
style: showCount.value && style, style: showCount.value ? {} : style,
class: { class: {
[`${prefixCls.value}-borderless`]: !bordered, [`${prefixCls.value}-borderless`]: !bordered,
[`${customClass}`]: customClass && !showCount.value, [`${customClass}`]: customClass && !showCount.value,

View File

@ -1,5 +1,5 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP // Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Input.Search should support custom Button 1`] = `<span class="ant-input-search ant-input-search-enter-button ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><!----><input type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-input-search-button" type="button"><!----><span>ok</span></button></span></span></span>`; exports[`Input.Search should support custom Button 1`] = `<span class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"><span class="ant-input-wrapper ant-input-group"><!----><input type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-input-search-button" type="button"><!----><span>ok</span></button></span></span></span>`;
exports[`Input.Search should support custom button 1`] = `<span class="ant-input-search ant-input-search-enter-button ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><!----><input type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-input-search-button" type="button"><!----><button type="button">ok</button></button></span></span></span>`; exports[`Input.Search should support custom button 1`] = `<span class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"><span class="ant-input-wrapper ant-input-group"><!----><input type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-input-search-button" type="button"><!----><button type="button">ok</button></button></span></span></span>`;

View File

@ -17,14 +17,14 @@ exports[`renders ./components/input/demo/addon.vue correctly 1`] = `
`; `;
exports[`renders ./components/input/demo/allow-clear.vue correctly 1`] = ` exports[`renders ./components/input/demo/allow-clear.vue correctly 1`] = `
<div><span class="ant-input-affix-wrapper"><!----><input placeholder="input with clear icon" type="text" class="ant-input"><span class="ant-input-suffix"><span role="img" tabindex="-1" aria-label="close-circle" class="anticon anticon-close-circle ant-input-clear-icon ant-input-clear-icon-hidden"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span> <div><span class="ant-input-affix-wrapper"><!----><input placeholder="input with clear icon" type="text" class="ant-input"><span class="ant-input-suffix"><span role="img" tabindex="-1" aria-label="close-circle" class="anticon anticon-close-circle ant-input-clear-icon-hidden ant-input-clear-icon"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span>
<!----></span></span><br><br><span class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"><textarea placeholder="textarea with clear icon" class="ant-input"></textarea><span role="img" tabindex="-1" aria-label="close-circle" class="anticon anticon-close-circle ant-input-textarea-clear-icon ant-input-textarea-clear-icon-hidden"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span> <!----></span></span><br><br><span class="ant-input-affix-wrapper ant-input-affix-wrapper-textarea-with-clear-btn"><textarea placeholder="textarea with clear icon" class="ant-input"></textarea><span role="img" tabindex="-1" aria-label="close-circle" class="anticon anticon-close-circle ant-input-clear-icon-hidden ant-input-clear-icon"><svg focusable="false" class="" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg></span></span>
</div> </div>
`; `;
exports[`renders ./components/input/demo/autosize-textarea.vue correctly 1`] = ` exports[`renders ./components/input/demo/autosize-textarea.vue correctly 1`] = `
<div><textarea placeholder="Autosize height based on content lines" class="ant-input" style="height: 0px; min-height: -9007199254740991px; max-height: 9007199254740991px; resize: none;"></textarea> <div><textarea placeholder="Autosize height based on content lines" class="ant-input"></textarea>
<div style="margin: 24px 0px;"></div><textarea placeholder="Autosize height with minimum and maximum number of lines" class="ant-input" style="height: -20px; min-height: -8px; max-height: -20px; resize: none;"></textarea> <div style="margin: 24px 0px;"></div><textarea placeholder="Autosize height with minimum and maximum number of lines" class="ant-input"></textarea>
</div> </div>
`; `;
@ -76,21 +76,17 @@ exports[`renders ./components/input/demo/group.vue correctly 1`] = `
</div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span> </div><span class="ant-select-arrow" style="user-select: none;" unselectable="on" aria-hidden="true"><span role="img" aria-label="down" class="anticon anticon-down ant-select-suffix"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span>
<!----> <!---->
</div> </div>
<!----><span class="ant-cascader-picker" style="width: 70%;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Select Address" type="text" readonly="" autocomplete="off" class="ant-input ant-cascader-input"> <!----><span class="ant-cascader-picker" style="width: 70%;" tabindex="0"><span class="ant-cascader-picker-label"></span><input placeholder="Select Address" autocomplete="off" type="text" readonly="" class="ant-input ant-cascader-input">
<!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></span></div> <!----><span role="img" aria-label="down" class="anticon anticon-down ant-cascader-picker-arrow"><svg focusable="false" class="" data-icon="down" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"></path></svg></span></span></span></div>
`; `;
exports[`renders ./components/input/demo/password-input.vue correctly 1`] = `<span class="ant-input-password ant-input-affix-wrapper"><!----><input placeholder="input password" type="password" class="ant-input"><span class="ant-input-suffix"><!----><span tabindex="-1" role="img" aria-label="eye-invisible" class="anticon anticon-eye-invisible ant-input-password-icon"><svg focusable="false" class="" data-icon="eye-invisible" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"></path><path d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"></path></svg></span></span></span>`; exports[`renders ./components/input/demo/password-input.vue correctly 1`] = `<span class="ant-input-affix-wrapper ant-input-password"><!----><input placeholder="input password" type="password" class="ant-input"><span class="ant-input-suffix"><!----><span tabindex="-1" role="img" aria-label="eye-invisible" class="anticon anticon-eye-invisible ant-input-password-icon"><svg focusable="false" class="" data-icon="eye-invisible" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"></path><path d="M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"></path></svg></span></span></span>`;
exports[`renders ./components/input/demo/presuffix.vue correctly 1`] = `<div class="components-input-demo-presuffix"><span class="ant-input-affix-wrapper"><span class="ant-input-prefix"><span type="user" role="img" aria-label="user" class="anticon anticon-user"><svg focusable="false" class="" data-icon="user" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"></path></svg></span></span><input placeholder="Basic usage" type="text" class="ant-input"><span class="ant-input-suffix"><!----><!----><span style="color: rgba(0, 0, 0, 0.45);" tabindex="-1" role="img" aria-label="info-circle" class="anticon anticon-info-circle"><svg focusable="false" class="" data-icon="info-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path></svg></span></span></span><br><br><span class="ant-input-affix-wrapper"><span class="ant-input-prefix">¥</span><input type="text" class="ant-input"><span class="ant-input-suffix"><!---->RMB</span></span></div>`; exports[`renders ./components/input/demo/presuffix.vue correctly 1`] = `<div class="components-input-demo-presuffix"><span class="ant-input-affix-wrapper"><span class="ant-input-prefix"><span type="user" role="img" aria-label="user" class="anticon anticon-user"><svg focusable="false" class="" data-icon="user" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"></path></svg></span></span><input placeholder="Basic usage" type="text" class="ant-input"><span class="ant-input-suffix"><!----><!----><span style="color: rgba(0, 0, 0, 0.45);" tabindex="-1" role="img" aria-label="info-circle" class="anticon anticon-info-circle"><svg focusable="false" class="" data-icon="info-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"></path><path d="M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"></path></svg></span></span></span><br><br><span class="ant-input-affix-wrapper"><span class="ant-input-prefix">¥</span><input type="text" class="ant-input"><span class="ant-input-suffix"><!---->RMB</span></span></div>`;
exports[`renders ./components/input/demo/search-input.vue correctly 1`] = `<div><span class="ant-input-search ant-input-affix-wrapper" style="width: 200px;"><!----><input placeholder="input search text" type="text" class="ant-input"><span class="ant-input-suffix"><!----><span tabindex="-1" role="img" aria-label="search" class="anticon anticon-search ant-input-search-icon"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></span></span><br><br><span class="ant-input-search ant-input-search-enter-button ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search text" type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-input-search-button" type="button"><!----><span role="img" aria-label="search" class="anticon anticon-search"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></button></span></span></span><br><br><span class="ant-input-search ant-input-search-enter-button ant-input-search-large ant-input-group-wrapper ant-input-group-wrapper-lg"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search text" type="text" class="ant-input ant-input-lg"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-btn-lg ant-input-search-button" type="button"><!----><span>Search</span></button></span></span></span><br><br><span class="ant-input-search ant-input-search-enter-button ant-input-search-large ant-input-group-wrapper ant-input-group-wrapper-lg"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search text" type="text" class="ant-input ant-input-lg"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-lg ant-input-search-button" type="button"><!----><span>Custom</span></button></span></span></span></div>`; exports[`renders ./components/input/demo/search-input.vue correctly 1`] = `<div><span class="ant-input-group-wrapper ant-input-search" style="width: 200px;"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search text" type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-input-search-button" type="button"><!----></button></span></span></span><br><br><span class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search text" type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-input-search-button" type="button"><!----><span role="img" aria-label="search" class="anticon anticon-search"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></button></span></span></span><br><br><span class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search text" type="text" class="ant-input ant-input-lg"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-btn-lg ant-input-search-button" type="button"><!----><span>Search</span></button></span></span></span><br><br><span class="ant-input-group-wrapper ant-input-group-wrapper-lg ant-input-search ant-input-search-large ant-input-search-with-button"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search text" type="text" class="ant-input ant-input-lg"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-lg ant-input-search-button" type="button"><!----><span>Custom</span></button></span></span></span></div>`;
exports[`renders ./components/input/demo/search-input-loading.vue correctly 1`] = ` exports[`renders ./components/input/demo/search-input-loading.vue correctly 1`] = `<div><span class="ant-input-group-wrapper ant-input-search"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search loading deault" type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-loading ant-input-search-button ant-btn-icon-only" type="button"><span role="img" aria-label="loading" class="anticon anticon-loading"><svg focusable="false" class="anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="0 0 1024 1024"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></button></span></span></span><br><br><span class="ant-input-group-wrapper ant-input-search ant-input-search-with-button"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search loading with enterButton" type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-btn-loading ant-input-search-button" type="button"><span role="img" aria-label="loading" class="anticon anticon-loading"><svg focusable="false" class="anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="0 0 1024 1024"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span><span role="img" aria-label="search" class="anticon anticon-search"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></button></span></span></span></div>`;
<div><span class="ant-input-search ant-input-affix-wrapper"><!----><input placeholder="input search loading deault" type="text" class="ant-input"><span class="ant-input-suffix"><!----><!----><span role="img" aria-label="loading" class="anticon anticon-loading ant-input-search-icon"><svg focusable="false" class="anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="0 0 1024 1024"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></span></span><br><br><span class="ant-input-search ant-input-search-enter-button ant-input-group-wrapper"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="input search loading with enterButton" type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-btn-primary ant-input-search-button" type="button"><!----><span role="img" aria-label="loading" class="anticon anticon-loading"><svg focusable="false" class="anticon-spin" data-icon="loading" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="0 0 1024 1024"><path d="M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"></path></svg></span></button>
<!----></span></span></span>
</div>
`;
exports[`renders ./components/input/demo/show-count.vue correctly 1`] = `<div class="ant-input-textarea ant-input-textarea-show-count" data-count="10 / 100"><textarea maxlength="100" class="ant-input"></textarea></div>`; exports[`renders ./components/input/demo/show-count.vue correctly 1`] = `<div class="ant-input-textarea ant-input-textarea-show-count" data-count="10 / 100"><textarea maxlength="100" class="ant-input"></textarea></div>`;

View File

@ -2,7 +2,7 @@
exports[`Input should support maxlength 1`] = `<input maxlength="3" type="text" class="ant-input">`; exports[`Input should support maxlength 1`] = `<input maxlength="3" type="text" class="ant-input">`;
exports[`Input.Search should support suffix 1`] = `<span class="ant-input-search ant-input-affix-wrapper"><!----><input type="text" class="ant-input"><span class="ant-input-suffix"><!---->suffix<span tabindex="-1" role="img" aria-label="search" class="anticon anticon-search ant-input-search-icon"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></span></span>`; exports[`Input.Search should support suffix 1`] = `<span class="ant-input-group-wrapper ant-input-search"><span class="ant-input-wrapper ant-input-group"><!----><span class="ant-input-affix-wrapper"><!----><input type="text" class="ant-input"><span class="ant-input-suffix"><!---->suffix</span></span><span class="ant-input-group-addon"><button class="ant-btn ant-input-search-button" type="button"><!----></button></span></span></span>`;
exports[`TextArea should support disabled 1`] = `<textarea disabled="" class="ant-input ant-input-disabled"></textarea>`; exports[`TextArea should support disabled 1`] = `<textarea disabled="" class="ant-input ant-input-disabled"></textarea>`;

View File

@ -16,7 +16,7 @@ exports[`Slider should show tooltip when hovering slider handler 1`] = `
<div style="position: absolute; top: 0px; left: 0px; width: 100%;"> <div style="position: absolute; top: 0px; left: 0px; width: 100%;">
<div> <div>
<!----> <!---->
<div class="ant-tooltip ant-slider-tooltip" style="pointer-events: none;"> <div class="ant-tooltip ant-slider-tooltip ant-zoom-down-enter-from ant-zoom-down-enter-active" style="pointer-events: none; opacity: 0;">
<div class="ant-tooltip-content"> <div class="ant-tooltip-content">
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div> <div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
<div class="ant-tooltip-inner" role="tooltip">30</div> <div class="ant-tooltip-inner" role="tooltip">30</div>
@ -42,7 +42,7 @@ exports[`Slider should show tooltip when hovering slider handler 2`] = `
<div style="position: absolute; top: 0px; left: 0px; width: 100%;"> <div style="position: absolute; top: 0px; left: 0px; width: 100%;">
<div> <div>
<!----> <!---->
<div class="ant-tooltip ant-slider-tooltip" style="pointer-events: none; display: none;"> <div class="ant-tooltip ant-slider-tooltip ant-zoom-down-leave-from ant-zoom-down-leave-active" style="pointer-events: none;">
<div class="ant-tooltip-content"> <div class="ant-tooltip-content">
<div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div> <div class="ant-tooltip-arrow"><span class="ant-tooltip-arrow-content"></span></div>
<div class="ant-tooltip-inner" role="tooltip">30</div> <div class="ant-tooltip-inner" role="tooltip">30</div>

View File

@ -369,7 +369,7 @@ exports[`renders ./components/tree/demo/replaceFields.vue correctly 1`] = `
`; `;
exports[`renders ./components/tree/demo/search.vue correctly 1`] = ` exports[`renders ./components/tree/demo/search.vue correctly 1`] = `
<div><span class="ant-input-search ant-input-affix-wrapper" style="margin-bottom: 8px;"><!----><input placeholder="Search" type="text" class="ant-input"><span class="ant-input-suffix"><!----><span tabindex="-1" role="img" aria-label="search" class="anticon anticon-search ant-input-search-icon"><svg focusable="false" class="" data-icon="search" width="1em" height="1em" fill="currentColor" aria-hidden="true" viewBox="64 64 896 896"><path d="M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"></path></svg></span></span></span> <div><span class="ant-input-group-wrapper ant-input-search" style="margin-bottom: 8px;"><span class="ant-input-wrapper ant-input-group"><!----><input placeholder="Search" type="text" class="ant-input"><span class="ant-input-group-addon"><button class="ant-btn ant-input-search-button" type="button"><!----></button></span></span></span>
<div role="tree" class="ant-tree ant-tree-icon-hide"> <div role="tree" class="ant-tree ant-tree-icon-hide">
<!----> <!---->
<div><input style="width: 0px; height: 0px; display: flex; overflow: hidden; opacity: 0; border: 0px; padding: 0px; margin: 0px;" tabindex="0" aria-label="for screen reader"></div> <div><input style="width: 0px; height: 0px; display: flex; overflow: hidden; opacity: 0; border: 0px; padding: 0px; margin: 0px;" tabindex="0" aria-label="for screen reader"></div>

View File

@ -27,10 +27,10 @@ import {
computed, computed,
toRaw, toRaw,
} from 'vue'; } from 'vue';
import type { AutoSizeType } from '../input/ResizableTextArea';
import useConfigInject from '../_util/hooks/useConfigInject'; import useConfigInject from '../_util/hooks/useConfigInject';
import type { EventHandler } from '../_util/EventInterface'; import type { EventHandler } from '../_util/EventInterface';
import omit from '../_util/omit'; import omit from '../_util/omit';
import type { AutoSizeType } from '../input/inputProps';
export type BaseType = 'secondary' | 'success' | 'warning' | 'danger'; export type BaseType = 'secondary' | 'success' | 'warning' | 'danger';