Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix select input demo #3358

Merged
merged 2 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/select-input/_example-composition/multiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- :popup-props="{ trigger: 'hover' }" -->
<t-select-input
:input-value:sync="inputValue"
:input-value.sync="inputValue"
:value="value"
:allow-input="allowInput"
:placeholder="allowInput ? '请选择或输入' : '请选择'"
Expand Down
2 changes: 1 addition & 1 deletion src/select-input/_example/multiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

<!-- :popup-props="{ trigger: 'hover' }" -->
<t-select-input
:input-value:sync="inputValue"
:input-value.sync="inputValue"
:value="value"
:allow-input="allowInput"
:placeholder="allowInput ? '请选择或输入' : '请选择'"
Expand Down
1 change: 0 additions & 1 deletion test/snap/__snapshots__/csr.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -93255,7 +93255,6 @@ exports[`csr snapshot test > csr test ./src/select-input/_example/multiple.vue 1
>
<div
class="t-select-input t-select-input--multiple"
input-value:sync=""
>
<div
class="t-input__wrap t-tag-input t-tag-input--break-line t-tag-input--with-tag t-tag-input__with-suffix-icon"
Expand Down
2 changes: 1 addition & 1 deletion test/snap/__snapshots__/ssr.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ exports[`ssr snapshot test > renders ./src/select-input/_example/excess-tags-dis

exports[`ssr snapshot test > renders ./src/select-input/_example/label-suffix.vue correctly 1`] = `"<div data-server-rendered=\\"true\\" class=\\"t-space t-space-vertical\\" style=\\"gap:16px;\\" data-v-1c8ac371><div class=\\"t-space-item\\"><div class=\\"t-select-input\\" style=\\"width:300px;\\" data-v-1c8ac371><div class=\\"t-input__wrap\\"><div class=\\"t-input t-is-readonly t-input--prefix t-input--suffix\\"><div class=\\"t-input__prefix\\">前置内容:</div><input readonly=\\"readonly\\" autocomplete=\\"\\" placeholder=\\"Please Select\\" type=\\"text\\" unselectable=\\"on\\" value=\\"tdesign-vue\\" class=\\"t-input__inner\\"><span class=\\"t-input__suffix t-input__suffix-icon\\"><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-chevron-down\\" data-v-1c8ac371><path fill=\\"currentColor\\" d=\\"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z\\" data-v-1c8ac371></path></svg></span></div></div></div></div><div class=\\"t-space-item\\"><br data-v-1c8ac371></div><div class=\\"t-space-item\\"><br data-v-1c8ac371></div><div class=\\"t-space-item\\"><div class=\\"t-select-input\\" style=\\"width:300px;\\" data-v-1c8ac371><div class=\\"t-input__wrap\\"><div class=\\"t-input t-is-readonly t-input--prefix t-input--suffix\\"><div class=\\"t-input__prefix\\"></div><input readonly=\\"readonly\\" autocomplete=\\"\\" placeholder=\\"Please Select\\" type=\\"text\\" unselectable=\\"on\\" value=\\"tdesign-vue\\" class=\\"t-input__inner\\"><div class=\\"t-input__suffix\\">单位:元</div><span class=\\"t-input__suffix t-input__suffix-icon\\"><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-chevron-down\\" data-v-1c8ac371><path fill=\\"currentColor\\" d=\\"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z\\" data-v-1c8ac371></path></svg></span></div></div></div></div></div>"`;

exports[`ssr snapshot test > renders ./src/select-input/_example/multiple.vue correctly 1`] = `"<div data-server-rendered=\\"true\\" class=\\"tdesign-demo__select-input-multiple t-space t-space-vertical\\" style=\\"gap:16px;width:100%;\\"><div class=\\"t-space-item\\"><div><label tabindex=\\"0\\" class=\\"t-checkbox t-is-checked\\"><input type=\\"checkbox\\" tabindex=\\"-1\\" checked=\\"checked\\" class=\\"t-checkbox__former\\"><span class=\\"t-checkbox__input\\"></span><span class=\\"t-checkbox__label\\">是否允许输入</span></label><label tabindex=\\"0\\" class=\\"t-checkbox t-is-checked\\"><input type=\\"checkbox\\" tabindex=\\"-1\\" checked=\\"checked\\" class=\\"t-checkbox__former\\"><span class=\\"t-checkbox__input\\"></span><span class=\\"t-checkbox__label\\">允许创建新选项(Enter 创建)</span></label></div></div><div class=\\"t-space-item\\"><div><div class=\\"t-radio-group t-size-m t-radio-group__outline\\"><label tabindex=\\"0\\" class=\\"t-radio\\"><input type=\\"radio\\" tabindex=\\"-1\\" data-value=\\"'scroll'\\" value=\\"scroll\\" class=\\"t-radio__former\\"><span class=\\"t-radio__input\\"></span><span class=\\"t-radio__label\\">选中项过多横向滚动</span></label><label tabindex=\\"0\\" class=\\"t-radio t-is-checked\\"><input type=\\"radio\\" tabindex=\\"-1\\" data-value=\\"'break-line'\\" value=\\"break-line\\" checked=\\"checked\\" class=\\"t-radio__former\\"><span class=\\"t-radio__input\\"></span><span class=\\"t-radio__label\\">选中项过多换行显示</span></label></div></div></div><div class=\\"t-space-item\\"><div input-value:sync=\\"\\" class=\\"t-select-input t-select-input--multiple\\"><div class=\\"t-input__wrap t-tag-input t-tag-input--break-line t-tag-input--with-tag t-tag-input__with-suffix-icon\\"><div class=\\"t-input t-input--prefix t-input--suffix\\"><div class=\\"t-input__prefix\\"><div class=\\"t-tag t-tag--default t-tag--dark t-tag--close\\"><span>Vue</span><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-close t-tag__icon-close\\"><path fill=\\"currentColor\\" d=\\"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z\\"></path></svg></div><div class=\\"t-tag t-tag--default t-tag--dark t-tag--close\\"><span>React</span><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-close t-tag__icon-close\\"><path fill=\\"currentColor\\" d=\\"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z\\"></path></svg></div><div class=\\"t-tag t-tag--default t-tag--dark t-tag--close\\"><span>Miniprogram</span><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-close t-tag__icon-close\\"><path fill=\\"currentColor\\" d=\\"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z\\"></path></svg></div></div><input autocomplete=\\"\\" placeholder=\\"\\" type=\\"text\\" unselectable=\\"off\\" value=\\"\\" class=\\"t-input__inner\\"><span class=\\"t-input__input-pre\\"></span><span class=\\"t-input__suffix t-input__suffix-icon\\"><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-chevron-down\\"><path fill=\\"currentColor\\" d=\\"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z\\"></path></svg></span></div></div></div></div></div>"`;
exports[`ssr snapshot test > renders ./src/select-input/_example/multiple.vue correctly 1`] = `"<div data-server-rendered=\\"true\\" class=\\"tdesign-demo__select-input-multiple t-space t-space-vertical\\" style=\\"gap:16px;width:100%;\\"><div class=\\"t-space-item\\"><div><label tabindex=\\"0\\" class=\\"t-checkbox t-is-checked\\"><input type=\\"checkbox\\" tabindex=\\"-1\\" checked=\\"checked\\" class=\\"t-checkbox__former\\"><span class=\\"t-checkbox__input\\"></span><span class=\\"t-checkbox__label\\">是否允许输入</span></label><label tabindex=\\"0\\" class=\\"t-checkbox t-is-checked\\"><input type=\\"checkbox\\" tabindex=\\"-1\\" checked=\\"checked\\" class=\\"t-checkbox__former\\"><span class=\\"t-checkbox__input\\"></span><span class=\\"t-checkbox__label\\">允许创建新选项(Enter 创建)</span></label></div></div><div class=\\"t-space-item\\"><div><div class=\\"t-radio-group t-size-m t-radio-group__outline\\"><label tabindex=\\"0\\" class=\\"t-radio\\"><input type=\\"radio\\" tabindex=\\"-1\\" data-value=\\"'scroll'\\" value=\\"scroll\\" class=\\"t-radio__former\\"><span class=\\"t-radio__input\\"></span><span class=\\"t-radio__label\\">选中项过多横向滚动</span></label><label tabindex=\\"0\\" class=\\"t-radio t-is-checked\\"><input type=\\"radio\\" tabindex=\\"-1\\" data-value=\\"'break-line'\\" value=\\"break-line\\" checked=\\"checked\\" class=\\"t-radio__former\\"><span class=\\"t-radio__input\\"></span><span class=\\"t-radio__label\\">选中项过多换行显示</span></label></div></div></div><div class=\\"t-space-item\\"><div class=\\"t-select-input t-select-input--multiple\\"><div class=\\"t-input__wrap t-tag-input t-tag-input--break-line t-tag-input--with-tag t-tag-input__with-suffix-icon\\"><div class=\\"t-input t-input--prefix t-input--suffix\\"><div class=\\"t-input__prefix\\"><div class=\\"t-tag t-tag--default t-tag--dark t-tag--close\\"><span>Vue</span><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-close t-tag__icon-close\\"><path fill=\\"currentColor\\" d=\\"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z\\"></path></svg></div><div class=\\"t-tag t-tag--default t-tag--dark t-tag--close\\"><span>React</span><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-close t-tag__icon-close\\"><path fill=\\"currentColor\\" d=\\"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z\\"></path></svg></div><div class=\\"t-tag t-tag--default t-tag--dark t-tag--close\\"><span>Miniprogram</span><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-close t-tag__icon-close\\"><path fill=\\"currentColor\\" d=\\"M7.05 5.64L12 10.59l4.95-4.95 1.41 1.41L13.41 12l4.95 4.95-1.41 1.41L12 13.41l-4.95 4.95-1.41-1.41L10.59 12 5.64 7.05l1.41-1.41z\\"></path></svg></div></div><input autocomplete=\\"\\" placeholder=\\"\\" type=\\"text\\" unselectable=\\"off\\" value=\\"\\" class=\\"t-input__inner\\"><span class=\\"t-input__input-pre\\"></span><span class=\\"t-input__suffix t-input__suffix-icon\\"><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-chevron-down\\"><path fill=\\"currentColor\\" d=\\"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z\\"></path></svg></span></div></div></div></div></div>"`;

exports[`ssr snapshot test > renders ./src/select-input/_example/single.vue correctly 1`] = `"<div data-server-rendered=\\"true\\" class=\\"t-select-input\\" style=\\"width:300px;\\" data-v-992b70a2><div class=\\"t-input__wrap\\"><div class=\\"t-input t-input--prefix t-input--suffix\\"><div class=\\"t-input__prefix\\"></div><input autocomplete=\\"\\" placeholder=\\"Please Select\\" type=\\"text\\" unselectable=\\"off\\" value=\\"tdesign-vue\\" class=\\"t-input__inner\\"><span class=\\"t-input__suffix t-input__suffix-icon\\"><svg fill=\\"none\\" viewBox=\\"0 0 24 24\\" width=\\"1em\\" height=\\"1em\\" class=\\"t-icon t-icon-chevron-down\\" data-v-992b70a2><path fill=\\"currentColor\\" d=\\"M17.5 8.09l-5.5 5.5-5.5-5.5L5.09 9.5 12 16.41l6.91-6.91-1.41-1.41z\\" data-v-992b70a2></path></svg></span></div></div></div>"`;

Expand Down
Loading