officialblock 2.1.4 → 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.
- package/dist/{index-BV0x6vvQ.mjs → index-BLL7s823.mjs} +1 -1
- package/dist/{index-DgzgL-lS.js → index-Bf8pSKt6.js} +1 -1
- package/dist/{index-Cy3iTANw.mjs → index-Bq7PruNu.mjs} +1 -1
- package/dist/{index-mXDfSi-N.mjs → index-ByHLUvb4.mjs} +4569 -4575
- package/dist/{index-DRljdCDQ.js → index-Byrk1Mlt.js} +1 -1
- package/dist/{index-uBmOSCy-.mjs → index-CYJDfNO2.mjs} +1 -1
- package/dist/{index-BKRx_iRp.js → index-CY_5stdH.js} +1 -1
- package/dist/index-CdyHd9C0.mjs +4 -0
- package/dist/{index-CHtKRsLb.js → index-ChMoNeEO.js} +1 -1
- package/dist/{index-CsgE49Db.js → index-DGvRy0FG.js} +1 -1
- package/dist/{index-B6j0X2Lr.js → index-DKFNhqPK.js} +11 -11
- package/dist/{index-DOH-93hD.mjs → index-DLh3Q6AQ.mjs} +1 -1
- package/dist/{index-DkpI5YTy.mjs → index-D_wawBrn.mjs} +1 -1
- package/dist/{index-CGSapgmv.js → index-Dag86dDG.js} +1 -1
- package/dist/{index-DhC37fx9.mjs → index-DuMXP10V.mjs} +1 -1
- package/dist/{index-Ccs5hKrE.js → index-J8LamgdJ.js} +1 -1
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +1 -1
- package/dist/official-block.umd.js +10 -10
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-nON0HtKg.mjs +0 -4
|
@@ -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-
|
|
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-B6j0X2Lr.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,5 +1,5 @@
|
|
|
1
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-
|
|
2
|
+
import { P as j, _ as A, i as M, a as R, O as T, r as D } from "./index-ByHLUvb4.mjs";
|
|
3
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"
|