mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[new feature] Picker: add toolbar-position prop
This commit is contained in:
parent
168730d2ac
commit
04b88583c2
@ -16,6 +16,10 @@ export default sfc({
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
},
|
},
|
||||||
|
toolbarPosition: {
|
||||||
|
type: String,
|
||||||
|
default: 'top'
|
||||||
|
},
|
||||||
valueKey: {
|
valueKey: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'text'
|
default: 'text'
|
||||||
@ -176,7 +180,7 @@ export default sfc({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={bem()}>
|
<div class={bem()}>
|
||||||
{Toolbar}
|
{this.toolbarPosition === 'top' ? Toolbar : h()}
|
||||||
{this.loading ? <Loading class={bem('loading')} color={BLUE} /> : h()}
|
{this.loading ? <Loading class={bem('loading')} color={BLUE} /> : h()}
|
||||||
<div class={bem('columns')} style={columnsStyle} onTouchmove={preventDefault}>
|
<div class={bem('columns')} style={columnsStyle} onTouchmove={preventDefault}>
|
||||||
{columns.map((item, index) => (
|
{columns.map((item, index) => (
|
||||||
@ -195,6 +199,7 @@ export default sfc({
|
|||||||
<div class={bem('mask')} style={maskStyle} />
|
<div class={bem('mask')} style={maskStyle} />
|
||||||
<div class={['van-hairline--top-bottom', bem('frame')]} style={frameStyle} />
|
<div class={['van-hairline--top-bottom', bem('frame')]} style={frameStyle} />
|
||||||
</div>
|
</div>
|
||||||
|
{this.toolbarPosition === 'bottom' ? Toolbar : h()}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user