ivue-material-plus
Version:
A high quality UI components Library with Vue.js
77 lines (74 loc) • 3.28 kB
JavaScript
import _sfc_main from './form-item.vue_vue_type_script_lang.mjs';
import { resolveComponent, openBlock, createElementBlock, normalizeClass, createCommentVNode, createVNode, withCtx, createBlock, resolveDynamicComponent, normalizeStyle, renderSlot, createTextVNode, toDisplayString, createElementVNode, Transition } from 'vue';
import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
var _a;
const _component_form_label_wrap = resolveComponent("form-label-wrap");
return openBlock(), createElementBlock("div", {
class: normalizeClass(_ctx.wrapperClasses),
ref: "formItem"
}, [
createCommentVNode(" \u6807\u7B7E "),
createVNode(_component_form_label_wrap, {
"is-auto-width": _ctx.labelStyle.width === "auto",
"update-all": ((_a = _ctx.formContext) == null ? void 0 : _a.labelWidth) === "auto"
}, {
default: withCtx(() => [
_ctx.showLabel ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.labelFor ? "label" : "div"), {
key: 0,
class: normalizeClass(`${_ctx.prefixCls}--label`),
id: _ctx.labelId,
for: _ctx.labelFor,
style: normalizeStyle(_ctx.labelStyle)
}, {
default: withCtx(() => [
renderSlot(_ctx.$slots, "label", { label: _ctx.currentLabel }, () => [
createTextVNode(toDisplayString(_ctx.currentLabel), 1)
])
]),
_: 3
}, 8, ["class", "id", "for", "style"])) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["is-auto-width", "update-all"]),
createCommentVNode(" \u5185\u5BB9 "),
createElementVNode("div", {
class: normalizeClass(`${_ctx.prefixCls}--content`),
style: normalizeStyle(_ctx.contentStyle)
}, [
renderSlot(_ctx.$slots, "default"),
createCommentVNode(" \u9519\u8BEF\u63D0\u793A "),
createVNode(Transition, {
name: `${_ctx.prefixCls}-zoom-in-top`
}, {
default: withCtx(() => [
_ctx.shouldShowError ? renderSlot(_ctx.$slots, "error", {
key: 0,
error: _ctx.validateMessage
}, () => [
createElementVNode("div", {
class: normalizeClass(_ctx.validateClasses)
}, toDisplayString(_ctx.validateMessage), 3)
]) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["name"]),
createCommentVNode(" \u6210\u529F "),
createVNode(Transition, {
name: `${_ctx.prefixCls}-zoom-in-top`
}, {
default: withCtx(() => [
_ctx.shouldShowSuccess && _ctx.validateSuccessMessage ? renderSlot(_ctx.$slots, "success", { key: 0 }, () => [
createElementVNode("div", {
class: normalizeClass(_ctx.validateClasses)
}, toDisplayString(_ctx.validateSuccessMessage), 3)
]) : createCommentVNode("v-if", true)
]),
_: 3
}, 8, ["name"])
], 6)
], 2);
}
var FormItem = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__file", "D:\\louise\\person\\project\\GitHub\\ivue-ui-plus\\src\\components\\ivue-form\\form-item.vue"]]);
export { FormItem as default };
//# sourceMappingURL=form-item.mjs.map