UNPKG

@vrx-arco/pro-components

Version:

<p align="center"> <img src="https://vrx-arco.github.io/arco-design-pro/favicon.svg" width="200" height="250"> </p>

32 lines (31 loc) 804 B
import { style } from "../style/var.js"; import { provideSearchLayout } from "./context.js"; import { createVNode, defineComponent, toRef } from "vue"; import { Layout } from "@arco-design/web-vue"; const SearchLayout = /* @__PURE__ */ defineComponent({ name: "vrx-arco-search-layout", props: { type: { type: String, default: "normal" }, title: String }, setup: (props, { slots }) => { const { bemClass } = style("search-layout"); const type = toRef(props, "type"); const title = toRef(props, "title"); provideSearchLayout({ type, title, bemClass }); return () => { return createVNode(Layout, { "class": { [bemClass()]: true, [bemClass("--card")]: props.type === "card" } }, { default: () => [slots.default?.()] }); }; } }); export { SearchLayout };