39 lines
1.3 KiB
JavaScript
39 lines
1.3 KiB
JavaScript
import VTextField from './VTextField';
|
|
import VTextarea from '../VTextarea/VTextarea';
|
|
import rebuildSlots from '../../util/rebuildFunctionalSlots';
|
|
import dedupeModelListeners from '../../util/dedupeModelListeners';
|
|
import { deprecate } from '../../util/console';
|
|
// TODO: remove this in v2.0
|
|
/* @vue/component */
|
|
var wrapper = {
|
|
functional: true,
|
|
$_wrapperFor: VTextField,
|
|
props: {
|
|
textarea: Boolean,
|
|
multiLine: Boolean
|
|
},
|
|
render: function render(h, _ref) {
|
|
var props = _ref.props,
|
|
data = _ref.data,
|
|
slots = _ref.slots,
|
|
parent = _ref.parent;
|
|
|
|
dedupeModelListeners(data);
|
|
var children = rebuildSlots(slots(), h);
|
|
if (props.textarea) {
|
|
deprecate('<v-text-field textarea>', '<v-textarea outline>', wrapper, parent);
|
|
}
|
|
if (props.multiLine) {
|
|
deprecate('<v-text-field multi-line>', '<v-textarea>', wrapper, parent);
|
|
}
|
|
if (props.textarea || props.multiLine) {
|
|
data.attrs.outline = props.textarea;
|
|
return h(VTextarea, data, children);
|
|
} else {
|
|
return h(VTextField, data, children);
|
|
}
|
|
}
|
|
};
|
|
export { wrapper as VTextField };
|
|
export default wrapper;
|
|
//# sourceMappingURL=index.js.map
|