@antdv/pro-utils
Version:
@antdv/pro-utils
90 lines (89 loc) • 3.05 kB
JavaScript
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var stdin_exports = {};
__export(stdin_exports, {
InlineErrorFormItem: () => InlineErrorFormItem
});
module.exports = __toCommonJS(stdin_exports);
var import_vue = require("vue");
var import_ant_design_vue = require("ant-design-vue");
var import_form = require("ant-design-vue/es/form");
var import_vue2 = require("vue");
const FIX_INLINE_STYLE = {
marginBlockStart: `-5px`,
marginBlockEnd: `-5px`,
marginInlineStart: 0,
marginInlineEnd: 0
};
const InlineErrorFormItem = (0, import_vue2.defineComponent)({
name: "InlineErrorFormItem",
inheritAttrs: false,
props: (0, import_form.formItemProps)(),
slots: Object,
setup(props, {
slots,
attrs
}) {
return () => {
const _a = props, {
rules,
name
} = _a, rest = __objRest(_a, [
"rules",
"name"
]);
return (0, import_vue.createVNode)(import_ant_design_vue.Form.Item, (0, import_vue.mergeProps)({
"rules": rules
}, rest, {
"style": __spreadValues(__spreadValues({}, FIX_INLINE_STYLE), attrs.style || {}),
"name": name
}), {
default: () => {
var _a2;
return [(_a2 = slots.default) == null ? void 0 : _a2.call(slots)];
}
});
};
}
});