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.
- package/dist/{index-B63YF03C.mjs → index-BLL7s823.mjs} +1 -1
- package/dist/{index-DGbVewT4.js → index-Bf8pSKt6.js} +1 -1
- package/dist/{index-DSpGOD0e.mjs → index-Bq7PruNu.mjs} +61 -46
- package/dist/{index-CPFXI7lC.mjs → index-ByHLUvb4.mjs} +5762 -5759
- package/dist/{index-BykzKd3s.js → index-Byrk1Mlt.js} +1 -1
- package/dist/{index-BZZpFLbf.mjs → index-CYJDfNO2.mjs} +2 -2
- package/dist/{index-BEACmL51.js → index-CY_5stdH.js} +1 -1
- package/dist/index-CdyHd9C0.mjs +4 -0
- package/dist/{index-BFCRwkCQ.js → index-ChMoNeEO.js} +1 -1
- package/dist/{index-AlzeRld6.js → index-DGvRy0FG.js} +1 -1
- package/dist/{index-0C0pBmhT.js → index-DKFNhqPK.js} +31 -31
- package/dist/{index-DKDZzpmS.mjs → index-DLh3Q6AQ.mjs} +1 -1
- package/dist/{index-Dl0NsdjZ.mjs → index-D_wawBrn.mjs} +1 -1
- package/dist/index-Dag86dDG.js +1 -0
- package/dist/{index-BUq__F-C.mjs → index-DuMXP10V.mjs} +1 -1
- package/dist/{index-BWSB4K5c.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 +31 -31
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-B-J4Tx8e.js +0 -1
- package/dist/index-DX4-RCdr.mjs +0 -4
package/package.json
CHANGED
package/dist/index-B-J4Tx8e.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./index-0C0pBmhT.js"),f={class:"setting-content"},C={class:"setting-header flex items-center"},E={class:"setting-header flex items-center"},N={class:"setting-header flex items-center"},x={class:"setting-header flex items-center"},B={class:"setting-header flex items-center"},P={class:"setting-header flex items-center"},S={class:"preview-container"},z=["src"],I={key:1,class:"no-preview"},$={class:"setting-body"},H={class:"setting-item"},U={class:"components-content"},D=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(o,{emit:g}){const n=o,u=e.ref([{id:"preset-1",name:"YCCECE Background 1",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",size:"cover",position:"center center"},{id:"preset-2",name:"YCCECE Background 2",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-04.svg",size:"contain",position:"left top"},{id:"preset-3",name:"YCCECE Background 3",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",size:"cover",position:"center center"},{id:"preset-4",name:"YCCECE Background 4",image:"https://ywies-tx.cedim.cn/images/material/ycyw-90th-bg-03.svg",size:"100% auto",position:"right bottom"}]),c=e.ref(),r=u.value.find(s=>s.image===n.data.backgroundImage);c.value=r?r.id:"";const m=()=>{const s=u.value.find(a=>a.id===c.value);s&&(n.data.backgroundImage=`${s.image}`,n.data.backgroundSize=s.size,n.data.backgroundPosition=s.position)},v=g,k=()=>{v("update:show",!1)};return(s,a)=>{const V=e.resolveComponent("a-switch"),b=e.resolveComponent("a-option"),y=e.resolveComponent("a-select"),w=e.resolveComponent("a-button"),p=e.resolveComponent("a-input"),h=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(h,{width:"60%",visible:o.show,footer:!1,onCancel:k,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(o.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",f,[e.createElementVNode("div",C,[a[6]||(a[6]=e.createElementVNode("span",{class:"header-title"},"仅显示PC端",-1)),e.createVNode(V,{modelValue:o.data.onlyShowPc,"onUpdate:modelValue":a[0]||(a[0]=t=>o.data.onlyShowPc=t)},null,8,["modelValue"])]),e.createElementVNode("div",E,[a[8]||(a[8]=e.createElementVNode("span",{class:"header-title"},"Background Preset",-1)),e.createVNode(y,{modelValue:c.value,"onUpdate:modelValue":a[1]||(a[1]=t=>c.value=t),style:{width:"300px","margin-right":"8px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,t=>(e.openBlock(),e.createBlock(b,{value:t.id,key:t.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.name),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(w,{type:"primary",onClick:m},{default:e.withCtx(()=>[...a[7]||(a[7]=[e.createTextVNode("Apply",-1)])]),_:1})]),e.createElementVNode("div",N,[a[9]||(a[9]=e.createElementVNode("span",{class:"header-title"},"Image",-1)),e.createVNode(p,{modelValue:o.data.backgroundImage,"onUpdate:modelValue":a[2]||(a[2]=t=>o.data.backgroundImage=t),placeholder:"图片路径",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",x,[a[10]||(a[10]=e.createElementVNode("span",{class:"header-title"},"Size",-1)),e.createVNode(p,{modelValue:o.data.backgroundSize,"onUpdate:modelValue":a[3]||(a[3]=t=>o.data.backgroundSize=t),placeholder:"尺寸",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",B,[a[11]||(a[11]=e.createElementVNode("span",{class:"header-title"},"Position",-1)),e.createVNode(p,{modelValue:o.data.backgroundPosition,"onUpdate:modelValue":a[4]||(a[4]=t=>o.data.backgroundPosition=t),placeholder:"位置",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",P,[a[13]||(a[13]=e.createElementVNode("span",{class:"header-title"},"Preview",-1)),e.createElementVNode("div",S,[o.data.backgroundImage?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.data.backgroundImage,style:e.normalizeStyle({"object-fit":o.data.backgroundSize||"cover","background-position":o.data.backgroundPosition||"center center",width:"100%",height:"100px",border:"1px solid #ddd"}),alt:"Background Preview"},null,12,z)):(e.openBlock(),e.createElementBlock("div",I,"No preview available")),a[12]||(a[12]=e.createElementVNode("p",{class:"preview-note"}," A light grey background has been applied for previewing and will not be reflected on website. ",-1))])]),e.createElementVNode("div",$,[a[14]||(a[14]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",H,[e.createElementVNode("div",U,[e.createVNode(i.P,{data:o.data.data,onUpdate:a[5]||(a[5]=t=>o.data.data=t)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),O=i._(D,[["__scopeId","data-v-bb5b5b8c"]]),j={class:"component-wrapper"},A={__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(o,{emit:g}){const n=o,u=g,c=e.computed(()=>{var t,l;return!((t=n.modelValue)!=null&&t.data)||!Array.isArray(n.modelValue.data)?[]:(l=n.modelValue)==null?void 0:l.data}),r=e.ref(!1),m=e.ref(!1),v=()=>{var l;if(n.modelValue&&n.modelValue.data)return;const t={id:((l=n.modelValue)==null?void 0:l.id)||i.r(),type:"BackgroundWrapper",onlyShowPc:!1,backgroundImage:"",backgroundSize:"",backgroundPosition:"",data:[]};u("update:modelValue",t)},k=e.computed(()=>{var t;return n.isPreview?!((t=n.modelValue)!=null&&t.onlyShowPc)||!i.i():!0}),s=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.classes)??null}),a=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.style)??null}),V=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.width)??null}),b=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundImage)??""}),y=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundColor)??"transparent"}),w=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundSize)??"contain"}),p=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundPosition)??"center"}),h=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundRepeat)??"no-repeat"});return v(),(t,l)=>k.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["background-wrapper",s.value]),style:e.normalizeStyle(a.value),onMouseover:l[3]||(l[3]=d=>r.value=!0),onMouseout:l[4]||(l[4]=d=>r.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(V.value)},[e.createElementVNode("div",{class:"background-wrapper__bg",style:e.normalizeStyle({"background-image":`url('${b.value}')`,"background-color":`${y.value}`,"background-size":`${w.value}`,"background-position":`${p.value}`,"background-repeat":`${h.value}`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(d,Y)=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:"page-item"},[e.createElementVNode("div",j,[e.createVNode(i.a,{type:d.type,"props-data":{modelValue:d}},null,8,["type","props-data"])])]))),128))],4),o.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(i.O,{key:0,show:r.value,"onUpdate:show":l[0]||(l[0]=d=>r.value=d),onHandleEdit:l[1]||(l[1]=d=>m.value=!0),onHandleDelete:t.handleDelete,onHandleCopy:t.handleCopy,onHandlePaste:t.handlePaste,style:{top:"-20px"}},null,8,["show","onHandleDelete","onHandleCopy","onHandlePaste"]))],2),o.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(O,{key:0,show:m.value,"onUpdate:show":l[2]||(l[2]=d=>m.value=d),data:o.modelValue},null,8,["show","data"]))],38)):e.createCommentVNode("",!0)}},T=i._(A,[["__scopeId","data-v-b9fd2a2e"]]);exports.default=T;
|
package/dist/index-DX4-RCdr.mjs
DELETED