AMIS中的组件添加图标的一些注意点。

1.输入框添加图标:

        {
            type: "input-group",
            size: "md",
            label: "",
            body: [
                {
                    type: "icon",
                    addOnclassName: "no-bg",
                    icon: "user",
                },
                {
                    type: "input-text",
                    placeholder: "username",
                    name: "jobName"
                }
            ]
        }

显示效果如图:
其中,icon:"user" 对应FontAwesome的"fa fa-user"

2.按钮上添加icon

                {
                    type: 'submit',
                    label: '登录2',
                    level: "primary",
                    icon: "fa fa-sign-in-alt"
                    // className: "btn",
                }

这里的icon里面定义直接用FontAwesome全名。效果如图:

posted @ 2022-02-23 11:06  深夜  阅读(511)  评论(0编辑  收藏  举报