| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-35fd7ed0"],{"7c4e":function(e,t,n){"use strict";n("d9b6")},8236:function(e,t,n){"use strict";n.r(t);var a=function(){var e=this,t=e._self._c;return t("x-crud",{on:{load:e.onLoad},scopedSlots:e._u([{key:"slot-content",fn:function({scope:n}){return e._l(e.tab.list,(function(a,o){return t("div",{key:o,staticClass:"editor"},[e.tab.index===o?[t("el-button",{staticClass:"change-btn",attrs:{size:"mini"},on:{click:function(t){return e.changeTab(a.to)}}},[e._v(e._s(a.label))]),t(a.component,{tag:"component",attrs:{height:"300px"},model:{value:n.data,callback:function(t){e.$set(n,"data",t)},expression:"scope.data"}})]:e._e()],2)}))}}])})},o=[],l={data(){return{crud:null,tab:{index:null,list:[{label:"切换富文本编辑器",to:1,component:"cl-code"},{label:"切换代码编辑器",to:0,component:"cl-editor-quill"}]}}},methods:{onLoad({ctx:e,app:t}){this.crud=t,e.service(this.$service.system.param).set("upsert",{props:{width:"1000px"},items:[{prop:"name",label:"名称",span:12,component:{name:"el-input",attrs:{placeholder:"请输入名称"}},rules:{required:!0,message:"名称不能为空"}},{prop:"key",label:"Key",span:12,component:{name:"el-input",attrs:{placeholder:"请输入Key"}},rules:{required:!0,message:"Key不能为空"}},{prop:"data",label:"数据",component:{name:"slot-content"}},{prop:"remark",label:"备注",component:{name:"el-input",props:{type:"textarea"},attrs:{placeholder:"请输入备注",rows:3}}}]}).set("table",{columns:[{type:"selection",align:"center",width:60},{label:"名称",prop:"name",align:"center"},{label:"Key",prop:"key",align:"center"},{label:"数据",prop:"data",align:"center","show-overflow-tooltip":!0},{label:"备注",prop:"remark",align:"center"}]}).set("layout",[["refresh-btn","add-btn","multi-delete-btn","flex1","search-key"],["data-table"],["flex1","pagination"]]).on("open",(e,t)=>{this.tab.index=e?/<*>/g.test(t.data)?1:0:1}).done(),t.refresh()},changeTab(e){this.$confirm("切换编辑器会清空输入内容,是否继续?","提示",{type:"warning"}).then(()=>{this.tab.index=e,this.crud.setForm("data","")}).catch(()=>{})}}},r=l,s=(n("7c4e"),n("1805")),c=Object(s["a"])(r,a,o,!1,null,"22bcb384",null);t["default"]=c.exports},d9b6:function(e,t,n){}}]);
|