officialblock 2.1.3 → 2.1.5

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 { defineComponent as G, defineAsyncComponent as J, resolveComponent as k, createBlock as U, openBlock as O, withCtx as y, createElementVNode as i, createVNode as p, createTextVNode as w, toDisplayString as X, ref as C, computed as V, onMounted as q, nextTick as K, onBeforeUnmount as Q, createElementBlock as M, createCommentVNode as B, normalizeStyle as L, normalizeClass as H, Fragment as Y, renderList as Z } from "vue";
2
- import { g as ee, c as I, P as te, _ as z, i as ne, a as le, O as ae, r as oe } from "./index-CPFXI7lC.mjs";
2
+ import { g as ee, c as I, P as te, _ as z, i as ne, a as le, O as ae, r as oe } from "./index-ByHLUvb4.mjs";
3
3
  var R = "Expected a function", A = NaN, se = "[object Symbol]", ie = /^\s+|\s+$/g, re = /^[-+]0x[0-9a-f]+$/i, de = /^0b[01]+$/i, ue = /^0o[0-7]+$/i, fe = parseInt, ce = typeof I == "object" && I && I.Object === Object && I, me = typeof self == "object" && self && self.Object === Object && self, ve = ce || me || Function("return this")(), pe = Object.prototype, ye = pe.toString, ge = Math.max, be = Math.min, N = function() {
4
4
  return ve.Date.now();
5
5
  };
