saturn-ui
Version:
🪐 一款轻量级、模块化的Web可视化UI组件库(含大屏、GIS、图表、视频、后台等模块) 👍
41 lines (35 loc) • 1.31 kB
JavaScript
import { defineComponent, openBlock, createElementBlock, normalizeStyle, createElementVNode, renderSlot } from 'vue';
var script = defineComponent({
props: {
maxHeight: { type: Number, required: false, default: 100 },
width: { type: String, required: false, default: '100%' }
},
setup(__props) {
return (_ctx, _cache) => {
return (openBlock(), createElementBlock("div", {
class: "ice-scrollbar",
style: normalizeStyle({ maxHeight: __props.maxHeight + 'px', width: __props.width + 'px' || __props.width })
}, [
createElementVNode("div", null, [
renderSlot(_ctx.$slots, "default")
])
], 4));
};
}
});
script.__file = "packages/IceScrollbar/index.vue";
const withInstall = (main, extra) => {
main.install = (app) => {
for (const comp of [main, ...Object.values(extra ?? {})]) {
app.component(comp.name, comp);
}
};
if (extra) {
for (const [key, comp] of Object.entries(extra)) {
main[key] = comp;
}
}
return main;
};
const IceScrollbar = withInstall(script, { name: 'IceScrollbar' });
export { IceScrollbar, IceScrollbar as default };