UNPKG

vue-ant-patterns

Version:

vue-ant-patterns

62 lines (58 loc) 1.78 kB
import _extends from 'babel-runtime/helpers/extends'; import _defineProperty from 'babel-runtime/helpers/defineProperty'; import PropTypes from 'ant-design-vue/es/_util/vue-types'; import { filterEmpty } from 'ant-design-vue/es/_util/props-util'; import cx from 'classnames'; import { Tabs } from 'ant-design-vue'; var TabPane = Tabs.TabPane; var DTabPane = { name: 'DTabPane', props: { active: PropTypes.bool, destroyInactiveTabPane: PropTypes.bool, forceRender: PropTypes.bool, // placeholder: PropTypes.any, rootPrefixCls: PropTypes.string, tab: PropTypes.any, closable: PropTypes.bool, disabled: PropTypes.bool }, // inject: { // sentinelContext: { default: () => ({}) }, // }, render: function render() { var h = arguments[0]; var $slots = this.$slots, $listeners = this.$listeners, $props = this.$props, $attrs = this.$attrs, tab = this.tab, destroyInactiveTabPane = this.destroyInactiveTabPane, active = this.active, forceRender = this.forceRender, rootPrefixCls = this.rootPrefixCls; var children = filterEmpty($slots['default']); children = children.length === 0 ? undefined : children; var cls = cx(_defineProperty({}, 'depot-tabsPane', 1)); var tabPaneProps = { 'class': cls, attrs: _extends({}, $attrs), props: _extends({}, $props, { tab: tab, destroyInactiveTabPane: destroyInactiveTabPane, active: active, forceRender: forceRender, rootPrefixCls: rootPrefixCls }), on: _extends({}, $listeners) }; // console.log("dd"); // console.log(this); return h( TabPane, tabPaneProps, [children] ); } }; export default DTabPane;