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>

53 lines (52 loc) 1.16 kB
import { defineComponent, toRef, createVNode } from "vue"; import { Layout } from "@arco-design/web-vue"; import { style } from "../style/var.mjs"; import { provideSearchLayout } from "./context.mjs"; const SearchLayout = /* @__PURE__ */ defineComponent({ name: "vrx-arco-search-layout", props: { /** * 布局类型 * card: 整体布局作为一个卡片类型 * normal: 分体式卡片布局 */ 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: () => { var _a; return [(_a = slots.default) == null ? void 0 : _a.call(slots)]; } }); }; } }); export { SearchLayout };