(function(){"use strict";var e={8101:function(e,t,n){var a=n(5471),o=n(1052),r=n.n(o),i=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},[t("el-divider",{attrs:{"content-position":"left"}},[e._v("内容数据")]),t("div",{staticClass:"el-main"},[t("p",{staticStyle:{"text-align":"right","margin-bottom":"10px"}},[t("el-button",{attrs:{type:"primary",icon:"el-icon-plus"},on:{click:e.addItem}},[e._v("添加")])],1),e._l(e.data,(function(n,a){return t("el-card",{key:a,staticStyle:{"margin-bottom":"10px"}},[t("el-form",{ref:"form",refInFor:!0,attrs:{model:n,"label-width":"60px",inline:!0}},[t("el-form-item",[t("span",{staticStyle:{"font-size":"22px","font-weight":"600"}},[e._v("-"+e._s(a+1)+"-")])]),t("el-form-item",{attrs:{label:"名字: "}},[t("el-input",{staticClass:"cascader-item",on:{change:function(t){return e.save()}},model:{value:n.code,callback:function(t){e.$set(n,"code",t)},expression:"item.code"}})],1),t("el-form-item",{attrs:{label:"编码: "}},[t("el-input",{staticClass:"cascader-item",on:{change:function(t){return e.save()}},model:{value:n.name,callback:function(t){e.$set(n,"name",t)},expression:"item.name"}})],1),t("el-form-item",{attrs:{label:"类型: "}},[t("el-select",{staticClass:"cascader-item",attrs:{placeholder:"请选择"},on:{change:function(t){return e.save()}},model:{value:n.type,callback:function(t){e.$set(n,"type",t)},expression:"item.type"}},[t("el-option",{attrs:{label:"ID",value:"id"}}),t("el-option",{attrs:{label:"Array",value:"array",disabled:""}})],1)],1),t("el-form-item",{attrs:{label:"值: "}},[t("el-input",{staticClass:"cascader-item",on:{change:function(t){return e.save()}},model:{value:n.value,callback:function(t){e.$set(n,"value",t)},expression:"item.value"}})],1),t("el-form-item",[t("el-popconfirm",{attrs:{"confirm-button-text":"好的","cancel-button-text":"再想想",icon:"el-icon-info","icon-color":"red",title:"删除后不可恢复，确定吗？"},on:{cancel:function(t){return e.$message.info("已取消")},confirm:function(t){return e.deleteItem(a)}}},[t("el-button",{attrs:{slot:"reference",type:"danger",icon:"el-icon-delete"},slot:"reference"},[e._v("删除")])],1)],1)],1)],1)}))],2)],1)},l=[],c={name:"App",components:{},data(){return{data:[]}},async created(){this.initData()},methods:{save(){this.$setData(this.data)},async initData(){const e=await this.$getData();e&&(this.data=e)},deleteItem(e){this.data.splice(e,1),this.save(),this.$message.success("已删除")},addItem(){this.data.push({name:"",code:"",type:"id",value:""}),this.save()}}},u=c,s=n(1656),f=(0,s.A)(u,i,l,!1,null,null,null),d=f.exports;a["default"].use(r()),a["default"].config.productionTip=!1,a["default"].prototype.$getData=()=>new Promise(((e,t)=>{window.courseware.getData((t=>{e(t)}),"default_key")})),a["default"].prototype.$setData=e=>{window.courseware.setData(e,null,"default_key")},new a["default"]({render:function(e){return e(d)}}).$mount("#app")}},t={};function n(a){var o=t[a];if(void 0!==o)return o.exports;var r=t[a]={id:a,loaded:!1,exports:{}};return e[a](r,r.exports,n),r.loaded=!0,r.exports}n.m=e,function(){n.amdO={}}(),function(){var e=[];n.O=function(t,a,o,r){if(!a){var i=1/0;for(s=0;s<e.length;s++){a=e[s][0],o=e[s][1],r=e[s][2];for(var l=!0,c=0;c<a.length;c++)(!1&r||i>=r)&&Object.keys(n.O).every((function(e){return n.O[e](a[c])}))?a.splice(c--,1):(l=!1,r<i&&(i=r));if(l){e.splice(s--,1);var u=o();void 0!==u&&(t=u)}}return t}r=r||0;for(var s=e.length;s>0&&e[s-1][2]>r;s--)e[s]=e[s-1];e[s]=[a,o,r]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var a in t)n.o(t,a)&&!n.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){var e={524:0};n.O.j=function(t){return 0===e[t]};var t=function(t,a){var o,r,i=a[0],l=a[1],c=a[2],u=0;if(i.some((function(t){return 0!==e[t]}))){for(o in l)n.o(l,o)&&(n.m[o]=l[o]);if(c)var s=c(n)}for(t&&t(a);u<i.length;u++)r=i[u],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(s)},a=self["webpackChunkform_vue"]=self["webpackChunkform_vue"]||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var a=n.O(void 0,[504],(function(){return n(8101)}));a=n.O(a)})();
//# sourceMappingURL=app.310812b1.js.map