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

style(tree-select & tag-input): use text-overflow ellipsis when tag text exceeds width #3197

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion src/_common
Submodule _common updated 37 files
+1 −1 docs/mobile/_design/Footer.md
+1 −1 docs/mobile/_design/Loading.md
+1 −1 docs/mobile/_design/PullDownRefresh.md
+17 −0 docs/mobile/api/divider.en-US.md
+3 −9 docs/mobile/api/divider.md
+37 −0 docs/mobile/api/progress.en-US.md
+17 −12 docs/mobile/api/progress.md
+1 −1 docs/mobile/design/footer.md
+1 −1 docs/mobile/design/loading.md
+1 −1 docs/mobile/design/pull-down-refresh.md
+68 −0 docs/web/_design/聊天 Chat.md
+15 −0 docs/web/api/chat-action.md
+60 −0 docs/web/api/chat-ai.md
+21 −0 docs/web/api/chat-content.md
+19 −0 docs/web/api/chat-input.md
+38 −0 docs/web/api/chat-item.md
+36 −0 docs/web/api/chat.md
+1 −1 docs/web/api/checkbox.en-US.md
+1 −1 docs/web/api/checkbox.md
+1 −0 docs/web/api/range-input.en-US.md
+1 −0 docs/web/api/range-input.md
+30 −0 js/progress/const.ts
+1 −3 style/mobile/components/_index.less
+1 −1 style/mobile/components/collapse/_index.less
+34 −35 style/mobile/components/divider/_index.less
+5 −3 style/mobile/components/divider/_var.less
+174 −68 style/mobile/components/progress/_index.less
+40 −30 style/mobile/components/progress/_var.less
+6 −0 style/mobile/components/rate/v2/_index.less
+3 −3 style/mobile/components/slider/_index.less
+10 −0 style/web/components/chat/_doc.less
+386 −0 style/web/components/chat/_index.less
+0 −0 style/web/components/chat/_mixin.less
+57 −0 style/web/components/chat/_var.less
+108 −0 style/web/components/chat/atom-one-dark.less
+15 −6 style/web/components/dialog/_index.less
+23 −7 style/web/components/range-input/_index.less
21 changes: 6 additions & 15 deletions src/tree-select/__tests__/__snapshots__/index.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,9 @@ exports[`TreeSelect > :props > :defaultValue 1`] = `
class="t-input__prefix"
>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
深圳市
</span>
<svg
Expand All @@ -81,12 +78,9 @@ exports[`TreeSelect > :props > :defaultValue 1`] = `
</svg>
</div>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
广州市
</span>
<svg
Expand Down Expand Up @@ -477,12 +471,9 @@ exports[`TreeSelect > :props > :multiple 1`] = `
class="t-input__prefix"
>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
/>
<span />
<svg
class="t-icon t-icon-close t-tag__icon-close"
fill="none"
Expand Down
1 change: 0 additions & 1 deletion src/tree-select/tree-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ export default defineComponent({
size: this.size,
},
tagProps: {
maxWidth: 300,
...(this.tagProps as TdTreeSelectProps['tagProps']),
},
label: this.renderLabel,
Expand Down
42 changes: 12 additions & 30 deletions test/snap/__snapshots__/csr.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -131503,12 +131503,9 @@ exports[`csr snapshot test > csr test ./src/tree-select/_example/collapsed.vue 1
class="t-input__prefix"
>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
广州市
</span>
<svg
Expand Down Expand Up @@ -131857,12 +131854,9 @@ exports[`csr snapshot test > csr test ./src/tree-select/_example/multiple.vue 1`
class="t-input__prefix"
>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
tdesign-vue
</span>
<svg
Expand All @@ -131879,12 +131873,9 @@ exports[`csr snapshot test > csr test ./src/tree-select/_example/multiple.vue 1`
</svg>
</div>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
tdesign-react
</span>
<svg
Expand All @@ -131901,12 +131892,9 @@ exports[`csr snapshot test > csr test ./src/tree-select/_example/multiple.vue 1`
</svg>
</div>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
tdesign-miniprogram
</span>
<svg
Expand Down Expand Up @@ -132272,12 +132260,9 @@ exports[`csr snapshot test > csr test ./src/tree-select/_example/valuetype.vue 1
class="t-input__prefix"
>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
广州市
</span>
<svg
Expand All @@ -132294,12 +132279,9 @@ exports[`csr snapshot test > csr test ./src/tree-select/_example/valuetype.vue 1
</svg>
</div>
<div
class="t-tag t-tag--default t-tag--dark t-tag--ellipsis t-tag--close"
class="t-tag t-tag--default t-tag--dark t-tag--close"
>
<span
class="t-tag--text"
style="max-width: 300px;"
>
<span>
深圳市
</span>
<svg
Expand Down
Loading
Loading