mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 15:07:13 +08:00
fix(reorder): support for slot="start"
This commit is contained in:
@ -17,16 +17,8 @@ import { ItemSliding } from '../item-sliding/item-sliding';
|
|||||||
export class List {
|
export class List {
|
||||||
|
|
||||||
@State() openContainer: ItemSliding;
|
@State() openContainer: ItemSliding;
|
||||||
@Prop() radioGroup: boolean;
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.radioGroup) {
|
|
||||||
return (
|
|
||||||
<ion-radio-group>
|
|
||||||
<slot></slot>
|
|
||||||
</ion-radio-group>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return <slot></slot>;
|
return <slot></slot>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -163,8 +163,6 @@ export class ReorderGroup {
|
|||||||
/**
|
/**
|
||||||
* @input {string} Which side of the view the ion-reorder should be placed. Default `"end"`.
|
* @input {string} Which side of the view the ion-reorder should be placed. Default `"end"`.
|
||||||
*/
|
*/
|
||||||
@Prop() side: string;
|
|
||||||
|
|
||||||
@PropDidChange('enabled')
|
@PropDidChange('enabled')
|
||||||
enabledChanged(enabled: boolean) {
|
enabledChanged(enabled: boolean) {
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
@ -330,8 +328,7 @@ export class ReorderGroup {
|
|||||||
class: {
|
class: {
|
||||||
'reorder-enabled': this._enabled,
|
'reorder-enabled': this._enabled,
|
||||||
'reorder-list-active': this._actived,
|
'reorder-list-active': this._actived,
|
||||||
'reorder-visible': this._iconVisible,
|
'reorder-visible': this._iconVisible
|
||||||
'reorder-side-start': this.side === 'start'
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,7 +52,7 @@ ion-reorder ion-icon {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.reorder-side-start ion-reorder {
|
ion-reorder[slot="start"] {
|
||||||
@include transform(translate3d(-$reorder-initial-transform, 0, 0));
|
@include transform(translate3d(-$reorder-initial-transform, 0, 0));
|
||||||
|
|
||||||
order: -1;
|
order: -1;
|
||||||
|
|||||||
@ -30,8 +30,7 @@
|
|||||||
<ion-reorder slot="end"></ion-reorder>
|
<ion-reorder slot="end"></ion-reorder>
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>Item 3
|
<ion-item>Item 3
|
||||||
<ion-icon reorderAnchor name="pizza" slot="end"></ion-icon>
|
<ion-reorder slot="start"></ion-reorder>
|
||||||
|
|
||||||
</ion-item>
|
</ion-item>
|
||||||
<ion-item>Item 4
|
<ion-item>Item 4
|
||||||
<ion-icon reorderAnchor name="pizza" slot="end"></ion-icon>
|
<ion-icon reorderAnchor name="pizza" slot="end"></ion-icon>
|
||||||
|
|||||||
Reference in New Issue
Block a user