amis
amis copied to clipboard
语法问题
{ "type": "button", "icon": "fa fa-times text-danger", "actionType": "ajax", "tooltip": "{$status == 1 ? '下线' : '上线'}", }
这里的tooltip,我想根据ajax的返回值是动态设置,如上我的写法错误,正确的写法该如何书写?
${status|isEquals:1:'下线':'上线'}
参考:https://baidu.github.io/amis/docs/renderers/Tpl#tpl