You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
688 B
35 lines
688 B
<template>
|
|
<li
|
|
v-clipboard:copy="text"
|
|
v-clipboard:success="onCopied"
|
|
:class="justCopied === type ? 'copied' : ''"
|
|
>
|
|
<a-icon
|
|
:type="type"
|
|
:theme="theme"
|
|
/>
|
|
<span class="anticon-class">
|
|
<a-badge :dot="isNew">
|
|
{{ type }}
|
|
</a-badge>
|
|
</span>
|
|
</li>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
props: ['type', 'isNew', 'theme', 'justCopied'],
|
|
data () {
|
|
const { type, theme } = this;
|
|
return {
|
|
text: theme === 'outlined' ? `<a-icon type="${type}" />` : `<a-icon type="${type}" theme="${theme}" />`,
|
|
};
|
|
},
|
|
methods: {
|
|
onCopied () {
|
|
this.$emit('copied', this.type, this.text);
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|