Skip to content

Commit

Permalink
field组件能力扩展 (#332)
Browse files Browse the repository at this point in the history
* feat(pullrefresh): support background customization

* chore(pullrefresh): add react doc

* feat(pullrefresh): support container bg customization

* feat(popup): container's min|max-width|height var support

* fix(popup): fix prop name

* fix(popup): fix var name

* feat: field增加autofocus能力

* feat: commit files
  • Loading branch information
dyf19118 authored Mar 27, 2024
1 parent b60d6ff commit 8ccf82f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions packages/quarkd/src/field/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ class QuarkField extends QuarkElement {
@property()
maxlength = "";

@property({ type: Boolean })
autofocus = false;

@property()
min = "";

Expand Down Expand Up @@ -160,6 +163,7 @@ class QuarkField extends QuarkElement {
value={this.value}
type={this.type}
placeholder={this.placeholder}
autofocus={this.autofocus}
min={this.min}
max={this.max}
minlength={this.minlength}
Expand Down
3 changes: 2 additions & 1 deletion packages/quarkd/src/field/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
outline: none;
font-size: var(--field-input-font-size, 15px);
color: var(--field-input-text-color, quark-textBaseColor);
caret-color: var(--field-input-caret-color);
text-align: var(--field-input-align, left);
resize: none;
}
Expand Down Expand Up @@ -109,4 +110,4 @@
color: var(--field-error-text-color, quark-dangerColor);
font-size: var(--field-error-font-size, 12px);
text-align: var(--field-error-text-align, left);
}
}

0 comments on commit 8ccf82f

Please sign in to comment.