[new feature] Loading: add default slot

This commit is contained in:
陈嘉涵
2019-04-30 17:18:25 +08:00
parent dd32efd5a4
commit 2bb01b4a63
18 changed files with 90 additions and 41 deletions

View File

@@ -2,6 +2,7 @@ import { use } from '../utils';
import { prevent } from '../utils/event';
import { deepClone } from '../utils/deep-clone';
import { pickerProps } from './shared';
import { BLUE } from '../utils/color';
import Loading from '../loading';
import PickerColumn from './PickerColumn';
@@ -170,13 +171,7 @@ export default sfc({
return (
<div class={bem()}>
{Toolbar}
{this.loading ? (
<div class={bem('loading')}>
<Loading />
</div>
) : (
h()
)}
{this.loading ? <Loading class={bem('loading')} color={BLUE} /> : h()}
<div class={bem('columns')} style={columnsStyle} onTouchmove={prevent}>
{columns.map((item, index) => (
<PickerColumn