mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-07 06:57:02 +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 {
|
||||
|
||||
@State() openContainer: ItemSliding;
|
||||
@Prop() radioGroup: boolean;
|
||||
|
||||
render() {
|
||||
if (this.radioGroup) {
|
||||
return (
|
||||
<ion-radio-group>
|
||||
<slot></slot>
|
||||
</ion-radio-group>
|
||||
);
|
||||
}
|
||||
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"`.
|
||||
*/
|
||||
@Prop() side: string;
|
||||
|
||||
@PropDidChange('enabled')
|
||||
enabledChanged(enabled: boolean) {
|
||||
if (enabled) {
|
||||
@ -330,8 +328,7 @@ export class ReorderGroup {
|
||||
class: {
|
||||
'reorder-enabled': this._enabled,
|
||||
'reorder-list-active': this._actived,
|
||||
'reorder-visible': this._iconVisible,
|
||||
'reorder-side-start': this.side === 'start'
|
||||
'reorder-visible': this._iconVisible
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ ion-reorder ion-icon {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.reorder-side-start ion-reorder {
|
||||
ion-reorder[slot="start"] {
|
||||
@include transform(translate3d(-$reorder-initial-transform, 0, 0));
|
||||
|
||||
order: -1;
|
||||
|
||||
@ -30,8 +30,7 @@
|
||||
<ion-reorder slot="end"></ion-reorder>
|
||||
</ion-item>
|
||||
<ion-item>Item 3
|
||||
<ion-icon reorderAnchor name="pizza" slot="end"></ion-icon>
|
||||
|
||||
<ion-reorder slot="start"></ion-reorder>
|
||||
</ion-item>
|
||||
<ion-item>Item 4
|
||||
<ion-icon reorderAnchor name="pizza" slot="end"></ion-icon>
|
||||
|
||||
Reference in New Issue
Block a user