Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

element 中 怎么使用slot呢? #72

Closed
hnsxxscyx opened this issue Apr 18, 2019 · 6 comments

Comments

Projects
None yet
2 participants
@hnsxxscyx
Copy link

commented Apr 18, 2019

因为有输入xxx 万元这种需求,我目前使用json作为rules,然后在children中使用maker也不生效。
谢谢作者开发这么好用的东东。

@xaboy

This comment has been minimized.

Copy link
Owner

commented Apr 18, 2019

感谢你的反馈,之前好像没有考虑到这块,下个版本会对组件 slot 功能进行完善

@hnsxxscyx

This comment has been minimized.

Copy link
Author

commented Apr 19, 2019

现在没有办法实现输入框前缀或后缀吗?有没有什么hack的法子

@xaboy

This comment has been minimized.

Copy link
Owner

commented Apr 19, 2019

这个问题昨晚已经加班解决了,下个版本会支持.你想先体验可以加这个 qq群 28963712

@hnsxxscyx

This comment has been minimized.

Copy link
Author

commented Apr 19, 2019

辛苦大大

@xaboy

This comment has been minimized.

Copy link
Owner

commented Apr 19, 2019

使用方法
json:

{
    type:'input',
    field:'price',
    title:'商品价格',
    value:'100',
    children:[
        {
            type:'span',
            slot:'append',
            children:['']
        }
    ]
}

maker:

const maker = formCreate.maker;

maker.input('商品价格','price','100').children([
    maker.create('span').slot('append').children([''])
])
@xaboy

This comment has been minimized.

Copy link
Owner

commented Apr 22, 2019

1.6.4版本已发布,支持通过children 配置项 设置slot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.