UNPKG

song-ui-u

Version:

vue3 + js的PC前端组件库

53 lines (44 loc) 1.66 kB
import { computed, openBlock, createElementBlock, normalizeClass, normalizeStyle, renderSlot } from 'vue'; import { useNamespace } from '../../../hook/use-namespace/index.mjs'; import 'song-ui-pro-icon'; import '../../../hook/use-zindex/index.mjs'; import _export_sfc from '../../../_virtual/_plugin-vue_export-helper.mjs'; const __default__ = { name: "x-header" }; const _sfc_main = /*#__PURE__*/Object.assign(__default__, { props: { height: { type: String, default: "60px", }, bgColor: { type: String, default: "", }, }, setup(__props, { expose: __expose }) { __expose(); const ns = useNamespace("header"); /** props */ const props = __props; const styleHeight = computed(() => { return { height: props.height }; }); const styleBgColor = computed(() => { return props.bgColor ? { "background-color": props.bgColor } : {}; }); const __returned__ = { ns, props, styleHeight, styleBgColor, computed, get useNamespace() { return useNamespace } }; Object.defineProperty(__returned__, '__isScriptSetup', { enumerable: false, value: true }); return __returned__ } }); function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) { return (openBlock(), createElementBlock("header", { class: normalizeClass([$setup.ns.b()]), style: normalizeStyle([$setup.styleHeight, $setup.styleBgColor]) }, [ renderSlot(_ctx.$slots, "default") ], 6 /* CLASS, STYLE */)) } var Header = /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render],['__file',"E:\\code\\my-code\\song-ui-ultra\\packages\\components\\container\\src\\header.vue"]]); export { Header as default }; //# sourceMappingURL=header.vue.mjs.map