UNPKG

yanzhen-design-vue

Version:

49 lines (48 loc) 1.15 kB
import { tooltipProps as tooltipProps$1 } from "ant-design-vue/es/tooltip"; import { propsSeparate, epPropType, buildProps, buildEmits } from "@yanzhen-libs/utils-vue"; import { omit } from "lodash-es"; import "../../../hooks/index.mjs"; import { useNamespace } from "../../../hooks/use-namespace/index.mjs"; const ns = useNamespace("tooltip"); const tooltipOptions = { ns, class: ns.b(), name: ns.defineVNodeName() }; const tooltipName = tooltipOptions.name; const AntTooltip = propsSeparate({ ...omit(tooltipProps$1(), "title"), title: epPropType.any }); const errorImg = "https://pagoda-p-file-1301506715.cos.ap-guangzhou.myqcloud.com/freshgood-project/old-assets/img/icon_user@2x.png"; const tooltipProps = buildProps({ ...AntTooltip.props, url: { type: String }, errorImg: { type: String, default: errorImg }, text: { type: String }, tagName: { type: String }, imgStyle: { type: Object }, tagColor: { type: String, default: "blue" } }); const tooltipEmits = buildEmits(AntTooltip.emits); export { AntTooltip, tooltipEmits, tooltipName, tooltipOptions, tooltipProps };