UNPKG

yanzhen-design-vue

Version:

19 lines (18 loc) 517 B
import { reactive, createVNode } from "vue"; const indicatorCache = reactive({ indicator: void 0 }); function setDefaultIndicator(Content) { const { indicator, ...options } = Content; indicatorCache.indicator = typeof indicator === "function" ? indicator : () => createVNode(indicator, null, null); for (const [key, value] of Object.entries(options)) { indicatorCache[key] = value; } } function getDefaultIndicator() { return indicatorCache; } export { getDefaultIndicator, setDefaultIndicator };