song-ui-u
Version:
vue3 + js的PC前端组件库
1 lines • 1.32 kB
Source Map (JSON)
{"version":3,"file":"header.vue.cjs","sources":["../../../../../packages/components/container/src/header.vue"],"sourcesContent":["<template>\n <header :class=\"[ns.b()]\" :style=\"[styleHeight, styleBgColor]\">\n <slot />\n </header>\n</template>\n<script>\nexport default { name: \"x-header\" };\n</script>\n<script setup>\nimport { computed } from \"vue\";\nimport { useNamespace } from \"@ui-library/hook\";\nconst ns = useNamespace(\"header\");\n/** props */\nconst props = defineProps({\n height: {\n type: String,\n default: \"60px\",\n },\n bgColor: {\n type: String,\n default: \"\",\n },\n});\n\nconst styleHeight = computed(() => {\n return { height: props.height };\n});\nconst styleBgColor = computed(() => {\n return props.bgColor ? { \"background-color\": props.bgColor } : {};\n});\n</script>\n"],"names":["useNamespace","computed"],"mappings":";;;;;;;;AAMA,MAAA,WAAA,GAAe,EAAE,IAAI,EAAE,UAAU,EAAE,CAAA;;;;;;;;;;;;;;;;AAKnC,MAAM,EAAE,GAAGA,kBAAY,CAAC,QAAQ,CAAC,CAAA;AACjC;AACA,MAAM,KAAK,GAAG,OASZ,CAAA;;AAEF,MAAM,WAAW,GAAGC,YAAQ,CAAC,MAAM;AACnC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAA;AACjC,CAAC,CAAC,CAAA;AACF,MAAM,YAAY,GAAGA,YAAQ,CAAC,MAAM;AACpC,EAAE,OAAO,KAAK,CAAC,OAAO,GAAG,EAAE,kBAAkB,EAAE,KAAK,CAAC,OAAO,EAAE,GAAG,EAAE,CAAA;AACnE,CAAC,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;"}