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.

25 lines (24 loc) 628 B
import "../chunk-G2ADBYYC.js"; import { handleClose, handleClick } from "./index"; const api = ["state", "handleClose", "handleClick"]; const renderless = (props, { reactive, computed }, { emit, parent }) => { const state = reactive({ type: computed(() => props.theme || props.type), show: true, selected: false, mini: props.mini, color: props.color, text: props.text, maxWidth: props.maxWidth }); const api2 = { state, handleClose: handleClose({ emit, props, state }), handleClick: handleClick({ emit, props, parent, state }) }; return api2; }; export { api, renderless };