@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) • 750 B
JavaScript
import "../chunk-G2ADBYYC.js";
import { handleEnterDesc, handelIconClick, handleTitleClick, computedOptions } from "./index";
const api = ["state", "handelIconClick", "handleEnterDesc", "handleTitleClick", "computedOptions"];
const renderless = (props, { computed, reactive }, { emit }) => {
const api2 = {};
const state = reactive({
descTooltip: "",
sliceNum: 2,
iconNum: 3,
effectOptions: computed(() => api2.computedOptions())
});
Object.assign(api2, {
state,
handleTitleClick: handleTitleClick({ props }),
handelIconClick: handelIconClick({ emit }),
handleEnterDesc: handleEnterDesc({ state, props }),
computedOptions: computedOptions({ props })
});
return api2;
};
export {
api,
renderless
};