xdesign-vue-next
Version:
XDesign Component for vue-next
122 lines (115 loc) • 3.86 kB
JavaScript
/**
* xdesign v1.0.6
* (c) 2023 xdesign
* @license MIT
*/
import { openBlock, createElementBlock, createElementVNode, defineComponent, createVNode, mergeProps } from 'vue';
import _typeof from '@babel/runtime/helpers/typeof';
import { Input } from '../../input/index.js';
import { usePrefixClass } from '../../hooks/useConfig.js';
import '../../input/input.js';
import '../../_chunks/dep-fb0628ce.js';
import '../../_chunks/dep-eade0dcf.js';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/defineProperty';
import '../../input/props.js';
import '../../form/hooks.js';
import '../../hooks/tnode.js';
import 'lodash/isFunction';
import 'lodash/camelCase';
import 'lodash/kebabCase';
import '../../utils/render-tnode.js';
import 'lodash/isEmpty';
import 'lodash/isString';
import 'lodash/isObject';
import '../../input/useInput.js';
import '@babel/runtime/helpers/slicedToArray';
import '../../form/const.js';
import '../../config-provider/useConfig.js';
import 'lodash/cloneDeep';
import '../../config-provider/context.js';
import 'lodash/mergeWith';
import 'lodash/merge';
import '../../_common/js/global-config/default-config.js';
import '../../_common/js/global-config/locale/en_US.js';
import '../../_chunks/dep-3a1cce9f.js';
import 'lodash/isArray';
import '../../hooks/useVModel.js';
import '../../input/useLengthLimit.js';
import '../../_common/js/log/log.js';
import '../../_common/js/utils/helper.js';
import '@babel/runtime/helpers/toConsumableArray';
import 'lodash/isNull';
import 'lodash/isUndefined';
import 'lodash/isNumber';
import '../../input/useInputEventHandler.js';
import '../../input/useInputWidth.js';
import '../../input/input-group.js';
import '../../input/input-group-props.js';
import '../../utils/withInstall.js';
const _hoisted_1 = {
class: "x-icon",
viewBox: "0 0 24 24",
width: "1.1em",
height: "1.1em"
};
const _hoisted_2 = /*#__PURE__*/createElementVNode("path", {
fill: "currentColor",
d: "m18.031 16.617l4.283 4.282l-1.415 1.415l-4.282-4.283A8.96 8.96 0 0 1 11 20c-4.968 0-9-4.032-9-9s4.032-9 9-9s9 4.032 9 9a8.96 8.96 0 0 1-1.969 5.617Zm-2.006-.742A6.977 6.977 0 0 0 18 11c0-3.867-3.133-7-7-7s-7 3.133-7 7s3.133 7 7 7a6.977 6.977 0 0 0 4.875-1.975l.15-.15Z"
}, null, -1 /* HOISTED */);
const _hoisted_3 = [
_hoisted_2
];
function render(_ctx, _cache) {
return (openBlock(), createElementBlock("svg", _hoisted_1, _hoisted_3))
}
var __unplugin_components_0 = { name: 'ri-search-line', render };
/* vite-plugin-components disabled */
var Search = defineComponent({
name: "XTransferSearch",
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 handleChange = function handleChange(value, changeCtx) {
var _props$onChange;
(_props$onChange = props.onChange) === null || _props$onChange === void 0 ? void 0 : _props$onChange.call(props, {
value: value,
e: changeCtx.e
});
};
var inputProps = _typeof(props.search) === "object" ? props.search : {
clearable: true
};
return function () {
return createVNode("div", {
"class": "".concat(classPrefix.value, "-transfer__search-wrapper")
}, [createVNode(Input, mergeProps(inputProps, {
"defaultValue": props.value,
"onChange": handleChange,
"placeholder": props.placeholder
}), {
"default": function _default() {
return [createVNode(__unplugin_components_0, {
"slot": "suffix-icon"
}, null)];
}
})]);
};
}
});
export { Search as default };
//# sourceMappingURL=transfer-search.js.map