UNPKG

@fecp/mobile

Version:

52 lines (51 loc) 2.22 kB
/* empty css */ /* empty css */ /* empty css */ /* empty css */ /* empty css */ import { createBlock, openBlock, mergeProps, withCtx, createElementBlock, Fragment, renderList } from "vue"; import { Grid } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid/index.mjs"; import { GridItem } from "../../../../../../node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/grid-item/index.mjs"; const _sfc_main = { __name: "Grid", props: { options: { type: Array, default: [] }, gutter: { type: Number, default: 0 } }, emits: ["clickGridItem"], setup(__props, { emit: __emit }) { const emit = __emit; function clickGridItem(item) { emit("clickGridItem", item.name); } return (_ctx, _cache) => { const _component_van_grid_item = GridItem; const _component_van_grid = Grid; return openBlock(), createBlock(_component_van_grid, mergeProps(_ctx.$attrs, { gutter: __props.gutter, style: { paddingTop: __props.gutter + "px" } }), { default: withCtx(() => [ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (item) => { return openBlock(), createBlock(_component_van_grid_item, mergeProps({ name: item.name, ref_for: true }, item, { onClick: ($event) => clickGridItem(item) }), null, 16, ["name", "onClick"]); }), 256)) ]), _: 1 }, 16, ["gutter", "style"]); }; } }; export { _sfc_main as default };