UNPKG

@fe6/water-pro

Version:

An enterprise-class UI design language and Vue-based implementation

63 lines (56 loc) 2.07 kB
import { createVNode as _createVNode } from "vue"; function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } /** @format */ import { defineComponent, computed } from 'vue'; import { RightOutlined } from '@ant-design/icons-vue'; import ATooltip from '../tooltip'; import useConfigInject from '../_util/hooks/useConfigInject'; import PropTypes from '../_util/vue-types'; export default defineComponent({ name: 'ABasicArrow', components: { RightOutlined: RightOutlined }, props: { // Expand contract, expand by default expand: PropTypes.bool, top: PropTypes.bool, bottom: PropTypes.bool, inset: PropTypes.bool, prefixCls: PropTypes.string, helpMessage: PropTypes.string }, setup: function setup(props) { var _useConfigInject = useConfigInject('basic-arrow', props), prefixClsNew = _useConfigInject.prefixCls; var getClass = computed(function () { var _ref; var expand = props.expand, top = props.top, bottom = props.bottom, inset = props.inset; return [prefixClsNew.value, (_ref = {}, _defineProperty(_ref, "".concat(prefixClsNew.value, "-active"), expand), _defineProperty(_ref, "".concat(prefixClsNew.value, "-top"), top), _defineProperty(_ref, "".concat(prefixClsNew.value, "-inset"), inset), _defineProperty(_ref, "".concat(prefixClsNew.value, "-bottom"), bottom), _ref)]; }); return { getClass: getClass }; }, render: function render() { var innerNode = _createVNode("span", { "class": this.getClass }, [_createVNode(RightOutlined, null, null)]); var contentNode = null; if (this.helpMessage) { contentNode = _createVNode(ATooltip, { "title": this.helpMessage }, { default: function _default() { return [innerNode]; } }); } else { contentNode = innerNode; } return contentNode; } });