UNPKG

@arco-vue-pro-components/pro-components

Version:
33 lines (32 loc) 1.08 kB
import { defineComponent, inject, createVNode } from "vue"; import { useI18n } from "../../locale/index.js"; import { IconFullscreenExit, IconFullscreen } from "@arco-design/web-vue/es/icon"; import { proTableInjectionKey } from "../form/context.js"; import MyToolTip from "../my-tool-tip/index.js"; var FullScreenIcon = defineComponent({ name: "FullscreenIcon", setup() { const tableCtx = inject(proTableInjectionKey, {}); const { getMessage } = useI18n(); const render = () => { return (tableCtx == null ? void 0 : tableCtx.fullscreen) ? createVNode(MyToolTip, { "content": getMessage("tableToolBar.exitFullScreen", "\u5168\u5C4F") }, { default: () => [createVNode(IconFullscreenExit, null, null)] }) : createVNode(MyToolTip, { "content": getMessage("tableToolBar.fullScreen", "\u5168\u5C4F") }, { default: () => [createVNode(IconFullscreen, null, null)] }); }; return { render }; }, render() { return this.render(); } }); export { FullScreenIcon as default };