@@ -1 +1 @@
1
- "use strict";var M=Object.create;var O=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var G=(l,v,c,w)=>{if(v&&typeof v=="object"||typeof v=="function")for(let f of j(v))!z.call(l,f)&&f!==c&&O(l,f,{get:()=>v[f],enumerable:!(w=F(v,f))||w.enumerable});return l};var J=(l,v,c)=>(c=l!=null?M(q(l)):{},G(v||!l||!l.__esModule?O(c,"default",{value:l,enumerable:!0}):c,l));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-0C0pBmhT.js"),K={class:"seting-box"},Q={class:"setting-header flex items-center"},R={key:0},W={class:"setting-header items-center"},X={class:"draggable_box"},Y={class:"drag_top_box"},Z=["onClick"],ee={key:0},te={class:"draggable_link_box"},le={class:"drag_link_top_box"},ae=["onClick"],ne=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(l,{emit:v}){const c=e.defineAsyncComponent(()=>import("vuedraggable")),w=e.computed(()=>({animation:200,group:"gridLinks",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),f=e.computed(()=>({animation:200,group:"gridLinkItems",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),y=e.ref(!1),x=e.ref(!1),s=l,p=e.ref(new Set),V=e.ref(new Set),b=()=>{var a,t;(t=(a=s.data)==null?void 0:a.data)!=null&&t.list&&Array.isArray(s.data.data.list)&&(p.value.clear(),V.value.clear(),s.data.data.list.forEach(n=>{n.id&&p.value.add(n.id),n.links&&Array.isArray(n.links)&&n.links.length>0&&n.links.forEach(i=>{i.id&&V.value.add(i.id)})}))},_=e.ref(!1);e.watch(()=>s.show,a=>{a&&!_.value?(_.value=!0,e.nextTick(()=>{b()})):a||(_.value=!1)},{immediate:!0});const B=a=>{var t,n;p.value.has(a.id)?(p.value.clear(),(n=(t=s.data)==null?void 0:t.data)!=null&&n.list&&s.data.data.list.forEach(i=>{i.id!==a.id&&p.value.add(i.id)})):p.value.add(a.id)},m=a=>p.value.has(a.id),r=a=>{s.data.data.list=s.data.data.list.filter(t=>t.id!==a)},h=()=>{var n,i;const a=s.data.data,t=o.r();a.list.push({id:t,title:"这里是标题",links:[]}),p.value.clear(),(i=(n=s.data)==null?void 0:n.data)!=null&&i.list&&s.data.data.list.forEach(g=>{g.id!==t&&p.value.add(g.id)}),e.nextTick(()=>{if(typeof document<"u"){const g=document.querySelector(".arco-drawer-body");g&&(g.scrollTop=g.scrollHeight)}})},C=a=>{V.value.has(a.id)?V.value.delete(a.id):V.value.add(a.id)},k=a=>V.value.has(a.id),$=a=>{const t=s.data.data.list.find(n=>n.id===a);if(t){const n=o.r();t.links.push({id:n,name:"这里是名称",link:""}),t.links&&Array.isArray(t.links)&&t.links.forEach(i=>{i.id!==n?V.value.add(i.id):V.value.delete(i.id)})}},N=(a,t)=>{const n=s.data.data.list.find(i=>i.id===a);n&&n.links&&(n.links=n.links.filter(i=>i.id!==t))},S=v,L=()=>{S("update:show",!1)};return(a,t)=>{const n=e.resolveComponent("a-switch"),i=e.resolveComponent("a-option"),g=e.resolveComponent("a-select"),P=e.resolveComponent("icon-drag-dot"),D=e.resolveComponent("icon-drag-arrow"),U=e.resolveComponent("icon-delete"),T=e.resolveComponent("a-input"),I=e.resolveComponent("icon-plus"),A=e.resolveComponent("a-button"),H=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(H,{width:500,visible:l.show,footer:!1,onCancel:L,unmountOnClose:""},{title:e.withCtx(()=>{var d;return[e.createTextVNode(e.toDisplayString((d=l.data)==null?void 0:d.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",K,[e.createElementVNode("div",Q,[t[7]||(t[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(n,{modelValue:l.data.onlyShowPc,"onUpdate:modelValue":t[0]||(t[0]=d=>l.data.onlyShowPc=d)},null,8,["modelValue"])]),t[19]||(t[19]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(g,{modelValue:l.data.data.width,"onUpdate:modelValue":t[1]||(t[1]=d=>l.data.data.width=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(i,{value:"default"},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(i,{value:"small"},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(i,{value:"middle"},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(i,{value:"max"},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),t[20]||(t[20]=e.createElementVNode("div",{class:"part_title",style:{"margin-top":"20px"}},"链接列表",-1)),l.data.data.list.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",R,"暂无数据")),e.createElementVNode("div",W,[e.createVNode(e.unref(c),e.mergeProps({modelValue:l.data.data.list,"onUpdate:modelValue":t[4]||(t[4]=d=>l.data.data.list=d),"component-data":{tag:"div",type:"transition-group",name:y.value?null:"flip-list"}},w.value,{disabled:!1,onStart:t[5]||(t[5]=d=>y.value=!0),onEnd:t[6]||(t[6]=d=>y.value=!1),"item-key":"id"}),{item:e.withCtx(({element:d})=>[e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",{class:"drag-handle",onClick:u=>B(d)},[e.createVNode(P,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(d.title),1)],8,Z),e.createElementVNode("div",null,[e.createVNode(D,{class:"icon_drag"}),e.createVNode(U,{class:"btn-delete",onClick:e.withModifiers(u=>r(d.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[t[16]||(t[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(T,{modelValue:d.title,"onUpdate:modelValue":u=>d.title=u,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[17]||(t[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),d.links.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ee,"暂无数据")),e.createVNode(e.unref(c),e.mergeProps({modelValue:d.links,"onUpdate:modelValue":u=>d.links=u,"component-data":{tag:"div",type:"transition-group",name:x.value?null:"flip-list"}},f.value,{disabled:!1,onStart:t[2]||(t[2]=u=>x.value=!0),onEnd:t[3]||(t[3]=u=>x.value=!1),"item-key":"id"}),{item:e.withCtx(({element:u})=>[e.createElementVNode("div",te,[e.createElementVNode("div",le,[e.createElementVNode("div",{class:"drag-handle",onClick:E=>C(u)},[e.createVNode(P,{style:{"margin-right":"10px"}}),t[12]||(t[12]=e.createTextVNode("链接 ",-1))],8,ae),e.createElementVNode("div",null,[e.createVNode(D,{class:"icon_drag"}),e.createVNode(U,{class:"btn-delete",onClick:e.withModifiers(E=>N(d.id,u.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[t[13]||(t[13]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 名称 ",-1)),e.createVNode(T,{modelValue:u.name,"onUpdate:modelValue":E=>u.name=E,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[14]||(t[14]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 链接地址 ",-1)),e.createVNode(T,{modelValue:u.link,"onUpdate:modelValue":E=>u.link=E,placeholder:"请输入链接地址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!k(u)]])]),_:2},1024)])]),_:2},1040,["modelValue","onUpdate:modelValue","component-data"]),e.createVNode(A,{style:{"margin-top":"20px"},size:"mini",type:"primary",onClick:u=>$(d.id)},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[t[15]||(t[15]=e.createTextVNode(" 链接 ",-1))]),_:1},8,["onClick"])],512),[[e.vShow,!m(d)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])]),e.createVNode(A,{type:"primary",onClick:h,style:{"margin-top":"20px"}},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[t[18]||(t[18]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),oe=o._(ne,[["__scopeId","data-v-cec126b9"]]),de=["innerHTML"],ie={key:0,class:"grid-links__sublist"},se=["onClick"],re={key:1,class:"grid-links__subitem__link"},ce=e.defineComponent({name:"GridLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(l,{emit:v}){const c=l,w=v,f=m=>{w("handleClick",m)},y=e.computed(()=>{var m;return c.isPreview?!((m=c.modelValue)!=null&&m.onlyShowPc)||!o.i():!0}),x=()=>{var r;if(c.modelValue&&c.modelValue.data)return;const m={id:((r=c.modelValue)==null?void 0:r.id)||o.r(),type:"GridLinks",onlyShowPc:!1,data:{width:"default",bgColor:"white",list:[{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:""},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]}]}};w("update:modelValue",m)},s=e.ref(!1),p=e.ref(!1),V=e.computed(()=>{var h,C;const m=(C=(h=c.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!m||m==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[m]||"container-content"}),b=()=>{w("handleDelete",c.modelValue.id)},_=()=>{w("handleCopy",c.modelValue)},B=m=>{w("handlePaste",m)};return x(),(m,r)=>{var h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gridLinks_wrap",onMouseenter:r[2]||(r[2]=k=>s.value=!0),onMouseleave:r[3]||(r[3]=k=>s.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(V.value)},[e.createElementVNode("div",{class:"grid-links__row",style:e.normalizeStyle({"--grid-columns-mobile":m.mobileCol,"--grid-columns-desktop":m.desktopCol})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=(h=l.modelValue)==null?void 0:h.data)==null?void 0:C.list,(k,$)=>(e.openBlock(),e.createElementBlock("div",{class:"grid-links__item",key:`${k.title}-${$}`},[e.createElementVNode("h6",{class:"grid-links__item__title",innerHTML:k.title},null,8,de),k.links?(e.openBlock(),e.createElementBlock("ul",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.links,(N,S)=>(e.openBlock(),e.createElementBlock("li",{key:`${N.name}-${S}`,class:"grid-links__subitem"},[N.link?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:L=>f(N.link),class:"link_text"},[e.createTextVNode(e.toDisplayString(N.name)+" ",1),r[5]||(r[5]=e.createElementVNode("span",{class:"link_text__underline"},null,-1))],8,se)):(e.openBlock(),e.createElementBlock("div",re,e.toDisplayString(N.name),1))]))),128))])):e.createCommentVNode("",!0)]))),128))],4)],2),l.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(o.O,{key:0,show:s.value,"onUpdate:show":r[0]||(r[0]=k=>s.value=k),onHandleEdit:r[1]||(r[1]=k=>p.value=!0),onHandleDelete:b,onHandleCopy:_,onHandlePaste:B},null,8,["show"]))],32)):e.createCommentVNode("",!0),l.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe,{key:1,show:p.value,"onUpdate:show":r[4]||(r[4]=k=>p.value=k),data:l.modelValue},null,8,["show","data"]))],64)}}}),me=o._(ce,[["__scopeId","data-v-ed90ae1e"]]);exports.default=me;
1
+ "use strict";var M=Object.create;var O=Object.defineProperty;var F=Object.getOwnPropertyDescriptor;var j=Object.getOwnPropertyNames;var q=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var G=(l,v,c,w)=>{if(v&&typeof v=="object"||typeof v=="function")for(let f of j(v))!z.call(l,f)&&f!==c&&O(l,f,{get:()=>v[f],enumerable:!(w=F(v,f))||w.enumerable});return l};var J=(l,v,c)=>(c=l!=null?M(q(l)):{},G(v||!l||!l.__esModule?O(c,"default",{value:l,enumerable:!0}):c,l));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-DKFNhqPK.js"),K={class:"seting-box"},Q={class:"setting-header flex items-center"},R={key:0},W={class:"setting-header items-center"},X={class:"draggable_box"},Y={class:"drag_top_box"},Z=["onClick"],ee={key:0},te={class:"draggable_link_box"},le={class:"drag_link_top_box"},ae=["onClick"],ne=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(l,{emit:v}){const c=e.defineAsyncComponent(()=>import("vuedraggable")),w=e.computed(()=>({animation:200,group:"gridLinks",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),f=e.computed(()=>({animation:200,group:"gridLinkItems",disabled:!1,ghostClass:"ghost",handle:".drag-handle, .icon_drag",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),y=e.ref(!1),x=e.ref(!1),s=l,p=e.ref(new Set),V=e.ref(new Set),b=()=>{var a,t;(t=(a=s.data)==null?void 0:a.data)!=null&&t.list&&Array.isArray(s.data.data.list)&&(p.value.clear(),V.value.clear(),s.data.data.list.forEach(n=>{n.id&&p.value.add(n.id),n.links&&Array.isArray(n.links)&&n.links.length>0&&n.links.forEach(i=>{i.id&&V.value.add(i.id)})}))},_=e.ref(!1);e.watch(()=>s.show,a=>{a&&!_.value?(_.value=!0,e.nextTick(()=>{b()})):a||(_.value=!1)},{immediate:!0});const B=a=>{var t,n;p.value.has(a.id)?(p.value.clear(),(n=(t=s.data)==null?void 0:t.data)!=null&&n.list&&s.data.data.list.forEach(i=>{i.id!==a.id&&p.value.add(i.id)})):p.value.add(a.id)},m=a=>p.value.has(a.id),r=a=>{s.data.data.list=s.data.data.list.filter(t=>t.id!==a)},h=()=>{var n,i;const a=s.data.data,t=o.r();a.list.push({id:t,title:"这里是标题",links:[]}),p.value.clear(),(i=(n=s.data)==null?void 0:n.data)!=null&&i.list&&s.data.data.list.forEach(g=>{g.id!==t&&p.value.add(g.id)}),e.nextTick(()=>{if(typeof document<"u"){const g=document.querySelector(".arco-drawer-body");g&&(g.scrollTop=g.scrollHeight)}})},C=a=>{V.value.has(a.id)?V.value.delete(a.id):V.value.add(a.id)},k=a=>V.value.has(a.id),$=a=>{const t=s.data.data.list.find(n=>n.id===a);if(t){const n=o.r();t.links.push({id:n,name:"这里是名称",link:""}),t.links&&Array.isArray(t.links)&&t.links.forEach(i=>{i.id!==n?V.value.add(i.id):V.value.delete(i.id)})}},N=(a,t)=>{const n=s.data.data.list.find(i=>i.id===a);n&&n.links&&(n.links=n.links.filter(i=>i.id!==t))},S=v,L=()=>{S("update:show",!1)};return(a,t)=>{const n=e.resolveComponent("a-switch"),i=e.resolveComponent("a-option"),g=e.resolveComponent("a-select"),P=e.resolveComponent("icon-drag-dot"),D=e.resolveComponent("icon-drag-arrow"),U=e.resolveComponent("icon-delete"),T=e.resolveComponent("a-input"),I=e.resolveComponent("icon-plus"),A=e.resolveComponent("a-button"),H=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(H,{width:500,visible:l.show,footer:!1,onCancel:L,unmountOnClose:""},{title:e.withCtx(()=>{var d;return[e.createTextVNode(e.toDisplayString((d=l.data)==null?void 0:d.type)+"组件编辑 ",1)]}),default:e.withCtx(()=>[e.createElementVNode("div",K,[e.createElementVNode("div",Q,[t[7]||(t[7]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(n,{modelValue:l.data.onlyShowPc,"onUpdate:modelValue":t[0]||(t[0]=d=>l.data.onlyShowPc=d)},null,8,["modelValue"])]),t[19]||(t[19]=e.createElementVNode("p",{class:"item-title"},"组件宽度",-1)),e.createVNode(g,{modelValue:l.data.data.width,"onUpdate:modelValue":t[1]||(t[1]=d=>l.data.data.width=d),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(i,{value:"default"},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(i,{value:"small"},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(i,{value:"middle"},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(i,{value:"max"},{default:e.withCtx(()=>[...t[11]||(t[11]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"]),t[20]||(t[20]=e.createElementVNode("div",{class:"part_title",style:{"margin-top":"20px"}},"链接列表",-1)),l.data.data.list.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",R,"暂无数据")),e.createElementVNode("div",W,[e.createVNode(e.unref(c),e.mergeProps({modelValue:l.data.data.list,"onUpdate:modelValue":t[4]||(t[4]=d=>l.data.data.list=d),"component-data":{tag:"div",type:"transition-group",name:y.value?null:"flip-list"}},w.value,{disabled:!1,onStart:t[5]||(t[5]=d=>y.value=!0),onEnd:t[6]||(t[6]=d=>y.value=!1),"item-key":"id"}),{item:e.withCtx(({element:d})=>[e.createElementVNode("div",X,[e.createElementVNode("div",Y,[e.createElementVNode("div",{class:"drag-handle",onClick:u=>B(d)},[e.createVNode(P,{style:{"margin-right":"10px"}}),e.createTextVNode(e.toDisplayString(d.title),1)],8,Z),e.createElementVNode("div",null,[e.createVNode(D,{class:"icon_drag"}),e.createVNode(U,{class:"btn-delete",onClick:e.withModifiers(u=>r(d.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[t[16]||(t[16]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"标题",-1)),e.createVNode(T,{modelValue:d.title,"onUpdate:modelValue":u=>d.title=u,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[17]||(t[17]=e.createElementVNode("p",{class:"item-title",style:{"margin-top":"20px"}},"链接",-1)),d.links.length?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ee,"暂无数据")),e.createVNode(e.unref(c),e.mergeProps({modelValue:d.links,"onUpdate:modelValue":u=>d.links=u,"component-data":{tag:"div",type:"transition-group",name:x.value?null:"flip-list"}},f.value,{disabled:!1,onStart:t[2]||(t[2]=u=>x.value=!0),onEnd:t[3]||(t[3]=u=>x.value=!1),"item-key":"id"}),{item:e.withCtx(({element:u})=>[e.createElementVNode("div",te,[e.createElementVNode("div",le,[e.createElementVNode("div",{class:"drag-handle",onClick:E=>C(u)},[e.createVNode(P,{style:{"margin-right":"10px"}}),t[12]||(t[12]=e.createTextVNode("链接 ",-1))],8,ae),e.createElementVNode("div",null,[e.createVNode(D,{class:"icon_drag"}),e.createVNode(U,{class:"btn-delete",onClick:e.withModifiers(E=>N(d.id,u.id),["stop"])},null,8,["onClick"])])]),e.createVNode(e.Transition,{name:"collapse"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",null,[t[13]||(t[13]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 名称 ",-1)),e.createVNode(T,{modelValue:u.name,"onUpdate:modelValue":E=>u.name=E,placeholder:"请输入名称","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[14]||(t[14]=e.createElementVNode("p",{class:"link-title",style:{"margin-top":"20px"}}," 链接地址 ",-1)),e.createVNode(T,{modelValue:u.link,"onUpdate:modelValue":E=>u.link=E,placeholder:"请输入链接地址","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"])],512),[[e.vShow,!k(u)]])]),_:2},1024)])]),_:2},1040,["modelValue","onUpdate:modelValue","component-data"]),e.createVNode(A,{style:{"margin-top":"20px"},size:"mini",type:"primary",onClick:u=>$(d.id)},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[t[15]||(t[15]=e.createTextVNode(" 链接 ",-1))]),_:1},8,["onClick"])],512),[[e.vShow,!m(d)]])]),_:2},1024)])]),_:1},16,["modelValue","component-data"])]),e.createVNode(A,{type:"primary",onClick:h,style:{"margin-top":"20px"}},{icon:e.withCtx(()=>[e.createVNode(I)]),default:e.withCtx(()=>[t[18]||(t[18]=e.createTextVNode(" 新增 ",-1))]),_:1})])]),_:1},8,["visible"])}}}),oe=o._(ne,[["__scopeId","data-v-cec126b9"]]),de=["innerHTML"],ie={key:0,class:"grid-links__sublist"},se=["onClick"],re={key:1,class:"grid-links__subitem__link"},ce=e.defineComponent({name:"GridLinks",__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste","handleClick"],setup(l,{emit:v}){const c=l,w=v,f=m=>{w("handleClick",m)},y=e.computed(()=>{var m;return c.isPreview?!((m=c.modelValue)!=null&&m.onlyShowPc)||!o.i():!0}),x=()=>{var r;if(c.modelValue&&c.modelValue.data)return;const m={id:((r=c.modelValue)==null?void 0:r.id)||o.r(),type:"GridLinks",onlyShowPc:!1,data:{width:"default",bgColor:"white",list:[{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:""},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]},{id:o.r(),title:"这里是标题",links:[{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"},{id:o.r(),name:"这里是名称",link:"https://www.baidu.com"}]}]}};w("update:modelValue",m)},s=e.ref(!1),p=e.ref(!1),V=e.computed(()=>{var h,C;const m=(C=(h=c.modelValue)==null?void 0:h.data)==null?void 0:C.width;return!m||m==="default"?"container-content":{small:"container-content-small",middle:"container-content-middle",max:"container-content-max"}[m]||"container-content"}),b=()=>{w("handleDelete",c.modelValue.id)},_=()=>{w("handleCopy",c.modelValue)},B=m=>{w("handlePaste",m)};return x(),(m,r)=>{var h,C;return e.openBlock(),e.createElementBlock(e.Fragment,null,[y.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"gridLinks_wrap",onMouseenter:r[2]||(r[2]=k=>s.value=!0),onMouseleave:r[3]||(r[3]=k=>s.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(V.value)},[e.createElementVNode("div",{class:"grid-links__row",style:e.normalizeStyle({"--grid-columns-mobile":m.mobileCol,"--grid-columns-desktop":m.desktopCol})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((C=(h=l.modelValue)==null?void 0:h.data)==null?void 0:C.list,(k,$)=>(e.openBlock(),e.createElementBlock("div",{class:"grid-links__item",key:`${k.title}-${$}`},[e.createElementVNode("h6",{class:"grid-links__item__title",innerHTML:k.title},null,8,de),k.links?(e.openBlock(),e.createElementBlock("ul",ie,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.links,(N,S)=>(e.openBlock(),e.createElementBlock("li",{key:`${N.name}-${S}`,class:"grid-links__subitem"},[N.link?(e.openBlock(),e.createElementBlock("div",{key:0,onClick:L=>f(N.link),class:"link_text"},[e.createTextVNode(e.toDisplayString(N.name)+" ",1),r[5]||(r[5]=e.createElementVNode("span",{class:"link_text__underline"},null,-1))],8,se)):(e.openBlock(),e.createElementBlock("div",re,e.toDisplayString(N.name),1))]))),128))])):e.createCommentVNode("",!0)]))),128))],4)],2),l.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(o.O,{key:0,show:s.value,"onUpdate:show":r[0]||(r[0]=k=>s.value=k),onHandleEdit:r[1]||(r[1]=k=>p.value=!0),onHandleDelete:b,onHandleCopy:_,onHandlePaste:B},null,8,["show"]))],32)):e.createCommentVNode("",!0),l.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(oe,{key:1,show:p.value,"onUpdate:show":r[4]||(r[4]=k=>p.value=k),data:l.modelValue},null,8,["show","data"]))],64)}}}),me=o._(ce,[["__scopeId","data-v-ed90ae1e"]]);exports.default=me;
@@ -1,9 +1,9 @@
1
- import { defineComponent as A, ref as w, resolveComponent as g, createBlock as f, openBlock as i, withCtx as k, createElementVNode as a, createVNode as u, createElementBlock as p, Fragment as D, renderList as N, createTextVNode as B, toDisplayString as H, normalizeStyle as E, computed as d, createCommentVNode as $, normalizeClass as U } from "vue";
2
- import { P as Y, _ as O, i as j, a as M, O as R, r as F } from "./index-CPFXI7lC.mjs";
3
- const J = { class: "setting-content" }, L = { class: "setting-header flex items-center" }, T = { class: "setting-header flex items-center" }, W = { class: "setting-header flex items-center" }, q = { class: "setting-header flex items-center" }, G = { class: "setting-header flex items-center" }, K = { class: "setting-header flex items-center" }, Q = { class: "preview-container" }, X = ["src"], Z = {
1
+ import { defineComponent as Y, ref as k, resolveComponent as g, createBlock as f, openBlock as i, withCtx as w, createElementVNode as a, createVNode as u, createElementBlock as p, Fragment as N, renderList as O, createTextVNode as B, toDisplayString as H, normalizeStyle as E, computed as d, createCommentVNode as $, normalizeClass as U } from "vue";
2
+ import { P as j, _ as A, i as M, a as R, O as T, r as D } from "./index-ByHLUvb4.mjs";
3
+ const F = { class: "setting-content" }, J = { class: "setting-header flex items-center" }, L = { class: "setting-header flex items-center" }, W = { class: "setting-header flex items-center" }, q = { class: "setting-header flex items-center" }, G = { class: "setting-header flex items-center" }, K = { class: "setting-header flex items-center" }, Q = { class: "preview-container" }, X = ["src"], Z = {
4
4
  key: 1,
5
5
  class: "no-preview"
6
- }, _ = { class: "setting-body" }, ee = { class: "setting-item" }, te = { class: "components-content" }, ae = /* @__PURE__ */ A({
6
+ }, _ = { class: "setting-body" }, ee = { class: "setting-item" }, te = { class: "components-content" }, ae = /* @__PURE__ */ Y({
7
7
  __name: "setting",
8
8
  props: {
9
9
  show: {
@@ -18,36 +18,36 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
18
18
  },
19
19
  emits: ["update:show"],
20
20
  setup(o, { emit: h }) {
21
- const n = o, v = w([
21
+ const n = o, v = k([
22
22
  {
23
23
  id: "preset-1",
24
24
  name: "YCCECE Background 1",
25
- image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",
25
+ image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",
26
26
  size: "cover",
27
27
  position: "center center"
28
28
  },
29
29
  {
30
30
  id: "preset-2",
31
31
  name: "YCCECE Background 2",
32
- image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",
33
- size: "contain",
34
- position: "left top"
32
+ image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-02.svg",
33
+ size: "",
34
+ position: ""
35
35
  },
36
36
  {
37
37
  id: "preset-3",
38
38
  name: "YCCECE Background 3",
39
39
  image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",
40
40
  size: "cover",
41
- position: "center center"
41
+ position: ""
42
42
  },
43
43
  {
44
44
  id: "preset-4",
45
45
  name: "YCCECE Background 4",
46
- image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",
47
- size: "100% auto",
48
- position: "right bottom"
46
+ image: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",
47
+ size: "cover",
48
+ position: ""
49
49
  }
50
- ]), m = w(), c = v.value.find((r) => r.image === n.data.backgroundImage);
50
+ ]), m = k(), c = v.value.find((r) => r.image === n.data.backgroundImage);
51
51
  m.value = c ? c.id : "";
52
52
  const b = () => {
53
53
  const r = v.value.find((t) => t.id === m.value);
@@ -64,31 +64,31 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
64
64
  onCancel: C,
65
65
  unmountOnClose: ""
66
66
  }, {
67
- title: k(() => [
67
+ title: w(() => [
68
68
  B(H(o.data.type) + "组件编辑 ", 1)
69
69
  ]),
70
- default: k(() => [
71
- a("div", J, [
72
- a("div", L, [
70
+ default: w(() => [
71
+ a("div", F, [
72
+ a("div", J, [
73
73
  t[6] || (t[6] = a("span", { class: "header-title" }, "仅显示PC端", -1)),
74
74
  u(P, {
75
75
  modelValue: o.data.onlyShowPc,
76
76
  "onUpdate:modelValue": t[0] || (t[0] = (e) => o.data.onlyShowPc = e)
77
77
  }, null, 8, ["modelValue"])
78
78
  ]),
79
- a("div", T, [
79
+ a("div", L, [
80
80
  t[8] || (t[8] = a("span", { class: "header-title" }, "Background Preset", -1)),
81
81
  u(S, {
82
82
  modelValue: m.value,
83
83
  "onUpdate:modelValue": t[1] || (t[1] = (e) => m.value = e),
84
84
  style: { width: "300px", "margin-right": "8px" }
85
85
  }, {
86
- default: k(() => [
87
- (i(!0), p(D, null, N(v.value, (e) => (i(), f(x, {
86
+ default: w(() => [
87
+ (i(!0), p(N, null, O(v.value, (e) => (i(), f(x, {
88
88
  value: e.id,
89
89
  key: e.id
90
90
  }, {
91
- default: k(() => [
91
+ default: w(() => [
92
92
  B(H(e.name), 1)
93
93
  ]),
94
94
  _: 2
@@ -100,7 +100,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
100
100
  type: "primary",
101
101
  onClick: b
102
102
  }, {
103
- default: k(() => [...t[7] || (t[7] = [
103
+ default: w(() => [...t[7] || (t[7] = [
104
104
  B("Apply", -1)
105
105
  ])]),
106
106
  _: 1
@@ -111,6 +111,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
111
111
  u(y, {
112
112
  modelValue: o.data.backgroundImage,
113
113
  "onUpdate:modelValue": t[2] || (t[2] = (e) => o.data.backgroundImage = e),
114
+ disabled: !0,
114
115
  placeholder: "图片路径",
115
116
  style: { width: "300px" }
116
117
  }, null, 8, ["modelValue"])
@@ -120,6 +121,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
120
121
  u(y, {
121
122
  modelValue: o.data.backgroundSize,
122
123
  "onUpdate:modelValue": t[3] || (t[3] = (e) => o.data.backgroundSize = e),
124
+ disabled: !0,
123
125
  placeholder: "尺寸",
124
126
  style: { width: "300px" }
125
127
  }, null, 8, ["modelValue"])
@@ -129,6 +131,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
129
131
  u(y, {
130
132
  modelValue: o.data.backgroundPosition,
131
133
  "onUpdate:modelValue": t[4] || (t[4] = (e) => o.data.backgroundPosition = e),
134
+ disabled: !0,
132
135
  placeholder: "位置",
133
136
  style: { width: "300px" }
134
137
  }, null, 8, ["modelValue"])
@@ -157,7 +160,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
157
160
  ], -1)),
158
161
  a("div", ee, [
159
162
  a("div", te, [
160
- u(Y, {
163
+ u(j, {
161
164
  data: o.data.data,
162
165
  onUpdate: t[5] || (t[5] = (e) => o.data.data = e)
163
166
  }, null, 8, ["data"])
@@ -170,7 +173,7 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
170
173
  }, 8, ["visible"]);
171
174
  };
172
175
  }
173
- }), oe = /* @__PURE__ */ O(ae, [["__scopeId", "data-v-bb5b5b8c"]]), ne = { class: "component-wrapper" }, le = {
176
+ }), oe = /* @__PURE__ */ A(ae, [["__scopeId", "data-v-f43efd7b"]]), ne = { class: "component-wrapper" }, le = {
174
177
  __name: "index",
175
178
  props: {
176
179
  modelValue: {
@@ -189,24 +192,36 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
189
192
  const n = o, v = h, m = d(() => {
190
193
  var e, l;
191
194
  return !((e = n.modelValue) != null && e.data) || !Array.isArray(n.modelValue.data) ? [] : (l = n.modelValue) == null ? void 0 : l.data;
192
- }), c = w(!1), b = w(!1), V = () => {
193
- var l;
195
+ }), c = k(!1), b = k(!1), V = () => {
196
+ var l, s;
194
197
  if (n.modelValue && n.modelValue.data)
195
198
  return;
196
199
  const e = {
197
- id: ((l = n.modelValue) == null ? void 0 : l.id) || F(),
200
+ id: ((l = n.modelValue) == null ? void 0 : l.id) || D(),
198
201
  //componentKey
199
202
  type: "BackgroundWrapper",
200
203
  onlyShowPc: !1,
201
- backgroundImage: "",
202
- backgroundSize: "",
203
- backgroundPosition: "",
204
- data: []
204
+ backgroundImage: "https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-01.svg",
205
+ backgroundSize: "cover",
206
+ backgroundPosition: "center center",
207
+ data: [
208
+ {
209
+ id: ((s = n.modelValue) == null ? void 0 : s.id) || D(),
210
+ type: "CustomText",
211
+ onlyShowPc: !1,
212
+ data: {
213
+ width: 1920,
214
+ backgroundColor: "#ffffff",
215
+ title: "这是标题",
216
+ description: "这是描述"
217
+ }
218
+ }
219
+ ]
205
220
  };
206
221
  v("update:modelValue", e);
207
222
  }, C = d(() => {
208
223
  var e;
209
- return n.isPreview ? !((e = n.modelValue) != null && e.onlyShowPc) || !j() : !0;
224
+ return n.isPreview ? !((e = n.modelValue) != null && e.onlyShowPc) || !M() : !0;
210
225
  }), r = d(() => {
211
226
  var e;
212
227
  return ((e = n.modelValue) == null ? void 0 : e.classes) ?? null;
@@ -235,12 +250,13 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
235
250
  return V(), (e, l) => C.value ? (i(), p("div", {
236
251
  key: 0,
237
252
  class: U(["background-wrapper", r.value]),
238
- style: E(t.value),
239
- onMouseover: l[3] || (l[3] = (s) => c.value = !0),
240
- onMouseout: l[4] || (l[4] = (s) => c.value = !1)
253
+ style: E(t.value)
241
254
  }, [
242
255
  a("div", {
243
- class: U(P.value)
256
+ class: U(P.value),
257
+ style: { position: "relative" },
258
+ onMouseover: l[2] || (l[2] = (s) => c.value = !0),
259
+ onMouseout: l[3] || (l[3] = (s) => c.value = !1)
244
260
  }, [
245
261
  a("div", {
246
262
  class: "background-wrapper__bg",
@@ -252,38 +268,37 @@ const J = { class: "setting-content" }, L = { class: "setting-header flex items-
252
268
  "background-repeat": `${I.value}`
253
269
  })
254
270
  }, [
255
- (i(!0), p(D, null, N(m.value, (s, se) => (i(), p("div", {
271
+ (i(!0), p(N, null, O(m.value, (s, se) => (i(), p("div", {
256
272
  key: s.id,
257
273
  class: "page-item"
258
274
  }, [
259
275
  a("div", ne, [
260
- u(M, {
276
+ u(R, {
261
277
  type: s.type,
262
278
  "props-data": { modelValue: s }
263
279
  }, null, 8, ["type", "props-data"])
264
280
  ])
265
281
  ]))), 128))
266
282
  ], 4),
267
- o.isPreview ? $("", !0) : (i(), f(R, {
283
+ o.isPreview ? $("", !0) : (i(), f(T, {
268
284
  key: 0,
269
285
  show: c.value,
270
286
  "onUpdate:show": l[0] || (l[0] = (s) => c.value = s),
271
287
  onHandleEdit: l[1] || (l[1] = (s) => b.value = !0),
272
288
  onHandleDelete: e.handleDelete,
273
289
  onHandleCopy: e.handleCopy,
274
- onHandlePaste: e.handlePaste,
275
- style: { top: "-20px" }
290
+ onHandlePaste: e.handlePaste
276
291
  }, null, 8, ["show", "onHandleDelete", "onHandleCopy", "onHandlePaste"]))
277
- ], 2),
292
+ ], 34),
278
293
  o.isPreview ? $("", !0) : (i(), f(oe, {
279
294
  key: 0,
280
295
  show: b.value,
281
- "onUpdate:show": l[2] || (l[2] = (s) => b.value = s),
296
+ "onUpdate:show": l[4] || (l[4] = (s) => b.value = s),
282
297
  data: o.modelValue
283
298
  }, null, 8, ["show", "data"]))
284
- ], 38)) : $("", !0);
299
+ ], 6)) : $("", !0);
285
300
  }
286
- }, re = /* @__PURE__ */ O(le, [["__scopeId", "data-v-b9fd2a2e"]]);
301
+ }, re = /* @__PURE__ */ A(le, [["__scopeId", "data-v-e3f5b699"]]);
287
302
  export {
288
303
  re as default
289
304
  };