officialblock 2.1.0 → 2.1.2
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-B3PhukvS.js → index-BX3wo2uq.js} +1 -1
- package/dist/{index-CT1rjCCp.mjs → index-Btjp_XdI.mjs} +1 -1
- package/dist/index-CClVOzrU.js +20 -0
- package/dist/index-C_3-HeV5.js +1 -0
- package/dist/index-Chue7s0-.mjs +31274 -0
- package/dist/index-CmerRdhn.mjs +4 -0
- package/dist/index-Cn6a6HhI.mjs +289 -0
- package/dist/index-Cu03Azf6.js +1 -0
- package/dist/index-DCXncMaQ.mjs +4 -0
- package/dist/index-DPl0MPya.js +1 -0
- package/dist/index-DRMApk01.js +1 -0
- package/dist/index-rYdlY3SQ.mjs +361 -0
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +106 -99
- package/dist/official-block.umd.js +5 -5
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-B1CWbJxM.mjs +0 -414
- package/dist/index-BlREL57D.js +0 -1
- package/dist/index-BmAKDKvH.mjs +0 -4
- package/dist/index-C0VvLaXk.js +0 -20
- package/dist/index-C_l0k6dm.mjs +0 -29122
- package/dist/index-CdakOmJX.js +0 -1
package/dist/index-CdakOmJX.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var H=Object.create;var _=Object.defineProperty;var J=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var z=Object.getPrototypeOf,K=Object.prototype.hasOwnProperty;var O=(a,i,p,c)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of q(i))!K.call(a,v)&&v!==p&&_(a,v,{get:()=>i[v],enumerable:!(c=J(i,v))||c.enumerable});return a};var F=(a,i,p)=>(p=a!=null?H(z(a)):{},O(i||!a||!a.__esModule?_(p,"default",{value:a,enumerable:!0}):p,a));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-C0VvLaXk.js"),A={class:"setting-content"},L={class:"setting-header flex items-center"},M={class:"setting-body"},j={class:"setting-toolbar"},R={class:"tools"},W={class:"setting-item"},Y={class:"item-header"},Q={class:"btn-group"},G={key:0,class:"drag-handle"},X={class:"components-content"},Z=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(a,{emit:i}){const p=e.defineAsyncComponent(()=>import("vuedraggable")),c=e.ref(!1),v=e.computed(()=>({animation:200,group:"gallerys",disabled:!1,ghostClass:"ghost",handle:".drag-handle",filter:".arco-input, .arco-select, .arco-checkbox",preventOnFilter:!1})),g=r=>r&&r.length>1,x=a,d=i,T=()=>{d("update:show",!1)},V=r=>{x.data.data.push({id:s.r(),type:"Video",videoSrc:"",imgSrc:"",name:"",key:"",componentsDataJson:[]})},B=r=>{x.data.data=x.data.data.filter(t=>t.id!==r)};return(r,t)=>{const w=e.resolveComponent("a-option"),f=e.resolveComponent("a-select"),h=e.resolveComponent("icon-plus"),N=e.resolveComponent("a-button"),C=e.resolveComponent("icon-drag-arrow"),$=e.resolveComponent("icon-delete"),k=e.resolveComponent("a-input"),E=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(E,{width:"60%",visible:a.show,footer:!1,onCancel:T,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",A,[e.createElementVNode("div",L,[t[11]||(t[11]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(f,{modelValue:a.data.width,"onUpdate:modelValue":t[0]||(t[0]=l=>a.data.width=l),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(w,{value:"default"},{default:e.withCtx(()=>[...t[7]||(t[7]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(w,{value:"small"},{default:e.withCtx(()=>[...t[8]||(t[8]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(w,{value:"medium"},{default:e.withCtx(()=>[...t[9]||(t[9]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(w,{value:"max"},{default:e.withCtx(()=>[...t[10]||(t[10]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",M,[e.createElementVNode("div",j,[t[14]||(t[14]=e.createElementVNode("h4",null,"List",-1)),e.createElementVNode("div",R,[e.createVNode(N,{type:"primary",onClick:t[1]||(t[1]=l=>V())},{icon:e.withCtx(()=>[e.createVNode(h)]),default:e.withCtx(()=>[t[12]||(t[12]=e.createTextVNode(" 添加 Tab ",-1))]),_:1}),e.createVNode(N,{type:"primary",onClick:t[2]||(t[2]=l=>V())},{default:e.withCtx(()=>[...t[13]||(t[13]=[e.createTextVNode("粘贴 Tab",-1)])]),_:1})])]),e.createElementVNode("div",W,[e.createVNode(e.unref(p),e.mergeProps({modelValue:a.data.data,"onUpdate:modelValue":t[4]||(t[4]=l=>a.data.data=l),"component-data":{tag:"div",type:"transition-group",name:c.value?null:"flip-list"}},v.value,{disabled:!g(a.data.data),onStart:t[5]||(t[5]=l=>c.value=!0),onEnd:t[6]||(t[6]=l=>c.value=!1),"item-key":"id"}),{item:e.withCtx(({element:l})=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["item-button draggable-item",{"sortable-disabled":!g(a.data.data)}]),key:l.id},[e.createElementVNode("div",Y,[e.createElementVNode("div",null,[e.createElementVNode("h5",null,e.toDisplayString(l.name),1),e.createElementVNode("span",null,e.toDisplayString(l.key),1)]),e.createElementVNode("div",Q,[g(a.data.data)?(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(C,{class:"drag-icon"})])):e.createCommentVNode("",!0),e.createVNode($,{class:"btn-delete",onClick:y=>B(l.id)},null,8,["onClick"]),e.createVNode(N,{size:"mini",type:"primary",onClick:t[3]||(t[3]=y=>V())},{default:e.withCtx(()=>[...t[15]||(t[15]=[e.createTextVNode("复制 Tab",-1)])]),_:1})])]),t[16]||(t[16]=e.createElementVNode("p",{class:"item-title"},"Tab名称",-1)),e.createVNode(k,{modelValue:l.name,"onUpdate:modelValue":y=>l.name=y,placeholder:"请输入标题","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[17]||(t[17]=e.createElementVNode("p",{class:"item-title"},"Key",-1)),e.createVNode(k,{modelValue:l.key,"onUpdate:modelValue":y=>l.key=y,placeholder:"请输入key","allow-clear":""},null,8,["modelValue","onUpdate:modelValue"]),t[18]||(t[18]=e.createElementVNode("p",null,"components",-1)),e.createElementVNode("div",X,[e.createVNode(s.P,{data:l.componentsDataJson,onUpdate:y=>l.componentsDataJson=y},null,8,["data","onUpdate"])])],2))]),_:1},16,["modelValue","component-data","disabled"])])])])]),_:1},8,["visible"])}}}),ee=s._(Z,[["__scopeId","data-v-f4b12dfa"]]),te={class:"tab-default__content"},oe={"data-aos":"fade-in","data-aos-duration":"1500",class:"aos-init aos-animate"},ae={class:"component-wrapper"},ne={class:"tab-timeline__mobile"},le={__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(a,{emit:i}){const{proxy:p}=e.getCurrentInstance(),{$_vsWidth:c,$_vsScrollY:v,$vsScreenAddListener:g,$vsScreenDestroyListener:x}=p,d=a,T=i,V=s.u(),B=s.a(),r=e.ref(null),t=e.ref(null),w=e.computed(()=>{var o;return(o=d.modelValue)==null?void 0:o.data}),f=e.ref(0),h=e.ref(!1),N=e.ref(!1),C=e.ref(!1),$=e.computed(()=>{var o;return((o=d.modelValue)==null?void 0:o.classes)??null}),k=e.computed(()=>{var o;return((o=d.modelValue)==null?void 0:o.style)??null});e.computed(()=>{var o;return(o=d.modelValue)==null?void 0:o.width});const E=e.computed(()=>{var o;return(o=d.modelValue)==null?void 0:o.id}),l=e.computed(()=>{var o;return(o=d.modelValue)!=null&&o.bgColor?d.modelValue.bgColor:c.value>=768?"bg-neutral-lightest":null}),y=e.computed(()=>{var n;if(!((n=d.modelValue)!=null&&n.data)||!Array.isArray(d.modelValue.data))return[];const o=d.modelValue.data[f.value];return o?o.componentsDataJson||[]:[]}),S=()=>{var n;if(d.modelValue&&d.modelValue.data){setTimeout(()=>{var u;selectTab((u=d.modelValue)==null?void 0:u.data[0].id)},0);return}const o={id:((n=d.modelValue)==null?void 0:n.id)||s.r(),type:"TabTimeLine",containerWidth:"",bgColor:"",classes:"custom-class another-class",style:{},width:"container-content-middle",data:[{id:s.r(),key:"11111111",name:"tab1",componentsDataJson:[]},{id:s.r(),key:"2222",name:"tab2",componentsDataJson:[]},{id:s.r(),key:"33333",name:"tab3",componentsDataJson:[]}]};T("update:modelValue",o),f.value=o.data[0].id},P=()=>{if(!t.value||!r.value)return;const o=t.value.getBoundingClientRect().top,n=r.value.getBoundingClientRect().top,u=r.value.getBoundingClientRect().bottom,b=+window.getComputedStyle(document.body).getPropertyValue("--header-height-calc").split("px")[0];if(n>b||u<b){h.value=!1;return}o<=b&&(h.value=!0)},I=()=>{if(c.value<=768)return;const o=r.value,u=s.$(o).y-150;window.scroll({top:u,left:0,behavior:"smooth"})},D=()=>{var u;const o=V.query.tab_timeline,n=(u=w.value)==null?void 0:u.findIndex(b=>b.key==o);n>-1?f.value=n:f.value=0},U=o=>{debugger;f.value=o,B.push({path:V.path,query:{...V.query,tab_timeline:w.value[o].key},hash:V.hash})};return e.watch(()=>v.value,()=>{console.log("==========$_vsScrollY.value"),P()}),e.watch(f,()=>{I()}),e.watch(()=>V.query.tab_line,()=>{D()}),S(),e.onMounted(()=>{D()}),(o,n)=>{var u,b;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["tab-timeline",$.value]),ref_key:"wrapper",ref:r,style:e.normalizeStyle(k.value),onMouseover:n[3]||(n[3]=m=>C.value=!0),onMouseout:n[4]||(n[4]=m=>C.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__wrapper",[(u=a.modelValue)!=null&&u.width?`container-content-${(b=a.modelValue)==null?void 0:b.width}`:"container-content"]])},[e.withDirectives(e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__desktop",[l.value]])},[e.createElementVNode("div",{class:e.normalizeClass(["tab-timeline__hold",{"is-fixed":h.value}])},[e.createElementVNode("div",{class:"tab-timeline__nav",ref_key:"tab",ref:t},[e.createVNode(s.T,{list:w.value,isFixed:h.value,currentIdx:f.value,onUpdateIdx:U,componentKey:E.value},null,8,["list","isFixed","currentIdx","componentKey"])],512)],2),e.createElementVNode("div",te,[e.createElementVNode("div",oe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,(m,se)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:"page-item"},[e.createElementVNode("div",ae,[e.createVNode(s.b,{type:m.type,"props-data":{modelValue:m}},null,8,["type","props-data"])])]))),128))])])],2),[[e.vShow,e.unref(c)>=768]]),e.withDirectives(e.createElementVNode("div",ne,[e.createVNode(s.c,{modelValue:a.modelValue,componentKey:E.value},null,8,["modelValue","componentKey"])],512),[[e.vShow,e.unref(c)<768]]),a.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s.O,{key:0,show:C.value,"onUpdate:show":n[0]||(n[0]=m=>C.value=m),onHandleEdit:n[1]||(n[1]=m=>N.value=!0),onHandleDelete:o.handleDelete,onHandleCopy:o.handleCopy,onHandlePaste:o.handlePaste},null,8,["show","onHandleDelete","onHandleCopy","onHandlePaste"]))],2),a.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ee,{key:0,show:N.value,"onUpdate:show":n[2]||(n[2]=m=>N.value=m),data:a.modelValue},null,8,["show","data"]))],38)}}},de=s._(le,[["__scopeId","data-v-1d36ae44"]]);exports.default=de;
|