cmc-web/packages/common/components/if-tooltip/index.vue

28 lines
585 B
Vue

<!--
* @Author: Haijun Zhang
* @Date: 2022-11-08 14:33:14
* @LastEditTime: 2022-11-08 14:33:38
* @LastEditors: Haijun Zhang
* @Description:
* @FilePath: \cmc-web\packages\common\components\if-tooltip\index.vue
-->
<template>
<el-tooltip v-if="disabled" class="item" effect="dark" :content="content" placement="top-start">
<span><slot></slot></span>
</el-tooltip>
<span v-else> <slot></slot></span>
</template>
<script>
export default {
props: {
disabled: {
type: Boolean,
default: false
},
content: {
type: String
}
}
}
</script>