UNPKG

tdesign-vue-next

Version:
102 lines (98 loc) 3.24 kB
/** * tdesign v1.19.2 * (c) 2026 tdesign * @license MIT */ import { defineComponent, createVNode, mergeProps } from 'vue'; import { _ as _typeof } from '../../_chunks/dep-e1c62679.mjs'; import { SearchIcon } from 'tdesign-icons-vue-next'; import { Input } from '../../input/index.mjs'; import { u as usePrefixClass, i as useGlobalIcon, p as useEventForward } from '../../_chunks/dep-fbeb2963.mjs'; import '../../input/input.mjs'; import '../../_chunks/dep-c231a5b4.mjs'; import '../../_chunks/dep-ba214d75.mjs'; import '../../input/props.mjs'; import '../../input/hooks/index.mjs'; import '../../input/hooks/useInput.mjs'; import '../../_chunks/dep-f558ebb8.mjs'; import '../../_chunks/dep-b0b422fe.mjs'; import '../../form/constants/index.mjs'; import 'lodash-es'; import '../../_chunks/dep-47c3cae9.mjs'; import '../../_chunks/dep-feed89df.mjs'; import '../../_chunks/dep-5b510fcd.mjs'; import '../../config-provider/hooks/useConfig.mjs'; import '../../config-provider/utils/context.mjs'; import '../../_chunks/dep-e0ab6d55.mjs'; import '../../_chunks/dep-75f265c4.mjs'; import '../../_chunks/dep-67ffcfeb.mjs'; import '../../_chunks/dep-edab0e6a.mjs'; import '../../_chunks/dep-76dddedf.mjs'; import '../../_chunks/dep-d92220c4.mjs'; import '../../_chunks/dep-466a8f31.mjs'; import '../../_chunks/dep-e66c0337.mjs'; import '../../input/hooks/useLengthLimit.mjs'; import '../../_chunks/dep-739ea4cd.mjs'; import '../../_chunks/dep-58979704.mjs'; import '../../input/hooks/useInputEventHandler.mjs'; import '../../input/hooks/useInputWidth.mjs'; import '../../input/input-group.mjs'; import '../../input/input-group-props.mjs'; import './style/css.mjs'; var Search = defineComponent({ name: "TTransferSearch", props: { value: { type: String, "default": "" }, search: { type: [Boolean, Object], "default": false }, placeholder: { type: String, "default": "" }, onChange: Function }, setup: function setup(props) { var classPrefix = usePrefixClass(); var _useGlobalIcon = useGlobalIcon({ SearchIcon: SearchIcon }), SearchIcon$1 = _useGlobalIcon.SearchIcon; var handleChange = function handleChange(value, changeCtx) { var _props$onChange; var e = changeCtx.e, trigger = changeCtx.trigger; (_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, { value: value, e: e, trigger: trigger }); }; var inputProps = _typeof(props.search) === "object" ? props.search : { clearable: true }; var inputEvents = useEventForward(inputProps, { onChange: handleChange }); return function () { return createVNode("div", { "class": "".concat(classPrefix.value, "-transfer__search-wrapper") }, [createVNode(Input, mergeProps({ "defaultValue": props.value, "placeholder": props.placeholder }, inputEvents.value), { "default": function _default() { return [createVNode(SearchIcon$1, { "slot": "suffix-icon" }, null)]; } })]); }; } }); export { Search as default }; //# sourceMappingURL=transfer-search.mjs.map