UNPKG

@opentiny/vue-renderless

Version:

An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.

23 lines (22 loc) 624 B
import "../chunk-G2ADBYYC.js"; import { breadcrumbItemSelect } from "./index"; const api = ["breadcrumbItemSelect", "state"]; const renderless = (props, { reactive, provide }, { emit, constants, emitter }) => { const state = reactive({ breadcrumbEmitter: emitter(), size: props.size, currentBreadcrumbItem: {} }); const api2 = { state, breadcrumbItemSelect: () => breadcrumbItemSelect({ api: api2, emit, state, constants }) }; provide("size", state.size); provide("breadcrumbEmitter", state.breadcrumbEmitter); api2.breadcrumbItemSelect(); return api2; }; export { api, renderless };