whale-plus
Version:
A Component Library for Vue 3
58 lines (50 loc) • 1.26 kB
JavaScript
/*! Whale v0.0.0-dev.1 */
import { defineComponent, openBlock, createElementBlock, toDisplayString } from 'vue';
const withInstall = (main, extra) => {
main.install = (app) => {
for (const comp of [main, ...Object.values(extra != null ? extra : {})]) {
app.component(comp.name, comp);
}
};
if (extra) {
for (const [key, comp] of Object.entries(extra)) {
main[key] = comp;
}
}
return main;
};
const formProps = {
title: {
type: String,
default: ""
}
};
var _export_sfc = (sfc, props) => {
const target = sfc.__vccOpts || sfc;
for (const [key, val] of props) {
target[key] = val;
}
return target;
};
const _hoisted_1 = { id: "test" };
const _sfc_main = defineComponent({
...{
name: "WlErmForm"
},
__name: "form",
props: formProps,
setup(__props) {
const props = __props;
return (_ctx, _cache) => {
return openBlock(), createElementBlock(
"div",
_hoisted_1,
toDisplayString(props.title),
1
);
};
}
});
var form = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "/Users/shenkun/WorkSpace/Github/whale/packages/components/erm-form/src/form.vue"]]);
const WlErmForm = withInstall(form);
export { WlErmForm, formProps };