generated from liutk/owl-admin-base
37 lines
2.5 KiB
JavaScript
37 lines
2.5 KiB
JavaScript
import { defineComponent, mergeProps, useSSRContext } from 'vue';
|
|
import { ssrRenderAttrs, ssrRenderList, ssrRenderClass, ssrInterpolate, ssrRenderAttr } from 'vue/server-renderer';
|
|
import { _ as _imports_0 } from './virtual_public-Ch4_18y6.mjs';
|
|
|
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
__name: "TabsHeader",
|
|
__ssrInlineRender: true,
|
|
props: {
|
|
tabs: {},
|
|
activeTab: {},
|
|
title: {}
|
|
},
|
|
emits: ["update:activeTab"],
|
|
setup(__props, { emit: __emit }) {
|
|
return (_ctx, _push, _parent, _attrs) => {
|
|
_push(`<div${ssrRenderAttrs(mergeProps({ class: "sticky top-[56px] sm:top-[64px] md:top-[80px] lg:top-[100px] xl:top-[135px] z-[999] w-full h-[56px] sm:h-[60px] md:h-[64px] lg:h-[68px] xl:h-[68px] flex flex-row items-center justify-center bg-[#F2F2F2]" }, _attrs))}><div class="flex flex-row justify-between items-center w-full h-full layout"><div class="flex flex-row items-center gap-[18px] overflow-x-auto sm:overflow-visible h-full"><!--[-->`);
|
|
ssrRenderList(__props.tabs, (tab) => {
|
|
_push(`<a href="#" class="${ssrRenderClass([{
|
|
"text-[#333333] hover:after:w-full border-b-[#F2F2F2]": __props.activeTab !== tab.id,
|
|
"text-[#2E75B5] border-b-[#2E75B5]": __props.activeTab === tab.id
|
|
}, "relative border-b-[2px] text-[14px] sm:text-[14px] md:text-[15px] lg:text-[16px] xl:text-[16px] whitespace-nowrap hover:text-[#2E75B5] transition-colors duration-300 after:absolute after:bottom-[-1px] after:left-0 after:w-0 after:h-[1px] after:bg-[#0A357D] after:transition-all after:duration-300 h-full flex items-center"])}">${ssrInterpolate(tab.name)}</a>`);
|
|
});
|
|
_push(`<!--]--></div><div class="hidden sm:flex h-full text-[12px] pl-[12px] text-[#999999] border-l-[1px] flex-row items-center gap-[8px]"><img class="w-[14px] h-[14px]"${ssrRenderAttr("src", _imports_0)} alt=""><a href="/home" class="hover:text-[#0A357D] transition-colors">首页</a><span class="inline-block border-solid border-transparent border-l-[2px] border-y-[2px] border-l-current text-[#999999]"></span><span>${ssrInterpolate(__props.title)}</span></div></div></div>`);
|
|
};
|
|
}
|
|
});
|
|
const _sfc_setup = _sfc_main.setup;
|
|
_sfc_main.setup = (props, ctx) => {
|
|
const ssrContext = useSSRContext();
|
|
(ssrContext.modules || (ssrContext.modules = /* @__PURE__ */ new Set())).add("components/TabsHeader.vue");
|
|
return _sfc_setup ? _sfc_setup(props, ctx) : void 0;
|
|
};
|
|
const __nuxt_component_1 = Object.assign(_sfc_main, { __name: "TabsHeader" });
|
|
|
|
export { __nuxt_component_1 as _ };
|
|
//# sourceMappingURL=TabsHeader-C0yMA2hS.mjs.map
|