2016-11-02 17:41:16 +08:00
|
|
|
<template>
|
2017-03-02 12:22:15 +08:00
|
|
|
<div>
|
|
|
|
<Tag>标签一</Tag>
|
|
|
|
<Tag>标签二</Tag>
|
|
|
|
<Tag closable>标签三</Tag>
|
|
|
|
<Tag closable color="blue">标签一</Tag>
|
|
|
|
<Tag closable color="green">标签二</Tag>
|
|
|
|
<Tag closable color="red">标签三</Tag>
|
|
|
|
<Tag closable color="yellow">标签四</Tag>
|
|
|
|
<br><br>
|
|
|
|
<Tag type="dot">标签一</Tag>
|
|
|
|
<Tag type="dot" closable>标签一</Tag>
|
|
|
|
<Tag type="dot" color="blue">标签一</Tag>
|
|
|
|
<Tag type="dot" color="blue" closable>标签一</Tag>
|
|
|
|
<Tag type="dot" color="green">标签一</Tag>
|
|
|
|
<Tag type="dot" color="green" closable>标签一</Tag>
|
|
|
|
<Tag type="dot" color="red">标签一</Tag>
|
|
|
|
<Tag type="dot" color="red" closable>标签一</Tag>
|
|
|
|
<Tag type="dot" color="yellow">标签一</Tag>
|
|
|
|
<Tag type="dot" color="yellow" closable>标签一</Tag>
|
|
|
|
<br><br>
|
|
|
|
<Tag type="border">标签一</Tag>
|
|
|
|
<Tag type="border" closable>标签一</Tag>
|
|
|
|
<Tag type="border" color="blue">标签一</Tag>
|
|
|
|
<Tag type="border" color="blue" closable>标签一</Tag>
|
|
|
|
<Tag type="border" color="green">标签一</Tag>
|
|
|
|
<Tag type="border" color="green" closable>标签一</Tag>
|
|
|
|
<Tag type="border" color="red">标签一</Tag>
|
|
|
|
<Tag type="border" color="red" closable>标签一</Tag>
|
|
|
|
<Tag type="border" color="yellow">标签一</Tag>
|
|
|
|
<Tag type="border" color="yellow" closable>标签一</Tag>
|
|
|
|
<Button type="primary" @click="modal1 = true">显示对话框</Button>
|
|
|
|
<br><br>
|
|
|
|
<Tag v-if="ccc" closable @on-close="clickTagClose">标签一</Tag>
|
|
|
|
</div>
|
2016-11-02 17:41:16 +08:00
|
|
|
</template>
|
|
|
|
<script>
|
2016-11-17 16:28:36 +08:00
|
|
|
import { Tag, Modal, iButton } from 'iview';
|
2016-11-02 17:41:16 +08:00
|
|
|
export default {
|
2016-11-03 13:54:21 +08:00
|
|
|
components: { Tag, Modal, iButton },
|
|
|
|
data () {
|
|
|
|
return {
|
2016-11-09 17:36:40 +08:00
|
|
|
modal1: false,
|
2017-03-02 12:22:15 +08:00
|
|
|
loading: true,
|
|
|
|
ccc: true
|
2016-11-09 17:36:40 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
ok () {
|
2016-11-16 18:44:40 +08:00
|
|
|
setTimeout(() => {
|
|
|
|
this.modal1 = false;
|
|
|
|
}, 2000);
|
2017-02-14 15:42:35 +08:00
|
|
|
},
|
|
|
|
clickTag() {
|
|
|
|
console.log('click tag');
|
|
|
|
},
|
|
|
|
clickTagClose() {
|
2017-03-02 12:22:15 +08:00
|
|
|
this.ccc = false;
|
2017-02-14 15:42:35 +08:00
|
|
|
console.log('click tag close-icon');
|
2016-11-03 13:54:21 +08:00
|
|
|
}
|
|
|
|
}
|
2016-11-02 17:41:16 +08:00
|
|
|
}
|
|
|
|
</script>
|