mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 08:09:32 +08:00
fix(inputs): disabled handling (#16071)
This commit is contained in:
@ -21,7 +21,7 @@
|
||||
:host(.label-stacked) {
|
||||
@include margin(null, null, 4px, null);
|
||||
|
||||
font-size: 12px;
|
||||
font-size: 13.6px;
|
||||
}
|
||||
|
||||
:host(.label-floating) {
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
// --------------------------------------------------
|
||||
|
||||
:host(.label-stacked) {
|
||||
font-size: 12px;
|
||||
font-size: 12.8px;
|
||||
}
|
||||
|
||||
:host(.label-floating) {
|
||||
|
||||
@ -29,7 +29,6 @@ export class Label implements ComponentInterface {
|
||||
|
||||
/**
|
||||
* The position determines where and how the label behaves inside an item.
|
||||
* Possible values are: 'inline' | 'fixed' | 'stacked' | 'floating'
|
||||
*/
|
||||
@Prop() position?: 'fixed' | 'stacked' | 'floating';
|
||||
|
||||
@ -42,11 +41,10 @@ export class Label implements ComponentInterface {
|
||||
|
||||
componentWillLoad() {
|
||||
this.noAnimate = (this.position === 'floating');
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
componentDidLoad() {
|
||||
this.positionChanged();
|
||||
|
||||
if (this.noAnimate) {
|
||||
setTimeout(() => {
|
||||
this.noAnimate = false;
|
||||
@ -56,6 +54,10 @@ export class Label implements ComponentInterface {
|
||||
|
||||
@Watch('position')
|
||||
positionChanged() {
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
private emitStyle() {
|
||||
const position = this.position;
|
||||
this.ionStyle.emit({
|
||||
'label': true,
|
||||
|
||||
@ -12,7 +12,7 @@ Label is a wrapper element that can be used in combination with `ion-item`, `ion
|
||||
| ---------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
|
||||
| `color` | `color` | The color to use from your application's color palette. Default options are: `"primary"`, `"secondary"`, `"tertiary"`, `"success"`, `"warning"`, `"danger"`, `"light"`, `"medium"`, and `"dark"`. For more information on colors, see [theming](/docs/theming/basics). | `string \| undefined` |
|
||||
| `mode` | `mode` | The mode determines which platform styles to use. Possible values are: `"ios"` or `"md"`. | `"ios" \| "md"` |
|
||||
| `position` | `position` | The position determines where and how the label behaves inside an item. Possible values are: 'inline' \| 'fixed' \| 'stacked' \| 'floating' | `"fixed" \| "floating" \| "stacked" \| undefined` |
|
||||
| `position` | `position` | The position determines where and how the label behaves inside an item. | `"fixed" \| "floating" \| "stacked" \| undefined` |
|
||||
|
||||
|
||||
## Events
|
||||
|
||||
Reference in New Issue
Block a user