标签 KLTag

基本形式

<kl-tag>默认标签</kl-tag>&emsp;
<kl-tag type="primary">主标签</kl-tag>&emsp;
<kl-tag type="warning">警告标签</kl-tag>

可移除标签

<kl-tag closable on-close={this.close($event)}>默认标签</kl-tag>&emsp;
<kl-tag type="primary" closable on-close={this.close($event)}>主标签</kl-tag>&emsp;
<kl-tag type="warning" closable on-close={this.close($event)}>警告标签</kl-tag>
var component = new NEKUI.Component({
template: template,
close: function(item) {
console.log(item);
}
});

API

KLTag

KLTag

Param Type Default Description
[options.data] object = 绑定属性
[options.data.class] string => 补充class
[options.data.type] string "default" => 样式, default/primary/warning
[options.data.closable] boolean false => 标签是否可以移除

close 关闭标签事件Event

Name Type Description
sender object tag的this引用
e object event对象