officialblock 2.0.8 → 2.1.1
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-BI82VZ91.js +1 -0
- package/dist/index-B_6DwUvb.js +1 -0
- package/dist/index-B__52Adx.mjs +4 -0
- package/dist/index-BjgdPzqR.mjs +349 -0
- package/dist/index-BsZbx0rW.js +1 -0
- package/dist/index-CEHf6M6x.js +1 -0
- package/dist/index-CroTuaW_.mjs +162 -0
- package/dist/index-CvCNRVPY.js +20 -0
- package/dist/index-D3X7jHwZ.mjs +278 -0
- package/dist/{index-a3Vsoanj.mjs → index-DwAYwP3K.mjs} +1 -1
- package/dist/index-DwPHbe8R.mjs +216 -0
- package/dist/index-NTd6BVQQ.js +1 -0
- package/dist/index-QpRJyZ_6.mjs +29116 -0
- package/dist/index-ahwJ0pbt.mjs +143 -0
- package/dist/{index-8RyJo9_2.js → index-esMFQfpR.js} +1 -1
- package/dist/index-qybMHiY-.js +1 -0
- package/dist/official-block.cjs.js +1 -1
- package/dist/official-block.es.js +110 -98
- package/dist/official-block.umd.js +8 -4
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/dist/index-B_2L9dK-.mjs +0 -26652
- package/dist/index-Bi2ovj6T.js +0 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),D=require("./index-CvCNRVPY.js"),T={key:0,class:"card-list__filter"},$={key:0,class:"card-list__title"},M=["id"],z=["data-aos-delay","data-aos-anchor"],F={class:"card-school"},j={class:"school__head"},K=["src","alt"],W={key:1,class:"school__img img-fit"},q=["src","alt"],A={key:2,class:"school__watermark"},H=["src","alt"],O={class:"school__body"},U={key:0,class:"school__cat-list"},G={key:1,class:"school__title"},I=["innerHTML"],J={class:"school__cta"},Q={key:0},R=["href"],X={key:1},Y=["href"],Z={key:3,class:"contact__link mt-3"},ee={key:4,class:"contact__link mt-3"},te={key:1,class:"d-flex justify-content-center mt-10"},oe={class:"btn--udrline"},le=e.defineComponent({__name:"index",props:{componentProps:{type:Object,default:()=>({})}},emits:["showLightboxVideo"],setup(B,{emit:ne}){const n=B,d=e.ref("all"),s=e.ref(4),u=e.ref(4),k=e.ref(Date.now()),p=e.ref(typeof window<"u"?window.innerWidth:1024),f=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.classes)??null}),g=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.style)??null}),E=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.width)??null}),w=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.center)??!1}),N=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.type)??"school"}),h=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.title)??null}),a=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.filters)??[]}),v=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.list)??[]}),r=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.colDesktop)??3}),m=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.colMobile)??1}),_=e.computed(()=>{var t;return((t=n.componentProps)==null?void 0:t.addShowMore)??!1}),i=e.computed(()=>d.value==="all"||Array.isArray(a.value)&&a.value.length<=0?v.value:v.value.filter(t=>{var c;return(c=t.filter)==null?void 0:c.includes(d.value)})),V=e.computed(()=>_.value?i.value.slice(0,s.value):i.value),C=e.computed(()=>_.value?p.value<=767.98&&s.value<i.value.length||_.value&&s.value<i.value.length:!1),b=t=>{d.value=t},y=t=>t.includes("http")?{tag:"a",props:{href:t,target:"_blank"}}:{tag:"router-link",props:{to:t}};return e.onMounted(()=>{p.value>=767.98?(s.value=r.value,u.value=r.value):(s.value=m.value*3,u.value=m.value*3),typeof window<"u"&&window.addEventListener("resize",()=>{p.value=window.innerWidth})}),(t,c)=>{const L=e.resolveComponent("CircleLink"),x=e.resolveComponent("BtnPrimary");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card-list",f.value]),style:e.normalizeStyle(g.value)},[a.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("div",T,[e.createVNode(D.T,{tabList:a.value,onUpdateFilter:b},null,8,["tabList"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[E.value,{"text-center":w.value}]])},[h.value?(e.openBlock(),e.createElementBlock("h4",$,e.toDisplayString(h.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${m.value}`,`row-cols-md-${r.value}`,{"small-gap":r.value>4},`cars-list-${N.value}`]]),id:`card-list-${k.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,(o,P)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:o.key,"data-aos":"fade-up","data-aos-delay":P*100,"data-aos-anchor":`#card-list-${k.value}`},[e.createElementVNode("div",F,[e.createElementVNode("div",j,[o.link?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(y(o.link).tag),e.mergeProps({key:0,ref_for:!0},y(o.link).props,{class:"school__img img-fit"}),{default:e.withCtx(()=>[e.createElementVNode("img",{src:o.image,alt:o.alt},null,8,K)]),_:2},1040)):(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("img",{src:o.image,alt:o.alt},null,8,q)])),o.watermark?(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("img",{src:o.watermark,alt:o.alt},null,8,H)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",O,[o.catList&&o.catList.length>0?(e.openBlock(),e.createElementBlock("ul",U,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.catList,l=>(e.openBlock(),e.createElementBlock("li",{key:l,class:"tx-overline text-blue"},e.toDisplayString(l),1))),128))])):e.createCommentVNode("",!0),o.title?(e.openBlock(),e.createElementBlock("h6",G,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.text?(e.openBlock(),e.createElementBlock("div",{key:2,class:"school__content",innerHTML:o.text},null,8,I)):e.createCommentVNode("",!0),e.createElementVNode("ul",J,[o.phone?(e.openBlock(),e.createElementBlock("li",Q,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`tel:${o.phone}`},e.toDisplayString(o.phone),9,R)])):e.createCommentVNode("",!0),o.email?(e.openBlock(),e.createElementBlock("li",X,[e.createElementVNode("a",{class:"school__cta__item link-body-p link--udrline",href:`mailto:${o.email}`},e.toDisplayString(o.email),9,Y)])):e.createCommentVNode("",!0)]),o.link?(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(L,{url:o.link,text:o.linkText||t.$t("btn.visit_school_website"),linkType:o.link.includes("http")?"outer-link":"nuxt-link"},null,8,["url","text","linkType"])])):e.createCommentVNode("",!0),o.buttons?(e.openBlock(),e.createElementBlock("div",ee,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.buttons,(l,S)=>(e.openBlock(),e.createBlock(x,{key:S,text:l.text,url:l.url,buttonType:l.buttonType,light:l.light,white:l.white,blue:l.blue,size:l.size,action:l.action,actionKey:l.actionKey},null,8,["text","url","buttonType","light","white","blue","size","action","actionKey"]))),128))])):e.createCommentVNode("",!0)])])],8,z))),128))],10,M),C.value?(e.openBlock(),e.createElementBlock("div",te,[e.createElementVNode("button",{type:"button",class:"btn btn__load-more",onClick:c[0]||(c[0]=o=>s.value+=u.value)},[e.createElementVNode("div",oe,e.toDisplayString(t.$t("btn.load_more")),1),c[1]||(c[1]=e.createElementVNode("span",{class:"i i-load-more"},null,-1))])])):e.createCommentVNode("",!0)],2)],6)}}});exports.default=le;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _=Object.create;var S=Object.defineProperty;var P=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var F=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var D=(t,a,l,u)=>{if(a&&typeof a=="object"||typeof a=="function")for(let i of M(a))!z.call(t,i)&&i!==l&&S(t,i,{get:()=>a[i],enumerable:!(u=P(a,i))||u.enumerable});return t};var L=(t,a,l)=>(l=t!=null?_(F(t)):{},D(a||!t||!t.__esModule?S(l,"default",{value:t,enumerable:!0}):l,t));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),g=require("./index-CvCNRVPY.js");var E=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function U(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var I="Expected a function",$=NaN,A="[object Symbol]",W=/^\s+|\s+$/g,R=/^[-+]0x[0-9a-f]+$/i,q=/^0b[01]+$/i,G=/^0o[0-7]+$/i,J=parseInt,X=typeof E=="object"&&E&&E.Object===Object&&E,K=typeof self=="object"&&self&&self.Object===Object&&self,Q=X||K||Function("return this")(),Y=Object.prototype,Z=Y.toString,ee=Math.max,te=Math.min,j=function(){return Q.Date.now()};function ne(t,a,l){var u,i,n,f,r,c,v=0,p=!1,y=!1,b=!0;if(typeof t!="function")throw new TypeError(I);a=H(a)||0,T(l)&&(p=!!l.leading,y="maxWait"in l,n=y?ee(H(l.maxWait)||0,a):n,b="trailing"in l?!!l.trailing:b);function N(d){var V=u,h=i;return u=i=void 0,v=d,f=t.apply(h,V),f}function k(d){return v=d,r=setTimeout(o,a),p?N(d):f}function O(d){var V=d-c,h=d-v,B=a-V;return y?te(B,n-h):B}function w(d){var V=d-c,h=d-v;return c===void 0||V>=a||V<0||y&&h>=n}function o(){var d=j();if(w(d))return s(d);r=setTimeout(o,O(d))}function s(d){return r=void 0,b&&u?N(d):(u=i=void 0,f)}function C(){r!==void 0&&clearTimeout(r),v=0,u=c=i=r=void 0}function x(){return r===void 0?f:s(j())}function m(){var d=j(),V=w(d);if(u=arguments,i=this,c=d,V){if(r===void 0)return k(c);if(y)return r=setTimeout(o,a),N(c)}return r===void 0&&(r=setTimeout(o,a)),f}return m.cancel=C,m.flush=x,m}function le(t,a,l){var u=!0,i=!0;if(typeof t!="function")throw new TypeError(I);return T(l)&&(u="leading"in l?!!l.leading:u,i="trailing"in l?!!l.trailing:i),ne(t,a,{leading:u,maxWait:a,trailing:i})}function T(t){var a=typeof t;return!!t&&(a=="object"||a=="function")}function oe(t){return!!t&&typeof t=="object"}function ae(t){return typeof t=="symbol"||oe(t)&&Z.call(t)==A}function H(t){if(typeof t=="number")return t;if(ae(t))return $;if(T(t)){var a=typeof t.valueOf=="function"?t.valueOf():t;t=T(a)?a+"":a}if(typeof t!="string")return t===0?t:+t;t=t.replace(W,"");var l=q.test(t);return l||G.test(t)?J(t.slice(2),l?2:8):R.test(t)?$:+t}var re=le;const se=U(re),ie={class:"setting-content"},de={class:"setting-header flex items-center"},ue={class:"setting-header flex items-center"},ce={class:"setting-header flex items-center"},me={class:"setting-body"},fe={class:"setting-item"},pe={class:"components-content"},ve=e.defineComponent({__name:"setting",props:{show:{type:Boolean,default:!1},data:{type:Object,default:()=>{}}},emits:["update:show"],setup(t,{emit:a}){e.defineAsyncComponent(()=>import("vuedraggable"));const l=a,u=()=>{l("update:show",!1)};return(i,n)=>{const f=e.resolveComponent("a-input"),r=e.resolveComponent("a-option"),c=e.resolveComponent("a-select"),v=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(v,{width:"60%",visible:t.show,footer:!1,onCancel:u,unmountOnClose:""},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.data.type)+"组件编辑 ",1)]),default:e.withCtx(()=>[e.createElementVNode("div",ie,[e.createElementVNode("div",de,[n[4]||(n[4]=e.createElementVNode("span",{class:"header-title"},"标题",-1)),e.createVNode(f,{modelValue:t.data.title,"onUpdate:modelValue":n[0]||(n[0]=p=>t.data.title=p),placeholder:"请输入标题","allow-clear":""},null,8,["modelValue"])]),e.createElementVNode("div",ue,[n[9]||(n[9]=e.createElementVNode("span",{class:"header-title"},"组件宽度",-1)),e.createVNode(c,{modelValue:t.data.width,"onUpdate:modelValue":n[1]||(n[1]=p=>t.data.width=p),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:"default"},{default:e.withCtx(()=>[...n[5]||(n[5]=[e.createTextVNode("默认",-1)])]),_:1}),e.createVNode(r,{value:"small"},{default:e.withCtx(()=>[...n[6]||(n[6]=[e.createTextVNode("小",-1)])]),_:1}),e.createVNode(r,{value:"medium"},{default:e.withCtx(()=>[...n[7]||(n[7]=[e.createTextVNode("中",-1)])]),_:1}),e.createVNode(r,{value:"max"},{default:e.withCtx(()=>[...n[8]||(n[8]=[e.createTextVNode("大",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",ce,[n[12]||(n[12]=e.createElementVNode("span",{class:"header-title"},"Opened by default",-1)),e.createVNode(c,{modelValue:t.data.openFirst,"onUpdate:modelValue":n[2]||(n[2]=p=>t.data.openFirst=p),placeholder:"请选择","allow-clear":""},{default:e.withCtx(()=>[e.createVNode(r,{value:!0},{default:e.withCtx(()=>[...n[10]||(n[10]=[e.createTextVNode("yes",-1)])]),_:1}),e.createVNode(r,{value:!1},{default:e.withCtx(()=>[...n[11]||(n[11]=[e.createTextVNode("No",-1)])]),_:1})]),_:1},8,["modelValue"])]),e.createElementVNode("div",me,[n[13]||(n[13]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",fe,[e.createElementVNode("div",pe,[e.createVNode(g.P,{data:t.data.data,onUpdate:n[3]||(n[3]=p=>t.data.data=p)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),Ve=g._(ve,[["__scopeId","data-v-f777c746"]]),ye={class:"collapse-custom__wrapper"},ge=["innerHTML"],be={class:"collapse-custom__content__wrapper"},Ne={class:"component-wrapper"},we={__name:"index",props:{modelValue:{type:Object,default:()=>{}},isPreview:{type:Boolean,default:!0}},emits:["update:modelValue","handleDelete","handleCopy","handlePaste"],setup(t,{emit:a}){const l=t,u=a,i=e.ref(null),n=e.ref(0),f=e.ref(!1),r=e.ref(null),c=e.ref(!1),v=e.ref(!1),p=e.computed(()=>{var o;return((o=l.modelValue)==null?void 0:o.classes)??""}),y=e.computed(()=>{var o;return((o=l.modelValue)==null?void 0:o.style)??""});e.computed(()=>{var o;return(o=l.modelValue)==null?void 0:o.width});const b=e.computed(()=>{var o;return((o=l.modelValue)==null?void 0:o.title)??[]}),N=e.computed(()=>{var o;return((o=l.modelValue)==null?void 0:o.openFirst)??!1}),k=e.computed(()=>{var o,s;return!((o=l.modelValue)!=null&&o.data)||!Array.isArray(l.modelValue.data)?[]:(s=l.modelValue)==null?void 0:s.data}),O=()=>{var s;if(l.modelValue&&l.modelValue.data)return;const o={id:((s=l.modelValue)==null?void 0:s.id)||g.r(),type:"CollapseCustom",title:"我是标题collaspse",openFirst:!1,width:"",style:{},data:[]};u("update:modelValue",o)},w=()=>{const o=i.value;o&&(n.value=o.scrollHeight)};return e.onMounted(()=>{f.value=N.value,e.nextTick(w);const o=se(()=>{w()},250);r.value=new ResizeObserver(o),r.value.observe(i.value)}),e.onBeforeUnmount(()=>{i.value&&r.value&&r.value.unobserve(i.value)}),O(),(o,s)=>{var C,x;return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["collapse-custom",p.value]),style:e.normalizeStyle(y.value),onMouseover:s[4]||(s[4]=m=>c.value=!0),onMouseout:s[5]||(s[5]=m=>c.value=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom_container",[(C=t.modelValue)!=null&&C.width?`container-content-${(x=t.modelValue)==null?void 0:x.width}`:"container-content"]])},[e.createElementVNode("div",ye,[e.createElementVNode("button",{type:"button",class:e.normalizeClass(["collapse-custom__btn",{"--is-collapsed":!f.value}]),onClick:s[0]||(s[0]=m=>f.value=!f.value)},[e.createElementVNode("h4",{class:"collapse-custom__btn__title",innerHTML:b.value},null,8,ge),s[6]||(s[6]=e.createElementVNode("span",{class:"collapse-custom__btn__icon"},null,-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["collapse-custom__content",{"--is-open":f.value}]),ref_key:"content",ref:i,style:e.normalizeStyle({"--scroll-height":`${n.value}px`})},[e.createElementVNode("div",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(k.value,(m,d)=>(e.openBlock(),e.createElementBlock("div",{key:m.id,class:"page-item"},[e.createElementVNode("div",Ne,[e.createVNode(g.a,{type:m.type,"props-data":{modelValue:m}},null,8,["type","props-data"])])]))),128))])],6)]),t.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(g.O,{key:0,show:c.value,"onUpdate:show":s[1]||(s[1]=m=>c.value=m),onHandleEdit:s[2]||(s[2]=m=>v.value=!0),onHandleDelete:o.handleDelete,onHandleCopy:o.handleCopy,onHandlePaste:o.handlePaste,style:{top:"-20px"}},null,8,["show","onHandleDelete","onHandleCopy","onHandlePaste"]))],2),t.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ve,{key:0,show:v.value,"onUpdate:show":s[3]||(s[3]=m=>v.value=m),data:t.modelValue},null,8,["show","data"]))],38)}}},he=g._(we,[["__scopeId","data-v-7a8b3cc2"]]);exports.default=he;
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { defineComponent as G, defineAsyncComponent as J, resolveComponent as H, createBlock as N, openBlock as O, withCtx as g, createElementVNode as r, createVNode as y, createTextVNode as h, toDisplayString as X, ref as V, computed as C, onMounted as q, nextTick as K, onBeforeUnmount as Q, createElementBlock as M, normalizeStyle as L, normalizeClass as S, createCommentVNode as U, Fragment as Y, renderList as Z } from "vue";
|
|
2
|
+
import { P as ee, _ as z, a as te, O as ne, r as le } from "./index-QpRJyZ_6.mjs";
|
|
3
|
+
var I = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
4
|
+
function ae(e) {
|
|
5
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
6
|
+
}
|
|
7
|
+
var R = "Expected a function", A = NaN, oe = "[object Symbol]", se = /^\s+|\s+$/g, ie = /^[-+]0x[0-9a-f]+$/i, re = /^0b[01]+$/i, de = /^0o[0-7]+$/i, ue = parseInt, fe = typeof I == "object" && I && I.Object === Object && I, ce = typeof self == "object" && self && self.Object === Object && self, me = fe || ce || Function("return this")(), pe = Object.prototype, ve = pe.toString, ye = Math.max, ge = Math.min, B = function() {
|
|
8
|
+
return me.Date.now();
|
|
9
|
+
};
|
|
10
|
+
function be(e, s, l) {
|
|
11
|
+
var c, d, t, m, a, u, v = 0, p = !1, w = !1, x = !0;
|
|
12
|
+
if (typeof e != "function")
|
|
13
|
+
throw new TypeError(R);
|
|
14
|
+
s = W(s) || 0, E(l) && (p = !!l.leading, w = "maxWait" in l, t = w ? ye(W(l.maxWait) || 0, s) : t, x = "trailing" in l ? !!l.trailing : x);
|
|
15
|
+
function T(i) {
|
|
16
|
+
var b = c, k = d;
|
|
17
|
+
return c = d = void 0, v = i, m = e.apply(k, b), m;
|
|
18
|
+
}
|
|
19
|
+
function P(i) {
|
|
20
|
+
return v = i, a = setTimeout(n, s), p ? T(i) : m;
|
|
21
|
+
}
|
|
22
|
+
function F(i) {
|
|
23
|
+
var b = i - u, k = i - v, D = s - b;
|
|
24
|
+
return w ? ge(D, t - k) : D;
|
|
25
|
+
}
|
|
26
|
+
function j(i) {
|
|
27
|
+
var b = i - u, k = i - v;
|
|
28
|
+
return u === void 0 || b >= s || b < 0 || w && k >= t;
|
|
29
|
+
}
|
|
30
|
+
function n() {
|
|
31
|
+
var i = B();
|
|
32
|
+
if (j(i))
|
|
33
|
+
return o(i);
|
|
34
|
+
a = setTimeout(n, F(i));
|
|
35
|
+
}
|
|
36
|
+
function o(i) {
|
|
37
|
+
return a = void 0, x && c ? T(i) : (c = d = void 0, m);
|
|
38
|
+
}
|
|
39
|
+
function $() {
|
|
40
|
+
a !== void 0 && clearTimeout(a), v = 0, c = u = d = a = void 0;
|
|
41
|
+
}
|
|
42
|
+
function _() {
|
|
43
|
+
return a === void 0 ? m : o(B());
|
|
44
|
+
}
|
|
45
|
+
function f() {
|
|
46
|
+
var i = B(), b = j(i);
|
|
47
|
+
if (c = arguments, d = this, u = i, b) {
|
|
48
|
+
if (a === void 0)
|
|
49
|
+
return P(u);
|
|
50
|
+
if (w)
|
|
51
|
+
return a = setTimeout(n, s), T(u);
|
|
52
|
+
}
|
|
53
|
+
return a === void 0 && (a = setTimeout(n, s)), m;
|
|
54
|
+
}
|
|
55
|
+
return f.cancel = $, f.flush = _, f;
|
|
56
|
+
}
|
|
57
|
+
function we(e, s, l) {
|
|
58
|
+
var c = !0, d = !0;
|
|
59
|
+
if (typeof e != "function")
|
|
60
|
+
throw new TypeError(R);
|
|
61
|
+
return E(l) && (c = "leading" in l ? !!l.leading : c, d = "trailing" in l ? !!l.trailing : d), be(e, s, {
|
|
62
|
+
leading: c,
|
|
63
|
+
maxWait: s,
|
|
64
|
+
trailing: d
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function E(e) {
|
|
68
|
+
var s = typeof e;
|
|
69
|
+
return !!e && (s == "object" || s == "function");
|
|
70
|
+
}
|
|
71
|
+
function he(e) {
|
|
72
|
+
return !!e && typeof e == "object";
|
|
73
|
+
}
|
|
74
|
+
function Ve(e) {
|
|
75
|
+
return typeof e == "symbol" || he(e) && ve.call(e) == oe;
|
|
76
|
+
}
|
|
77
|
+
function W(e) {
|
|
78
|
+
if (typeof e == "number")
|
|
79
|
+
return e;
|
|
80
|
+
if (Ve(e))
|
|
81
|
+
return A;
|
|
82
|
+
if (E(e)) {
|
|
83
|
+
var s = typeof e.valueOf == "function" ? e.valueOf() : e;
|
|
84
|
+
e = E(s) ? s + "" : s;
|
|
85
|
+
}
|
|
86
|
+
if (typeof e != "string")
|
|
87
|
+
return e === 0 ? e : +e;
|
|
88
|
+
e = e.replace(se, "");
|
|
89
|
+
var l = re.test(e);
|
|
90
|
+
return l || de.test(e) ? ue(e.slice(2), l ? 2 : 8) : ie.test(e) ? A : +e;
|
|
91
|
+
}
|
|
92
|
+
var Ce = we;
|
|
93
|
+
const Oe = /* @__PURE__ */ ae(Ce), xe = { class: "setting-content" }, Te = { class: "setting-header flex items-center" }, je = { class: "setting-header flex items-center" }, ke = { class: "setting-header flex items-center" }, $e = { class: "setting-body" }, _e = { class: "setting-item" }, He = { class: "components-content" }, Se = /* @__PURE__ */ G({
|
|
94
|
+
__name: "setting",
|
|
95
|
+
props: {
|
|
96
|
+
show: {
|
|
97
|
+
type: Boolean,
|
|
98
|
+
default: !1
|
|
99
|
+
},
|
|
100
|
+
data: {
|
|
101
|
+
type: Object,
|
|
102
|
+
default: () => {
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
emits: ["update:show"],
|
|
107
|
+
setup(e, { emit: s }) {
|
|
108
|
+
J(() => import("vuedraggable"));
|
|
109
|
+
const l = s, c = () => {
|
|
110
|
+
l("update:show", !1);
|
|
111
|
+
};
|
|
112
|
+
return (d, t) => {
|
|
113
|
+
const m = H("a-input"), a = H("a-option"), u = H("a-select"), v = H("a-drawer");
|
|
114
|
+
return O(), N(v, {
|
|
115
|
+
width: "60%",
|
|
116
|
+
visible: e.show,
|
|
117
|
+
footer: !1,
|
|
118
|
+
onCancel: c,
|
|
119
|
+
unmountOnClose: ""
|
|
120
|
+
}, {
|
|
121
|
+
title: g(() => [
|
|
122
|
+
h(X(e.data.type) + "组件编辑 ", 1)
|
|
123
|
+
]),
|
|
124
|
+
default: g(() => [
|
|
125
|
+
r("div", xe, [
|
|
126
|
+
r("div", Te, [
|
|
127
|
+
t[4] || (t[4] = r("span", { class: "header-title" }, "标题", -1)),
|
|
128
|
+
y(m, {
|
|
129
|
+
modelValue: e.data.title,
|
|
130
|
+
"onUpdate:modelValue": t[0] || (t[0] = (p) => e.data.title = p),
|
|
131
|
+
placeholder: "请输入标题",
|
|
132
|
+
"allow-clear": ""
|
|
133
|
+
}, null, 8, ["modelValue"])
|
|
134
|
+
]),
|
|
135
|
+
r("div", je, [
|
|
136
|
+
t[9] || (t[9] = r("span", { class: "header-title" }, "组件宽度", -1)),
|
|
137
|
+
y(u, {
|
|
138
|
+
modelValue: e.data.width,
|
|
139
|
+
"onUpdate:modelValue": t[1] || (t[1] = (p) => e.data.width = p),
|
|
140
|
+
placeholder: "请选择",
|
|
141
|
+
"allow-clear": ""
|
|
142
|
+
}, {
|
|
143
|
+
default: g(() => [
|
|
144
|
+
y(a, { value: "default" }, {
|
|
145
|
+
default: g(() => [...t[5] || (t[5] = [
|
|
146
|
+
h("默认", -1)
|
|
147
|
+
])]),
|
|
148
|
+
_: 1
|
|
149
|
+
}),
|
|
150
|
+
y(a, { value: "small" }, {
|
|
151
|
+
default: g(() => [...t[6] || (t[6] = [
|
|
152
|
+
h("小", -1)
|
|
153
|
+
])]),
|
|
154
|
+
_: 1
|
|
155
|
+
}),
|
|
156
|
+
y(a, { value: "medium" }, {
|
|
157
|
+
default: g(() => [...t[7] || (t[7] = [
|
|
158
|
+
h("中", -1)
|
|
159
|
+
])]),
|
|
160
|
+
_: 1
|
|
161
|
+
}),
|
|
162
|
+
y(a, { value: "max" }, {
|
|
163
|
+
default: g(() => [...t[8] || (t[8] = [
|
|
164
|
+
h("大", -1)
|
|
165
|
+
])]),
|
|
166
|
+
_: 1
|
|
167
|
+
})
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 8, ["modelValue"])
|
|
171
|
+
]),
|
|
172
|
+
r("div", ke, [
|
|
173
|
+
t[12] || (t[12] = r("span", { class: "header-title" }, "Opened by default", -1)),
|
|
174
|
+
y(u, {
|
|
175
|
+
modelValue: e.data.openFirst,
|
|
176
|
+
"onUpdate:modelValue": t[2] || (t[2] = (p) => e.data.openFirst = p),
|
|
177
|
+
placeholder: "请选择",
|
|
178
|
+
"allow-clear": ""
|
|
179
|
+
}, {
|
|
180
|
+
default: g(() => [
|
|
181
|
+
y(a, { value: !0 }, {
|
|
182
|
+
default: g(() => [...t[10] || (t[10] = [
|
|
183
|
+
h("yes", -1)
|
|
184
|
+
])]),
|
|
185
|
+
_: 1
|
|
186
|
+
}),
|
|
187
|
+
y(a, { value: !1 }, {
|
|
188
|
+
default: g(() => [...t[11] || (t[11] = [
|
|
189
|
+
h("No", -1)
|
|
190
|
+
])]),
|
|
191
|
+
_: 1
|
|
192
|
+
})
|
|
193
|
+
]),
|
|
194
|
+
_: 1
|
|
195
|
+
}, 8, ["modelValue"])
|
|
196
|
+
]),
|
|
197
|
+
r("div", $e, [
|
|
198
|
+
t[13] || (t[13] = r("div", { class: "setting-toolbar" }, [
|
|
199
|
+
r("h4", null, "组件")
|
|
200
|
+
], -1)),
|
|
201
|
+
r("div", _e, [
|
|
202
|
+
r("div", He, [
|
|
203
|
+
y(ee, {
|
|
204
|
+
data: e.data.data,
|
|
205
|
+
onUpdate: t[3] || (t[3] = (p) => e.data.data = p)
|
|
206
|
+
}, null, 8, ["data"])
|
|
207
|
+
])
|
|
208
|
+
])
|
|
209
|
+
])
|
|
210
|
+
])
|
|
211
|
+
]),
|
|
212
|
+
_: 1
|
|
213
|
+
}, 8, ["visible"]);
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
}), Ie = /* @__PURE__ */ z(Se, [["__scopeId", "data-v-f777c746"]]), Ee = { class: "collapse-custom__wrapper" }, Pe = ["innerHTML"], Fe = { class: "collapse-custom__content__wrapper" }, Me = { class: "component-wrapper" }, Be = {
|
|
217
|
+
__name: "index",
|
|
218
|
+
props: {
|
|
219
|
+
modelValue: {
|
|
220
|
+
type: Object,
|
|
221
|
+
default: () => {
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
// 是否预览
|
|
225
|
+
isPreview: {
|
|
226
|
+
type: Boolean,
|
|
227
|
+
default: !0
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
emits: ["update:modelValue", "handleDelete", "handleCopy", "handlePaste"],
|
|
231
|
+
setup(e, { emit: s }) {
|
|
232
|
+
const l = e, c = s, d = V(null), t = V(0), m = V(!1), a = V(null), u = V(!1), v = V(!1), p = C(() => {
|
|
233
|
+
var n;
|
|
234
|
+
return ((n = l.modelValue) == null ? void 0 : n.classes) ?? "";
|
|
235
|
+
}), w = C(() => {
|
|
236
|
+
var n;
|
|
237
|
+
return ((n = l.modelValue) == null ? void 0 : n.style) ?? "";
|
|
238
|
+
});
|
|
239
|
+
C(() => {
|
|
240
|
+
var n;
|
|
241
|
+
return (n = l.modelValue) == null ? void 0 : n.width;
|
|
242
|
+
});
|
|
243
|
+
const x = C(() => {
|
|
244
|
+
var n;
|
|
245
|
+
return ((n = l.modelValue) == null ? void 0 : n.title) ?? [];
|
|
246
|
+
}), T = C(() => {
|
|
247
|
+
var n;
|
|
248
|
+
return ((n = l.modelValue) == null ? void 0 : n.openFirst) ?? !1;
|
|
249
|
+
}), P = C(() => {
|
|
250
|
+
var n, o;
|
|
251
|
+
return !((n = l.modelValue) != null && n.data) || !Array.isArray(l.modelValue.data) ? [] : (o = l.modelValue) == null ? void 0 : o.data;
|
|
252
|
+
}), F = () => {
|
|
253
|
+
var o;
|
|
254
|
+
if (l.modelValue && l.modelValue.data)
|
|
255
|
+
return;
|
|
256
|
+
const n = {
|
|
257
|
+
id: ((o = l.modelValue) == null ? void 0 : o.id) || le(),
|
|
258
|
+
//componentKey
|
|
259
|
+
type: "CollapseCustom",
|
|
260
|
+
title: "我是标题collaspse",
|
|
261
|
+
openFirst: !1,
|
|
262
|
+
width: "",
|
|
263
|
+
style: {
|
|
264
|
+
// marginTop: "20px",
|
|
265
|
+
// backgroundColor: "#f5f5f5",
|
|
266
|
+
},
|
|
267
|
+
data: []
|
|
268
|
+
};
|
|
269
|
+
c("update:modelValue", n);
|
|
270
|
+
}, j = () => {
|
|
271
|
+
const n = d.value;
|
|
272
|
+
n && (t.value = n.scrollHeight);
|
|
273
|
+
};
|
|
274
|
+
return q(() => {
|
|
275
|
+
m.value = T.value, K(j);
|
|
276
|
+
const n = Oe(() => {
|
|
277
|
+
j();
|
|
278
|
+
}, 250);
|
|
279
|
+
a.value = new ResizeObserver(n), a.value.observe(d.value);
|
|
280
|
+
}), Q(() => {
|
|
281
|
+
d.value && a.value && a.value.unobserve(d.value);
|
|
282
|
+
}), F(), (n, o) => {
|
|
283
|
+
var $, _;
|
|
284
|
+
return O(), M("div", {
|
|
285
|
+
class: S(["collapse-custom", p.value]),
|
|
286
|
+
style: L(w.value),
|
|
287
|
+
onMouseover: o[4] || (o[4] = (f) => u.value = !0),
|
|
288
|
+
onMouseout: o[5] || (o[5] = (f) => u.value = !1)
|
|
289
|
+
}, [
|
|
290
|
+
r("div", {
|
|
291
|
+
class: S(["collapse-custom_container", [($ = e.modelValue) != null && $.width ? `container-content-${(_ = e.modelValue) == null ? void 0 : _.width}` : "container-content"]])
|
|
292
|
+
}, [
|
|
293
|
+
r("div", Ee, [
|
|
294
|
+
r("button", {
|
|
295
|
+
type: "button",
|
|
296
|
+
class: S(["collapse-custom__btn", { "--is-collapsed": !m.value }]),
|
|
297
|
+
onClick: o[0] || (o[0] = (f) => m.value = !m.value)
|
|
298
|
+
}, [
|
|
299
|
+
r("h4", {
|
|
300
|
+
class: "collapse-custom__btn__title",
|
|
301
|
+
innerHTML: x.value
|
|
302
|
+
}, null, 8, Pe),
|
|
303
|
+
o[6] || (o[6] = r("span", { class: "collapse-custom__btn__icon" }, null, -1))
|
|
304
|
+
], 2),
|
|
305
|
+
r("div", {
|
|
306
|
+
class: S(["collapse-custom__content", { "--is-open": m.value }]),
|
|
307
|
+
ref_key: "content",
|
|
308
|
+
ref: d,
|
|
309
|
+
style: L({ "--scroll-height": `${t.value}px` })
|
|
310
|
+
}, [
|
|
311
|
+
r("div", Fe, [
|
|
312
|
+
(O(!0), M(Y, null, Z(P.value, (f, i) => (O(), M("div", {
|
|
313
|
+
key: f.id,
|
|
314
|
+
class: "page-item"
|
|
315
|
+
}, [
|
|
316
|
+
r("div", Me, [
|
|
317
|
+
y(te, {
|
|
318
|
+
type: f.type,
|
|
319
|
+
"props-data": { modelValue: f }
|
|
320
|
+
}, null, 8, ["type", "props-data"])
|
|
321
|
+
])
|
|
322
|
+
]))), 128))
|
|
323
|
+
])
|
|
324
|
+
], 6)
|
|
325
|
+
]),
|
|
326
|
+
e.isPreview ? U("", !0) : (O(), N(ne, {
|
|
327
|
+
key: 0,
|
|
328
|
+
show: u.value,
|
|
329
|
+
"onUpdate:show": o[1] || (o[1] = (f) => u.value = f),
|
|
330
|
+
onHandleEdit: o[2] || (o[2] = (f) => v.value = !0),
|
|
331
|
+
onHandleDelete: n.handleDelete,
|
|
332
|
+
onHandleCopy: n.handleCopy,
|
|
333
|
+
onHandlePaste: n.handlePaste,
|
|
334
|
+
style: { top: "-20px" }
|
|
335
|
+
}, null, 8, ["show", "onHandleDelete", "onHandleCopy", "onHandlePaste"]))
|
|
336
|
+
], 2),
|
|
337
|
+
e.isPreview ? U("", !0) : (O(), N(Ie, {
|
|
338
|
+
key: 0,
|
|
339
|
+
show: v.value,
|
|
340
|
+
"onUpdate:show": o[3] || (o[3] = (f) => v.value = f),
|
|
341
|
+
data: e.modelValue
|
|
342
|
+
}, null, 8, ["show", "data"]))
|
|
343
|
+
], 38);
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
}, Le = /* @__PURE__ */ z(Be, [["__scopeId", "data-v-7a8b3cc2"]]);
|
|
347
|
+
export {
|
|
348
|
+
Le as default
|
|
349
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./index-CvCNRVPY.js"),P={key:0,class:"card-list__filter"},S={key:0,class:"card-list__title"},D=["id"],L=["data-aos-delay","data-aos-anchor"],x={class:"card-circle"},M={class:"circle__head"},$={class:"circle__img img-fit"},z=["src","alt"],j={key:0,class:"circle__title mt-3"},F={key:1,class:"circle__subtitle"},W={key:2,class:"circle__subtitle"},q={key:3,class:"circle__text mt-3"},A={key:1,class:"d-flex justify-content-center mt-10"},O={class:"btn--udrline"},T=e.defineComponent({__name:"index",props:{componentProps:{type:Object,default:()=>({})}},emits:["showLightboxVideo"],setup(h,{emit:U}){const l=h,r=e.ref("all"),n=e.ref(4),i=e.ref(4),m=e.ref(Date.now()),y=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.classes)??null}),f=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.style)??null}),b=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.width)??null}),B=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.center)??!1}),E=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.type)??"school"}),p=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.title)??null}),c=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.filters)??[]}),v=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.list)??[]}),a=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.colDesktop)??3}),d=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.colMobile)??1}),_=e.computed(()=>{var t;return((t=l.componentProps)==null?void 0:t.addShowMore)??!1}),u=e.computed(()=>r.value==="all"||Array.isArray(c.value)&&c.value.length<=0?v.value:v.value.filter(t=>{var s;return(s=t.filter)==null?void 0:s.includes(r.value)})),g=e.computed(()=>_.value?u.value.slice(0,n.value):u.value),w=e.computed(()=>_.value?n.value<u.value.length:!1),k=e.ref(window.innerWidth),N=t=>{r.value=t};return e.onMounted(()=>{k.value>=767.98?(n.value=a.value,i.value=a.value):(n.value=d.value*3,i.value=d.value*3),window.addEventListener("resize",()=>{k.value=window.innerWidth})}),(t,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["card-list",y.value]),style:e.normalizeStyle(f.value)},[c.value&&c.value.length>0?(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(C.T,{tabList:c.value,onUpdateFilter:N},null,8,["tabList"])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["card-list__wrapper",[b.value,{"text-center":B.value}]])},[p.value?(e.openBlock(),e.createElementBlock("h4",S,e.toDisplayString(p.value),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["row",[`row-cols-${d.value}`,`row-cols-md-${a.value}`,{"small-gap":a.value>4},`cars-list-${E.value}`]]),id:`card-list-${m.value}`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(g.value,(o,V)=>(e.openBlock(),e.createElementBlock("div",{class:"col",key:o.key,"data-aos":"fade-up","data-aos-delay":V*100,"data-aos-anchor":`#card-list-${m.value}`},[e.createElementVNode("div",x,[e.createElementVNode("div",M,[e.createElementVNode("div",$,[e.createElementVNode("img",{src:o.image,alt:o.alt},null,8,z)])]),e.createElementVNode("div",{class:e.normalizeClass(["circle__body",{"is-single-column":t.singleColumn}])},[o.title?(e.openBlock(),e.createElementBlock("h4",j,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),o.subtitle?(e.openBlock(),e.createElementBlock("div",F,e.toDisplayString(o.subtitle),1)):e.createCommentVNode("",!0),o.subtitle2?(e.openBlock(),e.createElementBlock("div",W,e.toDisplayString(o.subtitle2),1)):e.createCommentVNode("",!0),o.text?(e.openBlock(),e.createElementBlock("div",q,e.toDisplayString(o.text),1)):e.createCommentVNode("",!0)],2)])],8,L))),128))],10,D),w.value?(e.openBlock(),e.createElementBlock("div",A,[e.createElementVNode("button",{type:"button",class:"btn btn__load-more",onClick:s[0]||(s[0]=o=>n.value+=i.value)},[e.createElementVNode("div",O,e.toDisplayString(t.$t("btn.load_more")),1),s[1]||(s[1]=e.createElementVNode("span",{class:"i i-load-more"},null,-1))])])):e.createCommentVNode("",!0)],2)],6))}});exports.default=T;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),c=require("./index-CvCNRVPY.js"),h={class:"setting-content"},f={class:"setting-header flex items-center"},C={class:"setting-header flex items-center"},E={class:"setting-header flex items-center"},N={class:"setting-header flex items-center"},B={class:"setting-header flex items-center"},x={class:"preview-container"},P=["src"],z={key:1,class:"no-preview"},S={class:"setting-body"},I={class:"setting-item"},$={class:"components-content"},H=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"}]),i=e.ref(),r=u.value.find(s=>s.image===n.data.backgroundImage);debugger;i.value=r?r.id:"";const m=()=>{const s=u.value.find(a=>a.id===i.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-option"),b=e.resolveComponent("a-select"),y=e.resolveComponent("a-button"),p=e.resolveComponent("a-input"),w=e.resolveComponent("a-drawer");return e.openBlock(),e.createBlock(w,{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",h,[e.createElementVNode("div",f,[a[6]||(a[6]=e.createElementVNode("span",{class:"header-title"},"Background Preset",-1)),e.createVNode(b,{modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=t=>i.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(V,{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(y,{type:"primary",onClick:m},{default:e.withCtx(()=>[...a[5]||(a[5]=[e.createTextVNode("Apply",-1)])]),_:1})]),e.createElementVNode("div",C,[a[7]||(a[7]=e.createElementVNode("span",{class:"header-title"},"Image",-1)),e.createVNode(p,{modelValue:o.data.backgroundImage,"onUpdate:modelValue":a[1]||(a[1]=t=>o.data.backgroundImage=t),placeholder:"图片路径",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",E,[a[8]||(a[8]=e.createElementVNode("span",{class:"header-title"},"Size",-1)),e.createVNode(p,{modelValue:o.data.backgroundSize,"onUpdate:modelValue":a[2]||(a[2]=t=>o.data.backgroundSize=t),placeholder:"尺寸",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",N,[a[9]||(a[9]=e.createElementVNode("span",{class:"header-title"},"Position",-1)),e.createVNode(p,{modelValue:o.data.backgroundPosition,"onUpdate:modelValue":a[3]||(a[3]=t=>o.data.backgroundPosition=t),placeholder:"位置",style:{width:"300px"}},null,8,["modelValue"])]),e.createElementVNode("div",B,[a[11]||(a[11]=e.createElementVNode("span",{class:"header-title"},"Preview",-1)),e.createElementVNode("div",x,[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,P)):(e.openBlock(),e.createElementBlock("div",z,"No preview available")),a[10]||(a[10]=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",S,[a[12]||(a[12]=e.createElementVNode("div",{class:"setting-toolbar"},[e.createElementVNode("h4",null,"组件")],-1)),e.createElementVNode("div",I,[e.createElementVNode("div",$,[e.createVNode(c.P,{data:o.data.data,onUpdate:a[4]||(a[4]=t=>o.data.data=t)},null,8,["data"])])])])])]),_:1},8,["visible"])}}}),D=c._(H,[["__scopeId","data-v-aed41d00"]]),U={class:"component-wrapper"},O={__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,i=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)||c.r(),type:"BackgroundWrapper",backgroundImage:"",backgroundSize:"",backgroundPosition:"",data:[]};u("update:modelValue",t)},k=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.classes)??null}),s=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.style)??null}),a=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.width)??null}),V=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundImage)??""}),b=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundColor)??"transparent"}),y=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"}),w=e.computed(()=>{var t;return((t=n.modelValue)==null?void 0:t.backgroundRepeat)??"no-repeat"});return v(),(t,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["background-wrapper",k.value]),style:e.normalizeStyle(s.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(a.value)},[e.createElementVNode("div",{class:"background-wrapper__bg",style:e.normalizeStyle({"background-image":`url('${V.value}')`,"background-color":`${b.value}`,"background-size":`${y.value}`,"background-position":`${p.value}`,"background-repeat":`${w.value}`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,(d,A)=>(e.openBlock(),e.createElementBlock("div",{key:d.id,class:"page-item"},[e.createElementVNode("div",U,[e.createVNode(c.a,{type:d.type,"props-data":{modelValue:d}},null,8,["type","props-data"])])]))),128))],4),o.isPreview?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c.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(D,{key:0,show:m.value,"onUpdate:show":l[2]||(l[2]=d=>m.value=d),data:o.modelValue},null,8,["show","data"]))],38))}},j=c._(O,[["__scopeId","data-v-6acc1a6e"]]);exports.default=j;
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { defineComponent as j, ref as u, computed as o, onMounted as A, resolveComponent as O, createElementBlock as i, openBlock as r, normalizeStyle as U, normalizeClass as g, createCommentVNode as L, createElementVNode as t, createVNode as q, toDisplayString as T, Fragment as x, renderList as $, withDirectives as _, vShow as m, createBlock as G } from "vue";
|
|
2
|
+
import { T as I } from "./index-QpRJyZ_6.mjs";
|
|
3
|
+
const J = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "card-list__filter"
|
|
6
|
+
}, Q = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "card-list__title"
|
|
9
|
+
}, R = ["id"], X = ["data-aos-delay", "data-aos-anchor"], Y = { class: "card-programme" }, Z = { class: "card-image" }, ee = ["src", "alt"], te = { class: "card-body" }, oe = ["innerHTML"], le = ["innerHTML"], se = ["innerHTML"], ne = { class: "card-programme__buttons" }, ae = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "d-flex justify-content-center mt-10"
|
|
12
|
+
}, re = { class: "btn--udrline" }, ue = /* @__PURE__ */ j({
|
|
13
|
+
__name: "index",
|
|
14
|
+
props: {
|
|
15
|
+
componentProps: {
|
|
16
|
+
type: Object,
|
|
17
|
+
default: () => ({})
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
emits: ["showLightboxVideo"],
|
|
21
|
+
setup(z, { emit: ie }) {
|
|
22
|
+
const s = z, h = u("all"), c = u(4), y = u(4), P = u(Date.now()), w = u(typeof window < "u" ? window.innerWidth : 1024), B = o(() => {
|
|
23
|
+
var e;
|
|
24
|
+
return ((e = s.componentProps) == null ? void 0 : e.classes) ?? null;
|
|
25
|
+
}), H = o(() => {
|
|
26
|
+
var e;
|
|
27
|
+
return ((e = s.componentProps) == null ? void 0 : e.style) ?? null;
|
|
28
|
+
}), C = o(() => {
|
|
29
|
+
var e;
|
|
30
|
+
return ((e = s.componentProps) == null ? void 0 : e.width) ?? null;
|
|
31
|
+
}), D = o(() => {
|
|
32
|
+
var e;
|
|
33
|
+
return ((e = s.componentProps) == null ? void 0 : e.center) ?? !1;
|
|
34
|
+
}), N = o(() => {
|
|
35
|
+
var e;
|
|
36
|
+
return ((e = s.componentProps) == null ? void 0 : e.type) ?? "school";
|
|
37
|
+
}), k = o(() => {
|
|
38
|
+
var e;
|
|
39
|
+
return ((e = s.componentProps) == null ? void 0 : e.title) ?? null;
|
|
40
|
+
}), d = o(() => {
|
|
41
|
+
var e;
|
|
42
|
+
return ((e = s.componentProps) == null ? void 0 : e.filters) ?? [];
|
|
43
|
+
}), M = o(() => {
|
|
44
|
+
var e;
|
|
45
|
+
return ((e = s.componentProps) == null ? void 0 : e.list) ?? [];
|
|
46
|
+
}), v = o(() => {
|
|
47
|
+
var e;
|
|
48
|
+
return ((e = s.componentProps) == null ? void 0 : e.colDesktop) ?? 3;
|
|
49
|
+
}), f = o(() => {
|
|
50
|
+
var e;
|
|
51
|
+
return ((e = s.componentProps) == null ? void 0 : e.colMobile) ?? 1;
|
|
52
|
+
}), b = o(() => {
|
|
53
|
+
var e;
|
|
54
|
+
return ((e = s.componentProps) == null ? void 0 : e.addShowMore) ?? !1;
|
|
55
|
+
}), p = o(() => h.value === "all" || Array.isArray(d.value) && d.value.length <= 0 ? M.value : M.value.filter((e) => {
|
|
56
|
+
var n;
|
|
57
|
+
return (n = e.filter) == null ? void 0 : n.includes(h.value);
|
|
58
|
+
})), S = o(() => b.value ? p.value.slice(0, c.value) : p.value), V = o(() => b.value ? w.value <= 767.98 && c.value < p.value.length || b.value && c.value < p.value.length : !1), E = (e) => {
|
|
59
|
+
h.value = e;
|
|
60
|
+
};
|
|
61
|
+
return A(() => {
|
|
62
|
+
w.value >= 767.98 ? (c.value = v.value, y.value = v.value) : (c.value = f.value * 3, y.value = f.value * 3), typeof window < "u" && window.addEventListener("resize", () => {
|
|
63
|
+
w.value = window.innerWidth;
|
|
64
|
+
});
|
|
65
|
+
}), (e, n) => {
|
|
66
|
+
const F = O("BtnPrimary");
|
|
67
|
+
return r(), i("div", {
|
|
68
|
+
class: g(["card-list", B.value]),
|
|
69
|
+
style: U(H.value)
|
|
70
|
+
}, [
|
|
71
|
+
d.value && d.value.length > 0 ? (r(), i("div", J, [
|
|
72
|
+
q(I, {
|
|
73
|
+
tabList: d.value,
|
|
74
|
+
onUpdateFilter: E
|
|
75
|
+
}, null, 8, ["tabList"])
|
|
76
|
+
])) : L("", !0),
|
|
77
|
+
t("div", {
|
|
78
|
+
class: g(["card-list__wrapper", [C.value, { "text-center": D.value }]])
|
|
79
|
+
}, [
|
|
80
|
+
k.value ? (r(), i("h4", Q, T(k.value), 1)) : L("", !0),
|
|
81
|
+
t("div", {
|
|
82
|
+
class: g(["row", [
|
|
83
|
+
`row-cols-${f.value}`,
|
|
84
|
+
`row-cols-md-${v.value}`,
|
|
85
|
+
{ "small-gap": v.value > 4 },
|
|
86
|
+
`cars-list-${N.value}`
|
|
87
|
+
]]),
|
|
88
|
+
id: `card-list-${P.value}`
|
|
89
|
+
}, [
|
|
90
|
+
(r(!0), i(x, null, $(S.value, (l, K) => (r(), i("div", {
|
|
91
|
+
class: "col",
|
|
92
|
+
key: l.key,
|
|
93
|
+
"data-aos": "fade-up",
|
|
94
|
+
"data-aos-delay": K * 100,
|
|
95
|
+
"data-aos-anchor": `#card-list-${P.value}`
|
|
96
|
+
}, [
|
|
97
|
+
t("div", Y, [
|
|
98
|
+
t("div", Z, [
|
|
99
|
+
t("img", {
|
|
100
|
+
src: l.image_url,
|
|
101
|
+
alt: l.image_alt
|
|
102
|
+
}, null, 8, ee)
|
|
103
|
+
]),
|
|
104
|
+
t("div", te, [
|
|
105
|
+
_(t("div", {
|
|
106
|
+
class: "card-body__title",
|
|
107
|
+
innerHTML: l.title
|
|
108
|
+
}, null, 8, oe), [
|
|
109
|
+
[m, l.title]
|
|
110
|
+
]),
|
|
111
|
+
_(t("div", {
|
|
112
|
+
class: "card-body__subtitle",
|
|
113
|
+
innerHTML: l.subtitle
|
|
114
|
+
}, null, 8, le), [
|
|
115
|
+
[m, l.subtitle]
|
|
116
|
+
]),
|
|
117
|
+
_(t("div", {
|
|
118
|
+
class: "card-body__description",
|
|
119
|
+
innerHTML: l.description
|
|
120
|
+
}, null, 8, se), [
|
|
121
|
+
[m, l.description]
|
|
122
|
+
]),
|
|
123
|
+
_(t("div", ne, [
|
|
124
|
+
(r(!0), i(x, null, $(l.buttons, (a, W) => (r(), G(F, {
|
|
125
|
+
key: W,
|
|
126
|
+
text: a.text,
|
|
127
|
+
url: a.url,
|
|
128
|
+
buttonType: a.buttonType,
|
|
129
|
+
light: a.light,
|
|
130
|
+
white: a.white,
|
|
131
|
+
blue: a.blue,
|
|
132
|
+
size: a.size,
|
|
133
|
+
action: a.action,
|
|
134
|
+
actionKey: a.actionKey
|
|
135
|
+
}, null, 8, ["text", "url", "buttonType", "light", "white", "blue", "size", "action", "actionKey"]))), 128))
|
|
136
|
+
], 512), [
|
|
137
|
+
[m, l.buttons && l.buttons.length > 0]
|
|
138
|
+
])
|
|
139
|
+
]),
|
|
140
|
+
n[1] || (n[1] = t("div", { class: "card-hover-border card-hover-border--y" }, null, -1)),
|
|
141
|
+
n[2] || (n[2] = t("div", { class: "card-hover-border card-hover-border--x" }, null, -1))
|
|
142
|
+
])
|
|
143
|
+
], 8, X))), 128))
|
|
144
|
+
], 10, R),
|
|
145
|
+
V.value ? (r(), i("div", ae, [
|
|
146
|
+
t("button", {
|
|
147
|
+
type: "button",
|
|
148
|
+
class: "btn btn__load-more",
|
|
149
|
+
onClick: n[0] || (n[0] = (l) => c.value += y.value)
|
|
150
|
+
}, [
|
|
151
|
+
t("div", re, T(e.$t("btn.load_more")), 1),
|
|
152
|
+
n[3] || (n[3] = t("span", { class: "i i-load-more" }, null, -1))
|
|
153
|
+
])
|
|
154
|
+
])) : L("", !0)
|
|
155
|
+
], 2)
|
|
156
|
+
], 6);
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
export {
|
|
161
|
+
ue as default
|
|
162
|
+
};
|