/*! * FormCreate 低代码表单渲染器 * @form-create/component-subform v2.6.2 * (c) 2018-2024 xaboy * Github https://github.com/xaboy/form-create * Site https://form-create.com/ * Released under the MIT License. */ (function(i,s){typeof exports=="object"&&typeof module!="undefined"?module.exports=s():typeof define=="function"&&define.amd?define(s):(i=typeof globalThis!="undefined"?globalThis:i||self,i.FcSubForm=s())})(this,function(){"use strict";var A=Object.defineProperty;var l=Object.getOwnPropertySymbols;var M=Object.prototype.hasOwnProperty,R=Object.prototype.propertyIsEnumerable;var f=(i,s,o)=>s in i?A(i,s,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[s]=o,h=(i,s)=>{for(var o in s||(s={}))M.call(s,o)&&f(i,o,s[o]);if(l)for(var o of l(s))R.call(s,o)&&f(i,o,s[o]);return i};function i(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function s(){return s=Object.assign?Object.assign.bind():function(n){for(var t,r=1;r({})},disabled:{type:Boolean,default:!1},syncDisabled:{type:Boolean,default:!0}},data(){return{cacheRule:{},cacheValue:{},type:void 0}},watch:{value(n){this.setValue(n)}},methods:{formData(n){this.cacheValue=JSON.stringify(n),this.$emit("input",n),this.$emit("change",n)},setValue(n){const t=JSON.stringify(n);this.cacheValue!==t&&(this.cacheValue=t,this.cacheRule.$f.coverValue(n||{}))},addRule(){const n=this.options?this.options:{submitBtn:!1,resetBtn:!1};n.formData=h({},this.value||{}),this.cacheRule={rule:this.rule,options:n}},add$f(n){this.cacheRule.$f=n,this.$nextTick(()=>{this.$emit("itemMounted",n)})},emitEvent(n,...t){this.$emit(n,...t)}},created(){this.addRule(),this.type=this.formCreateInject.form.$form()},render(){const n=arguments[0],{rule:t,options:r}=this.cacheRule,e=this.type;return n(e,g([{},{on:{"update:value":this.formData,"emit-event":this.emitEvent,input:this.add$f}},{},{props:{rule:t,option:r,disabled:this.disabled,extendOption:!0}}]))}}});