Skip to content

Commit

Permalink
fix(input): fix limit disabled bg color (#2557)
Browse files Browse the repository at this point in the history
* chore: update snapshot

* fix(Input): disabled limitNumber style
  • Loading branch information
uyarn authored Jul 3, 2023
1 parent f04ddf2 commit 781b27a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 82 deletions.
2 changes: 1 addition & 1 deletion src/_common
Submodule _common updated 192 files
11 changes: 10 additions & 1 deletion src/input/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,16 @@ export default mixins(
const label = renderTNodeJSX(this, 'label');
const suffix = renderTNodeJSX(this, 'suffix');
const limitNode = this.limitNumber && this.showLimitNumber ? (
<div class={`${this.classPrefix}-input__limit-number`}>{this.limitNumber}</div>
<div
class={[
`${this.classPrefix}-input__limit-number`,
{
[`${this.classPrefix}-is-disabled`]: this.disabled,
},
]}
>
{this.limitNumber}
</div>
) : null;

const labelContent = label ? <div class={`${this.componentName}__prefix`}>{label}</div> : null;
Expand Down
108 changes: 30 additions & 78 deletions test/snap/__snapshots__/csr.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -144192,24 +144192,16 @@ exports[`csr snapshot test > csr test ./src/tree/_example/controlled.vue 1`] = `
/>
</svg>
</span>
<label
class="t-checkbox t-tree__label t-is-active"
<span
class="t-tree__label t-is-active"
title="2 这个节点不允许展开, 不允许激活"
>
<input
class="t-checkbox__former"
name="2"
type="checkbox"
value=""
/>
<span
class="t-checkbox__input"
/>
<span
class="t-checkbox__label"
style="position: relative;"
>
2 这个节点不允许展开, 不允许激活
</span>
</label>
</span>
</div>
<div
class="t-tree__item t-tree__item--visible"
Expand All @@ -144223,24 +144215,16 @@ exports[`csr snapshot test > csr test ./src/tree/_example/controlled.vue 1`] = `
ignore="active"
trigger="expand"
/>
<label
class="t-checkbox t-tree__label"
<span
class="t-tree__label"
title="2.1 这个节点不允许选中"
>
<input
class="t-checkbox__former"
name="2.1"
type="checkbox"
value=""
/>
<span
class="t-checkbox__input"
/>
<span
class="t-checkbox__label"
style="position: relative;"
>
2.1 这个节点不允许选中
</span>
</label>
</span>
</div>
<div
class="t-tree__item t-tree__item--visible"
Expand All @@ -144254,24 +144238,16 @@ exports[`csr snapshot test > csr test ./src/tree/_example/controlled.vue 1`] = `
ignore="active"
trigger="expand"
/>
<label
class="t-checkbox t-tree__label"
<span
class="t-tree__label"
title="2.2"
>
<input
class="t-checkbox__former"
name="2.2"
type="checkbox"
value=""
/>
<span
class="t-checkbox__input"
/>
<span
class="t-checkbox__label"
style="position: relative;"
>
2.2
</span>
</label>
</span>
</div>
</transition-group-stub>
</div>
Expand Down Expand Up @@ -153028,24 +153004,16 @@ exports[`csr snapshot test > csr test ./src/tree/_example/sync.vue 1`] = `
/>
</svg>
</span>
<label
class="t-checkbox t-tree__label t-is-active"
<span
class="t-tree__label t-is-active"
title="2"
>
<input
class="t-checkbox__former"
name="2"
type="checkbox"
value=""
/>
<span
class="t-checkbox__input"
/>
<span
class="t-checkbox__label"
style="position: relative;"
>
2
</span>
</label>
</span>
</div>
<div
class="t-tree__item t-tree__item--visible"
Expand All @@ -153059,24 +153027,16 @@ exports[`csr snapshot test > csr test ./src/tree/_example/sync.vue 1`] = `
ignore="active"
trigger="expand"
/>
<label
class="t-checkbox t-tree__label"
<span
class="t-tree__label"
title="2.1"
>
<input
class="t-checkbox__former"
name="2.1"
type="checkbox"
value=""
/>
<span
class="t-checkbox__input"
/>
<span
class="t-checkbox__label"
style="position: relative;"
>
2.1
</span>
</label>
</span>
</div>
<div
class="t-tree__item t-tree__item--visible"
Expand All @@ -153090,24 +153050,16 @@ exports[`csr snapshot test > csr test ./src/tree/_example/sync.vue 1`] = `
ignore="active"
trigger="expand"
/>
<label
class="t-checkbox t-tree__label"
<span
class="t-tree__label"
title="2.2"
>
<input
class="t-checkbox__former"
name="2.2"
type="checkbox"
value=""
/>
<span
class="t-checkbox__input"
/>
<span
class="t-checkbox__label"
style="position: relative;"
>
2.2
</span>
</label>
</span>
</div>
</transition-group-stub>
</div>
Expand Down
Loading

0 comments on commit 781b27a

Please sign in to comment.