mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
chore(Divider): use setup
This commit is contained in:
parent
cabb26bbd8
commit
9301092f20
@ -15,18 +15,17 @@ export default createComponent({
|
||||
},
|
||||
},
|
||||
|
||||
render() {
|
||||
const Content = this.$slots.default?.();
|
||||
return (
|
||||
setup(props, { slots }) {
|
||||
return () => (
|
||||
<div
|
||||
role="separator"
|
||||
class={bem({
|
||||
dashed: this.dashed,
|
||||
hairline: this.hairline,
|
||||
[`content-${this.contentPosition}`]: !!Content,
|
||||
dashed: props.dashed,
|
||||
hairline: props.hairline,
|
||||
[`content-${props.contentPosition}`]: !!slots.default,
|
||||
})}
|
||||
>
|
||||
{Content}
|
||||
{slots.default?.()}
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user