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

28 lines
585 B
Vue
Raw Permalink Normal View History

2024-08-20 12:11:31 +00:00
<!--
* @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>