mt-ui-components-vue3
Version:
玛果添实UI组件库(Vue3)
30 lines • 1.25 kB
JavaScript
/* Analyzed bindings: {
"Select": "setup-maybe-ref",
"SelectProps": "setup-maybe-ref",
"props": "setup-reactive-const",
"filterOption": "setup-const"
} */
import { defineComponent as _defineComponent } from 'vue';
import { renderSlot as _renderSlot, unref as _unref, mergeProps as _mergeProps, withCtx as _withCtx, openBlock as _openBlock, createBlock as _createBlock } from "vue";
import { Select } from 'ant-design-vue';
import { SelectProps } from './selectTypes';
const __sfc_main__ = _defineComponent({
props: SelectProps,
setup(__props) {
const props = __props;
const filterOption = (input, option) => {
const str = option.label || option.value;
return String(str).toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
return (_ctx, _cache) => {
return (_openBlock(), _createBlock(_unref(Select), _mergeProps(props, { "filter-option": filterOption }), {
default: _withCtx(($slots) => [
_renderSlot(_ctx.$slots, "default"),
_renderSlot(_ctx.$slots, "dropdownRender")
]),
_: 3 /* FORWARDED */
}, 16 /* FULL_PROPS */));
};
}
});
export default __sfc_main__;