Skip to content

Commit

Permalink
fix: 修复 cascader 样式问题 (#3446)
Browse files Browse the repository at this point in the history
* fix: 修复 cascader label

* chore: update snapshots
  • Loading branch information
PengYYYYY authored Oct 8, 2023
1 parent 7ae5b2e commit c016733
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 119 deletions.
1 change: 1 addition & 0 deletions src/cascader/cascader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default defineComponent({
const renderLabel = () => {
const label = renderTNodeJSX('label');
if (props.multiple) return label;
if (!label) return null;
return <div class={`${classPrefix.value}-tag-input__prefix`}>{label}</div>;
};

Expand Down
126 changes: 21 additions & 105 deletions test/unit/snap/__snapshots__/csr.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29084,11 +29084,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/base.vue 1`] = `
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -29156,11 +29152,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/check-strictly.vue
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -29632,11 +29624,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/custom-options.vue
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -29699,11 +29687,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/custom-options.vue
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -29766,11 +29750,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/custom-options.vue
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -29843,11 +29823,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/disabled.vue 1`] =
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -29996,11 +29972,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/ellipsis.vue 1`] =
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -30158,11 +30130,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/filterable.vue 1`]
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -30306,11 +30274,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/filterable.vue 1`]
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -30381,11 +30345,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/keys.vue 1`] = `
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -30534,11 +30494,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/load.vue 1`] = `
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -30930,11 +30886,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/show-all-levels.vu
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -31072,11 +31024,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/size.vue 1`] = `
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -31139,11 +31087,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/size.vue 1`] = `
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -31206,11 +31150,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/size.vue 1`] = `
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -31283,11 +31223,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/trigger.vue 1`] =
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -31350,11 +31286,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/trigger.vue 1`] =
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -31923,11 +31855,7 @@ exports[`csr snapshot test > csr test ./src/cascader/_example/value-type.vue 1`]
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -46025,11 +45953,7 @@ exports[`csr snapshot test > csr test ./src/config-provider/_example/others.vue
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -46095,11 +46019,7 @@ exports[`csr snapshot test > csr test ./src/config-provider/_example/others.vue
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down Expand Up @@ -62603,11 +62523,7 @@ exports[`csr snapshot test > csr test ./src/form/_example/disabled.vue 1`] = `
class="t-input__prefix"
>

<div
class="t-tag-input__prefix"
>
<!---->
</div>
<!---->
<!---->

</div>
Expand Down
Loading

0 comments on commit c016733

Please sign in to comment.