qmw-form-design 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  import { mergeModels as f, useModel as u, onMounted as w, createElementBlock as r, openBlock as i, normalizeStyle as s, createElementVNode as g, toDisplayString as v, createVNode as a, unref as l, withCtx as h, Fragment as k, renderList as x, normalizeClass as L, withModifiers as C, createBlock as m, resolveDynamicComponent as y } from "vue";
2
- import { l as _, _ as b, a as M } from "./formDesign-B79QbdgW.mjs";
2
+ import { l as _, _ as b, a as M } from "./formDesign-CZEL45Hk.mjs";
3
3
  const S = { style: { "min-height": "60px", border: "1px solid #e8eaec", "border-style": "dashed", "border-radius": "4px" } }, W = ["onClick"], B = {
4
4
  __name: "groupWidget",
5
5
  props: /* @__PURE__ */ f({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./formDesign-DvAgmtzv.js"),a={style:{"min-height":"60px",border:"1px solid #e8eaec","border-style":"dashed","border-radius":"4px"}},c=["onClick"],u={__name:"groupWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widgetList:{},widgetListModifiers:{},widget:{},widgetModifiers:{}}),emits:["update:widgetList","update:widget"],setup(n){e.useModel(n,"widgetList");const l=e.useModel(n,"widget"),i=window.$formDesignerStore;return e.onMounted(()=>{}),(m,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(n.style),class:"group-widget"},[e.createElementVNode("div",{style:e.normalizeStyle(l.value.labelStyle)},e.toDisplayString(l.value.config.label),5),e.createElementVNode("div",a,[e.createVNode(e.unref(r.lo),{modelValue:l.value.children,"onUpdate:modelValue":o[0]||(o[0]=t=>l.value.children=t),animation:"150",group:"formContainer",onAdd:o[1]||(o[1]=t=>{e.unref(i).addWidget(t,l.value.children,l.value)}),onEnd:e.unref(i).saveHistoryStep,style:{"min-height":"30px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value.children,(t,d)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(s=>{e.unref(i).onClickFormWidget(s,t)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(i).setAreaClass(t)])},[e.createVNode(r._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(r._sfc_main$1,{widget:t,widgetList:t.children,widgetIndex:d,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),t.pType=="formWidget"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:0,widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:1,widgetList:t.children,style:e.normalizeStyle(t.style)},null,8,["widgetList","style"]))],10,c))),128))]),_:1},8,["modelValue","onEnd"])])],4))}};exports.default=u;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./formDesign-BuGm_1Jj.js"),a={style:{"min-height":"60px",border:"1px solid #e8eaec","border-style":"dashed","border-radius":"4px"}},c=["onClick"],u={__name:"groupWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widgetList:{},widgetListModifiers:{},widget:{},widgetModifiers:{}}),emits:["update:widgetList","update:widget"],setup(n){e.useModel(n,"widgetList");const l=e.useModel(n,"widget"),i=window.$formDesignerStore;return e.onMounted(()=>{}),(m,o)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(n.style),class:"group-widget"},[e.createElementVNode("div",{style:e.normalizeStyle(l.value.labelStyle)},e.toDisplayString(l.value.config.label),5),e.createElementVNode("div",a,[e.createVNode(e.unref(r.lo),{modelValue:l.value.children,"onUpdate:modelValue":o[0]||(o[0]=t=>l.value.children=t),animation:"150",group:"formContainer",onAdd:o[1]||(o[1]=t=>{e.unref(i).addWidget(t,l.value.children,l.value)}),onEnd:e.unref(i).saveHistoryStep,style:{"min-height":"30px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.value.children,(t,d)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(s=>{e.unref(i).onClickFormWidget(s,t)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(i).setAreaClass(t)])},[e.createVNode(r._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(r._sfc_main$1,{widget:t,widgetList:t.children,widgetIndex:d,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),t.pType=="formWidget"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:0,widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:1,widgetList:t.children,style:e.normalizeStyle(t.style)},null,8,["widgetList","style"]))],10,c))),128))]),_:1},8,["modelValue","onEnd"])])],4))}};exports.default=u;
@@ -1 +1 @@
1
- "use strict";const e=require("./formDesign-DvAgmtzv.js");module.exports=e.formDesign;
1
+ "use strict";const e=require("./formDesign-BuGm_1Jj.js");module.exports=e.formDesign;
@@ -1,4 +1,4 @@
1
- import { f as e } from "./formDesign-B79QbdgW.mjs";
1
+ import { f as e } from "./formDesign-CZEL45Hk.mjs";
2
2
  export {
3
3
  e as default
4
4
  };
@@ -20827,7 +20827,7 @@ function i1t(t, e, r, n, o, i) {
20827
20827
  return k3(), O3("div", o1t, null, 512);
20828
20828
  }
20829
20829
  var a1t = /* @__PURE__ */ $z(n1t, [["render", i1t]]);
20830
- const u1t = { style: { display: "flex" } }, l1t = {
20830
+ const u1t = { style: { display: "flex", height: "400px" } }, l1t = {
20831
20831
  __name: "richEditorWidget",
20832
20832
  props: /* @__PURE__ */ Wz({
20833
20833
  style: {
@@ -20862,7 +20862,7 @@ const u1t = { style: { display: "flex" } }, l1t = {
20862
20862
  mode: e.value.config.richEditMode
20863
20863
  }, null, 8, ["editor", "mode"]),
20864
20864
  WC(GC(r1t), {
20865
- style: { height: "240px" },
20865
+ style: { height: "350px" },
20866
20866
  modelValue: i.value,
20867
20867
  "onUpdate:modelValue": s[0] || (s[0] = (l) => i.value = l),
20868
20868
  defaultConfig: o,
@@ -183,4 +183,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
183
183
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
184
184
  PERFORMANCE OF THIS SOFTWARE.
185
185
  ***************************************************************************** */function ru(t){var e=t.menus,r=t.renderElems,n=t.renderStyle,o=t.elemsToHtml,i=t.styleToHtml,a=t.preParseHtml,u=t.parseElemsHtml,s=t.parseStyleHtml,l=t.editorPlugin;e&&e.forEach((function(c){return nr.registerMenu(c)})),r&&r.forEach((function(c){return nr.registerRenderElem(c)})),n&&nr.registerRenderStyle(n),o&&o.forEach((function(c){return nr.registerElemToHtml(c)})),i&&nr.registerStyleToHtml(i),a&&a.forEach((function(c){return nr.registerPreParseHtml(c)})),u&&u.forEach((function(c){return nr.registerParseElemHtml(c)})),s&&nr.registerParseStyleHtml(s),l&&nr.registerPlugin(l)}Bat.forEach((function(t){return ru(t)})),ru(alt),ru(_ft),ru(Hht),ru(P0t),ru(Emt);var Fz='<svg viewBox="0 0 1024 1024"><path d="M959.877 128l0.123 0.123v767.775l-0.123 0.122H64.102l-0.122-0.122V128.123l0.122-0.123h895.775zM960 64H64C28.795 64 0 92.795 0 128v768c0 35.205 28.795 64 64 64h896c35.205 0 64-28.795 64-64V128c0-35.205-28.795-64-64-64zM832 288.01c0 53.023-42.988 96.01-96.01 96.01s-96.01-42.987-96.01-96.01S682.967 192 735.99 192 832 234.988 832 288.01zM896 832H128V704l224.01-384 256 320h64l224.01-192z"></path></svg>',Tz={link:{menuKeys:["editLink","unLink","viewLink"]},image:{menuKeys:["imageWidth30","imageWidth50","imageWidth100","editImage","viewImageLink","deleteImage"]},pre:{menuKeys:["enter","codeBlock","codeSelectLang"]},table:{menuKeys:["enter","tableHeader","tableFullWidth","insertTableRow","deleteTableRow","insertTableCol","deleteTableCol","deleteTable"]},divider:{menuKeys:["enter"]},video:{menuKeys:["enter","editVideoSize"]}},xmt={hoverbarKeys:Ae(Ae({},Tz),{text:{menuKeys:["headerSelect","insertLink","bulletedList","|","bold","through","color","bgColor","clearStyle"]}})};nr.setEditorConfig(Ae(Ae({},xmt),{decorate:Bz}));var Smt={hoverbarKeys:Tz};nr.setSimpleEditorConfig(Ae(Ae({},Smt),{decorate:Bz}));var Amt={toolbarKeys:["headerSelect","blockquote","|","bold","underline","italic",{key:"group-more-style",title:Q("editor.more"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M505.6 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path><path d="M806.4 505.6m-76.8 0a76.8 76.8 0 1 0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',menuKeys:["through","code","sup","sub","clearStyle"]},"color","bgColor","|","fontSize","fontFamily","lineHeight","|","bulletedList","numberedList","todo",{key:"group-justify",title:Q("editor.justify"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v102.4H51.2v-102.4h716.8z m204.8-230.4v102.4H51.2v-102.4h921.6z m-204.8-230.4v102.4H51.2v-102.4h716.8zM972.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',menuKeys:["justifyLeft","justifyRight","justifyCenter","justifyJustify"]},{key:"group-indent",title:Q("editor.indent"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v128H0z m384 192h640v128H384z m0 192h640v128H384z m0 192h640v128H384zM0 832h1024v128H0z m0-128V320l256 192z"></path></svg>',menuKeys:["indent","delIndent"]},"|","emotion","insertLink",{key:"group-image",title:Q("editor.image"),iconSvg:Fz,menuKeys:["insertImage","uploadImage"]},{key:"group-video",title:Q("editor.video"),iconSvg:'<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',menuKeys:["insertVideo","uploadVideo"]},"insertTable","codeBlock","divider","|","undo","redo","|","fullScreen"]};nr.setToolbarConfig(Amt);var Omt={toolbarKeys:["blockquote","header1","header2","header3","|","bold","underline","italic","through","color","bgColor","clearStyle","|","bulletedList","numberedList","todo","justifyLeft","justifyRight","justifyCenter","|","insertLink",{key:"group-image",title:Q("editor.image"),iconSvg:Fz,menuKeys:["insertImage","uploadImage"]},"insertVideo","insertTable","codeBlock","|","undo","redo","|","fullScreen"]};function kmt(t){t===void 0&&(t={});var e=t.selector,r=e===void 0?"":e,n=t.content,o=n===void 0?[]:n,i=t.html,a=t.config,u=a===void 0?{}:a,s=t.mode,l=(s===void 0?"default":s)==="simple"?nr.simpleEditorConfig:nr.editorConfig,c=Ae(Ae({},l.hoverbarKeys||{}),u.hoverbarKeys||{});return FQ({selector:r,config:Ae(Ae(Ae({},l),u),{hoverbarKeys:c}),content:o,html:i,plugins:nr.plugins})}function Bmt(t){var e=t.selector,r=t.editor,n=t.config,o=n===void 0?{}:n,i=t.mode,a=i===void 0?"default":i;if(!e)throw new Error("Cannot find 'selector' when create toolbar");var u=a==="simple"?nr.simpleToolbarConfig:nr.toolbarConfig,s=(function(l,c){if(l==null)throw new Error("Cannot create toolbar, because editor is null");var f=c.selector,d=c.config,p=d===void 0?{}:d;if((function(g,m){return wN(g,"data-w-e-toolbar",m)})(l,f))throw new Error("Repeated create toolbar by selector '"+f+"'");var v=bn({toolbarKeys:[],excludeKeys:[],insertKeys:{index:0,keys:[]},modalAppendToBody:!1},p||{}),y=new NQ(f,v);return $5.set(y,l),My.set(l,y),y})(r,{selector:e,config:Ae(Ae({},u),o)});return s}nr.setSimpleToolbarConfig(Omt);var Fmt=Object.defineProperty,Tmt=Object.defineProperties,_mt=Object.getOwnPropertyDescriptors,P_=Object.getOwnPropertySymbols,Pmt=Object.prototype.hasOwnProperty,jmt=Object.prototype.propertyIsEnumerable,j_=(t,e,r)=>e in t?Fmt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Nmt=(t,e)=>{for(var r in e||(e={}))Pmt.call(e,r)&&j_(t,r,e[r]);if(P_)for(var r of P_(e))jmt.call(e,r)&&j_(t,r,e[r]);return t},Imt=(t,e)=>Tmt(t,_mt(e));function Ni(t){let e=`请使用 '@${t}' 事件,不要放在 props 中`;return e+=`
186
- Please use '@${t}' event instead of props`,e}var _z=(t,e)=>{for(const[r,n]of e)t[r]=n;return t};const Lmt=Jt.defineComponent({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(t,e){const r=Jt.ref(null),n=Jt.shallowRef(null),o=Jt.ref(""),i=()=>{if(!r.value)return;const u=Jt.toRaw(t.defaultContent);kmt({selector:r.value,mode:t.mode,content:u||[],html:t.defaultHtml||t.modelValue||"",config:Imt(Nmt({},t.defaultConfig),{onCreated(s){if(n.value=s,e.emit("onCreated",s),t.defaultConfig.onCreated){const l=Ni("onCreated");throw new Error(l)}},onChange(s){const l=s.getHtml();if(o.value=l,e.emit("update:modelValue",l),e.emit("onChange",s),t.defaultConfig.onChange){const c=Ni("onChange");throw new Error(c)}},onDestroyed(s){if(e.emit("onDestroyed",s),t.defaultConfig.onDestroyed){const l=Ni("onDestroyed");throw new Error(l)}},onMaxLength(s){if(e.emit("onMaxLength",s),t.defaultConfig.onMaxLength){const l=Ni("onMaxLength");throw new Error(l)}},onFocus(s){if(e.emit("onFocus",s),t.defaultConfig.onFocus){const l=Ni("onFocus");throw new Error(l)}},onBlur(s){if(e.emit("onBlur",s),t.defaultConfig.onBlur){const l=Ni("onBlur");throw new Error(l)}},customAlert(s,l){if(e.emit("customAlert",s,l),t.defaultConfig.customAlert){const c=Ni("customAlert");throw new Error(c)}},customPaste:(s,l)=>{if(t.defaultConfig.customPaste){const f=Ni("customPaste");throw new Error(f)}let c;return e.emit("customPaste",s,l,f=>{c=f}),c}})})};function a(u){const s=n.value;s?.setHtml(u)}return Jt.onMounted(()=>{i()}),Jt.watch(()=>t.modelValue,u=>{u!==o.value&&a(u)}),{box:r}}}),Rmt={ref:"box",style:{height:"100%"}};function Mmt(t,e,r,n,o,i){return Jt.openBlock(),Jt.createElementBlock("div",Rmt,null,512)}var zmt=_z(Lmt,[["render",Mmt]]);const $mt=Jt.defineComponent({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(t){const e=Jt.ref(null),r=n=>{if(e.value){if(n==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");A.getToolbar(n)||Bmt({editor:n,selector:e.value||"<div></div>",mode:t.mode,config:t.defaultConfig})}};return Jt.watchEffect(()=>{const{editor:n}=t;n!=null&&r(n)}),{selector:e}}}),Hmt={ref:"selector"};function Vmt(t,e,r,n,o,i){return Jt.openBlock(),Jt.createElementBlock("div",Hmt,null,512)}var Umt=_z($mt,[["render",Vmt]]);const Wmt={style:{display:"flex"}},Gmt={__name:"richEditorWidget",props:Jt.mergeModels({style:{type:Object,default:()=>({})}},{widget:{},widgetModifiers:{}}),emits:["update:widget"],setup(t){const e=Jt.useModel(t,"widget"),r=Jt.shallowRef(),n={},o={},i=Jt.ref(""),a=u=>{r.value=u,u.disable()};return Jt.onMounted(()=>{}),Jt.onBeforeUnmount(()=>{const u=r.value;u?.destroy()}),(u,s)=>(Jt.openBlock(),Jt.createElementBlock("div",Wmt,[Jt.createElementVNode("div",{style:Jt.normalizeStyle(e.value.labelStyle),class:"widget-label"},Jt.toDisplayString(e.value.config.label),5),Jt.createElementVNode("div",{style:Jt.normalizeStyle(t.style)},[Jt.createVNode(Jt.unref(Umt),{style:{"border-bottom":"1px solid #ccc"},editor:r.value,defaultConfig:n,mode:e.value.config.richEditMode},null,8,["editor","mode"]),Jt.createVNode(Jt.unref(zmt),{style:{height:"240px"},modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=l=>i.value=l),defaultConfig:o,mode:e.value.config.richEditMode,onOnCreated:a},null,8,["modelValue","mode"])],4)]))}};exports.default=Gmt;
186
+ Please use '@${t}' event instead of props`,e}var _z=(t,e)=>{for(const[r,n]of e)t[r]=n;return t};const Lmt=Jt.defineComponent({props:{mode:{type:String,default:"default"},defaultContent:{type:Array,default:[]},defaultHtml:{type:String,default:""},defaultConfig:{type:Object,default:{}},modelValue:{type:String,default:""}},setup(t,e){const r=Jt.ref(null),n=Jt.shallowRef(null),o=Jt.ref(""),i=()=>{if(!r.value)return;const u=Jt.toRaw(t.defaultContent);kmt({selector:r.value,mode:t.mode,content:u||[],html:t.defaultHtml||t.modelValue||"",config:Imt(Nmt({},t.defaultConfig),{onCreated(s){if(n.value=s,e.emit("onCreated",s),t.defaultConfig.onCreated){const l=Ni("onCreated");throw new Error(l)}},onChange(s){const l=s.getHtml();if(o.value=l,e.emit("update:modelValue",l),e.emit("onChange",s),t.defaultConfig.onChange){const c=Ni("onChange");throw new Error(c)}},onDestroyed(s){if(e.emit("onDestroyed",s),t.defaultConfig.onDestroyed){const l=Ni("onDestroyed");throw new Error(l)}},onMaxLength(s){if(e.emit("onMaxLength",s),t.defaultConfig.onMaxLength){const l=Ni("onMaxLength");throw new Error(l)}},onFocus(s){if(e.emit("onFocus",s),t.defaultConfig.onFocus){const l=Ni("onFocus");throw new Error(l)}},onBlur(s){if(e.emit("onBlur",s),t.defaultConfig.onBlur){const l=Ni("onBlur");throw new Error(l)}},customAlert(s,l){if(e.emit("customAlert",s,l),t.defaultConfig.customAlert){const c=Ni("customAlert");throw new Error(c)}},customPaste:(s,l)=>{if(t.defaultConfig.customPaste){const f=Ni("customPaste");throw new Error(f)}let c;return e.emit("customPaste",s,l,f=>{c=f}),c}})})};function a(u){const s=n.value;s?.setHtml(u)}return Jt.onMounted(()=>{i()}),Jt.watch(()=>t.modelValue,u=>{u!==o.value&&a(u)}),{box:r}}}),Rmt={ref:"box",style:{height:"100%"}};function Mmt(t,e,r,n,o,i){return Jt.openBlock(),Jt.createElementBlock("div",Rmt,null,512)}var zmt=_z(Lmt,[["render",Mmt]]);const $mt=Jt.defineComponent({props:{editor:{type:Object},mode:{type:String,default:"default"},defaultConfig:{type:Object,default:{}}},setup(t){const e=Jt.ref(null),r=n=>{if(e.value){if(n==null)throw new Error("Not found instance of Editor when create <Toolbar/> component");A.getToolbar(n)||Bmt({editor:n,selector:e.value||"<div></div>",mode:t.mode,config:t.defaultConfig})}};return Jt.watchEffect(()=>{const{editor:n}=t;n!=null&&r(n)}),{selector:e}}}),Hmt={ref:"selector"};function Vmt(t,e,r,n,o,i){return Jt.openBlock(),Jt.createElementBlock("div",Hmt,null,512)}var Umt=_z($mt,[["render",Vmt]]);const Wmt={style:{display:"flex",height:"400px"}},Gmt={__name:"richEditorWidget",props:Jt.mergeModels({style:{type:Object,default:()=>({})}},{widget:{},widgetModifiers:{}}),emits:["update:widget"],setup(t){const e=Jt.useModel(t,"widget"),r=Jt.shallowRef(),n={},o={},i=Jt.ref(""),a=u=>{r.value=u,u.disable()};return Jt.onMounted(()=>{}),Jt.onBeforeUnmount(()=>{const u=r.value;u?.destroy()}),(u,s)=>(Jt.openBlock(),Jt.createElementBlock("div",Wmt,[Jt.createElementVNode("div",{style:Jt.normalizeStyle(e.value.labelStyle),class:"widget-label"},Jt.toDisplayString(e.value.config.label),5),Jt.createElementVNode("div",{style:Jt.normalizeStyle(t.style)},[Jt.createVNode(Jt.unref(Umt),{style:{"border-bottom":"1px solid #ccc"},editor:r.value,defaultConfig:n,mode:e.value.config.richEditMode},null,8,["editor","mode"]),Jt.createVNode(Jt.unref(zmt),{style:{height:"350px"},modelValue:i.value,"onUpdate:modelValue":s[0]||(s[0]=l=>i.value=l),defaultConfig:o,mode:e.value.config.richEditMode,onOnCreated:a},null,8,["modelValue","mode"])],4)]))}};exports.default=Gmt;
@@ -1,5 +1,5 @@
1
1
  import { mergeModels as _, useModel as g, onMounted as v, createElementBlock as s, openBlock as i, normalizeStyle as o, Fragment as u, renderList as p, withModifiers as m, normalizeClass as c, unref as d, createVNode as l, withCtx as x, createBlock as y, resolveDynamicComponent as w } from "vue";
2
- import { _ as f, a as W, l as M } from "./formDesign-B79QbdgW.mjs";
2
+ import { _ as f, a as W, l as M } from "./formDesign-CZEL45Hk.mjs";
3
3
  const V = ["onClick"], A = ["onClick"], E = {
4
4
  __name: "rowColWidget",
5
5
  props: /* @__PURE__ */ _({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./formDesign-DvAgmtzv.js"),u=["onClick"],g=["onClick"],m={__name:"rowColWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widgetList:{},widgetListModifiers:{},pWidget:{},pWidgetModifiers:{}}),emits:["update:widgetList","update:pWidget"],setup(d){const o=e.useModel(d,"widgetList"),r=e.useModel(d,"pWidget"),n=window.$formDesignerStore;return e.onMounted(()=>{}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(d.style),class:"row-widget"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(i,s)=>(e.openBlock(),e.createElementBlock("div",{key:i.id,style:e.normalizeStyle(i.style),class:e.normalizeClass(["col-widget",e.unref(n).setAreaClass(i)]),onClick:e.withModifiers(t=>{e.unref(n).onClickFormWidget(t,i)},["stop"])},[e.createVNode(l._sfc_main,{widget:i},null,8,["widget"]),e.createVNode(l._sfc_main$1,{widget:i,widgetList:o.value,widgetIndex:s,pWidget:r.value},null,8,["widget","widgetList","widgetIndex","pWidget"]),e.createVNode(e.unref(l.lo),{modelValue:i.children,"onUpdate:modelValue":t=>i.children=t,animation:"150",group:"formContainer",onAdd:t=>{e.unref(n).addWidget(t,i.children,i)},onEnd:e.unref(n).saveHistoryStep,style:{"min-height":"30px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.children,(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(c=>{e.unref(n).onClickFormWidget(c,t)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(n).setAreaClass(t)])},[e.createVNode(l._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(l._sfc_main$1,{widget:t,widgetList:i.children,widgetIndex:a,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),t.pType=="formWidget"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:0,widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:1,widgetList:t.children,style:e.normalizeStyle(t.style),pWidget:t},null,8,["widgetList","style","pWidget"]))],10,g))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onAdd","onEnd"])],14,u))),128))],4))}};exports.default=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),l=require("./formDesign-BuGm_1Jj.js"),u=["onClick"],g=["onClick"],m={__name:"rowColWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widgetList:{},widgetListModifiers:{},pWidget:{},pWidgetModifiers:{}}),emits:["update:widgetList","update:pWidget"],setup(d){const o=e.useModel(d,"widgetList"),r=e.useModel(d,"pWidget"),n=window.$formDesignerStore;return e.onMounted(()=>{}),(p,y)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(d.style),class:"row-widget"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,(i,s)=>(e.openBlock(),e.createElementBlock("div",{key:i.id,style:e.normalizeStyle(i.style),class:e.normalizeClass(["col-widget",e.unref(n).setAreaClass(i)]),onClick:e.withModifiers(t=>{e.unref(n).onClickFormWidget(t,i)},["stop"])},[e.createVNode(l._sfc_main,{widget:i},null,8,["widget"]),e.createVNode(l._sfc_main$1,{widget:i,widgetList:o.value,widgetIndex:s,pWidget:r.value},null,8,["widget","widgetList","widgetIndex","pWidget"]),e.createVNode(e.unref(l.lo),{modelValue:i.children,"onUpdate:modelValue":t=>i.children=t,animation:"150",group:"formContainer",onAdd:t=>{e.unref(n).addWidget(t,i.children,i)},onEnd:e.unref(n).saveHistoryStep,style:{"min-height":"30px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.children,(t,a)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(c=>{e.unref(n).onClickFormWidget(c,t)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(n).setAreaClass(t)])},[e.createVNode(l._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(l._sfc_main$1,{widget:t,widgetList:i.children,widgetIndex:a,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),t.pType=="formWidget"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:0,widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:1,widgetList:t.children,style:e.normalizeStyle(t.style),pWidget:t},null,8,["widgetList","style","pWidget"]))],10,g))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","onAdd","onEnd"])],14,u))),128))],4))}};exports.default=m;
@@ -1,5 +1,5 @@
1
1
  import { mergeModels as M, useModel as m, onMounted as v, createElementBlock as l, openBlock as i, normalizeStyle as o, createElementVNode as V, Fragment as a, renderList as g, normalizeClass as u, unref as n, createCommentVNode as I, withModifiers as y, createVNode as r, withCtx as A, createBlock as w, resolveDynamicComponent as h } from "vue";
2
- import { _ as f, a as W, l as b } from "./formDesign-B79QbdgW.mjs";
2
+ import { _ as f, a as W, l as b } from "./formDesign-CZEL45Hk.mjs";
3
3
  const E = ["id"], S = ["onClick", "colspan", "rowspan"], B = ["onClick"], T = {
4
4
  __name: "tableWidget",
5
5
  props: /* @__PURE__ */ M({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./formDesign-DvAgmtzv.js"),g=["id"],p=["onClick","colspan","rowspan"],y=["onClick"],k={__name:"tableWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widgetList:{},widgetListModifiers:{},pWidget:{},pWidgetModifiers:{}}),emits:["update:widgetList","update:pWidget"],setup(r){const s=e.useModel(r,"widgetList"),a=e.useModel(r,"pWidget"),n=window.$formDesignerStore;return e.onMounted(()=>{}),(f,w)=>(e.openBlock(),e.createElementBlock("table",{style:e.normalizeStyle(r.style)},[e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(o,c)=>(e.openBlock(),e.createElementBlock("tr",{key:o.id,style:e.normalizeStyle(o.style),class:e.normalizeClass(e.unref(n).setAreaClass(o)),id:o.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.children,(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.id},[!l.cMerge&&!l.rMerge?(e.openBlock(),e.createElementBlock("td",{key:0,style:e.normalizeStyle(l.style),onClick:e.withModifiers(t=>{e.unref(n).onClickFormWidget(t,l)},["stop"]),class:e.normalizeClass(e.unref(n).setAreaClass(l)),colspan:l.colspan,rowspan:l.rowspan},[e.createVNode(i._sfc_main,{widget:l},null,8,["widget"]),e.createVNode(i._sfc_main$1,{widget:l,widgetList:s.value,widgetIndex:d,trIndex:c,pWidget:a.value},null,8,["widget","widgetList","widgetIndex","trIndex","pWidget"]),e.createVNode(e.unref(i.lo),{modelValue:l.children,"onUpdate:modelValue":t=>l.children=t,animation:"150",group:"formContainer",style:e.normalizeStyle(l.style&&l.style.minHeight?"min-height:"+l.style.minHeight:""),onAdd:t=>{e.unref(n).addWidget(t,l.children,l)},onEnd:e.unref(n).saveHistoryStep},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.children,(t,m)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(u=>{e.unref(n).onClickFormWidget(u,t)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(n).setAreaClass(t)])},[e.createVNode(i._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(i._sfc_main$1,{widget:t,widgetList:l.children,widgetIndex:m,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),t.pType=="formWidget"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:0,widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:1,widgetList:t.children,style:e.normalizeStyle(t.style),pWidget:t},null,8,["widgetList","style","pWidget"]))],10,y))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","style","onAdd","onEnd"])],14,p)):e.createCommentVNode("",!0)],64))),128))],14,g))),128))])],4))}};exports.default=k;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./formDesign-BuGm_1Jj.js"),g=["id"],p=["onClick","colspan","rowspan"],y=["onClick"],k={__name:"tableWidget",props:e.mergeModels({style:{type:Object,default:()=>({})}},{widgetList:{},widgetListModifiers:{},pWidget:{},pWidgetModifiers:{}}),emits:["update:widgetList","update:pWidget"],setup(r){const s=e.useModel(r,"widgetList"),a=e.useModel(r,"pWidget"),n=window.$formDesignerStore;return e.onMounted(()=>{}),(f,w)=>(e.openBlock(),e.createElementBlock("table",{style:e.normalizeStyle(r.style)},[e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.value,(o,c)=>(e.openBlock(),e.createElementBlock("tr",{key:o.id,style:e.normalizeStyle(o.style),class:e.normalizeClass(e.unref(n).setAreaClass(o)),id:o.id},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.children,(l,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.id},[!l.cMerge&&!l.rMerge?(e.openBlock(),e.createElementBlock("td",{key:0,style:e.normalizeStyle(l.style),onClick:e.withModifiers(t=>{e.unref(n).onClickFormWidget(t,l)},["stop"]),class:e.normalizeClass(e.unref(n).setAreaClass(l)),colspan:l.colspan,rowspan:l.rowspan},[e.createVNode(i._sfc_main,{widget:l},null,8,["widget"]),e.createVNode(i._sfc_main$1,{widget:l,widgetList:s.value,widgetIndex:d,trIndex:c,pWidget:a.value},null,8,["widget","widgetList","widgetIndex","trIndex","pWidget"]),e.createVNode(e.unref(i.lo),{modelValue:l.children,"onUpdate:modelValue":t=>l.children=t,animation:"150",group:"formContainer",style:e.normalizeStyle(l.style&&l.style.minHeight?"min-height:"+l.style.minHeight:""),onAdd:t=>{e.unref(n).addWidget(t,l.children,l)},onEnd:e.unref(n).saveHistoryStep},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.children,(t,m)=>(e.openBlock(),e.createElementBlock("div",{key:t.type,onClick:e.withModifiers(u=>{e.unref(n).onClickFormWidget(u,t)},["stop"]),class:e.normalizeClass(["widget-div",e.unref(n).setAreaClass(t)])},[e.createVNode(i._sfc_main,{widget:t},null,8,["widget"]),e.createVNode(i._sfc_main$1,{widget:t,widgetList:l.children,widgetIndex:m,pWidget:t},null,8,["widget","widgetList","widgetIndex","pWidget"]),t.pType=="formWidget"?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:0,widget:t,style:e.normalizeStyle(t.style)},null,8,["widget","style"])):(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.widgetType),{key:1,widgetList:t.children,style:e.normalizeStyle(t.style),pWidget:t},null,8,["widgetList","style","pWidget"]))],10,y))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","style","onAdd","onEnd"])],14,p)):e.createCommentVNode("",!0)],64))),128))],14,g))),128))])],4))}};exports.default=k;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qmw-form-design",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "表单设计器",
5
5
  "main": "./lib/qmw-form-design.js",
6
6
  "keywords": ["qmw", "form-design"],