tdesign-vue-next
Version:
TDesign Component for vue-next
57 lines (53 loc) • 1.73 kB
JavaScript
/**
* tdesign v1.20.3
* (c) 2026 tdesign
* @license MIT
*/
import { defineComponent, inject, onMounted, onUnmounted, createVNode } from 'vue';
import props from './aside-props.js';
import 'lodash-es';
import '@babel/runtime/helpers/toConsumableArray';
import '@babel/runtime/helpers/typeof';
import '../_chunks/dep-9a792278.js';
import { u as useTNodeJSX } from '../_chunks/dep-9adf4ccf.js';
import { u as usePrefixClass } from '../_chunks/dep-5222f6e9.js';
import '@babel/runtime/helpers/slicedToArray';
import '../_chunks/dep-f7f14b1f.js';
import '@babel/runtime/helpers/defineProperty';
import '../_chunks/dep-0ad1fea4.js';
import '../_chunks/dep-5cf1c7d3.js';
import '../_chunks/dep-1b677277.js';
import '../config-provider/hooks/useConfig.js';
import '../config-provider/utils/context.js';
import '../_chunks/dep-5db45404.js';
import 'dayjs';
import '@babel/runtime/helpers/createClass';
import '@babel/runtime/helpers/classCallCheck';
var _Aside = defineComponent({
name: "TAside",
props: props,
setup: function setup(props2) {
var _inject = inject("layout", /* @__PURE__ */Object.create(null)),
hasSide = _inject.hasSide;
var COMPONENT_NAME = usePrefixClass("layout__sider");
var renderTNodeJSX = useTNodeJSX();
if (!hasSide) return;
onMounted(function () {
hasSide.value = true;
});
onUnmounted(function () {
hasSide.value = false;
});
return function () {
var styles = props2.width ? {
width: props2.width
} : {};
return createVNode("aside", {
"class": COMPONENT_NAME.value,
"style": styles
}, [renderTNodeJSX("default")]);
};
}
});
export { _Aside as default };
//# sourceMappingURL=aside.js.map