mt-ui-components-vue3
Version:
玛果添实UI组件库(Vue3)
32 lines • 1.14 kB
JavaScript
/* Analyzed bindings: {
"size": "props",
"ref": "setup-const",
"ColorPicker": "setup-maybe-ref",
"props": "setup-reactive-const",
"btnStyle": "setup-ref"
} */
import { defineComponent as _defineComponent } from 'vue';
import { unref as _unref, mergeProps as _mergeProps, openBlock as _openBlock, createBlock as _createBlock } from "vue";
import { ref } from 'vue';
import ColorPicker from 'colorpicker-v3';
import 'colorpicker-v3/style.css';
const __sfc_main__ = _defineComponent({
props: {
size: { type: String, default: 'default' },
},
setup(__props) {
const props = __props;
// 选择器尺寸
const btnStyle = ref({
mini: { width: '22px', height: '22px' },
small: { width: '32px', height: '32px' },
large: { width: '50px', height: '50px' },
});
return (_ctx, _cache) => {
return (_openBlock(), _createBlock(_unref(ColorPicker), _mergeProps(props, {
"btn-style": btnStyle.value[__props.size]
}), null, 16 /* FULL_PROPS */, ["btn-style"]));
};
}
});
export default __sfc_main__;