@gx-design-vue/image 0.1.2 → 0.2.0-alpha.0
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/LICENSE +21 -0
- package/README.md +71 -7
- package/dist/GImage.d.ts +162 -0
- package/dist/GImage.js +221 -0
- package/dist/ImagePreview/Operations.d.ts +83 -0
- package/dist/ImagePreview/Operations.js +71 -0
- package/dist/ImagePreview/hooks/getFixScaleEleTransPosition.d.ts +19 -0
- package/dist/ImagePreview/hooks/getFixScaleEleTransPosition.js +40 -0
- package/dist/ImagePreview/hooks/useImageTransform.d.ts +39 -0
- package/dist/ImagePreview/hooks/useImageTransform.js +105 -0
- package/dist/ImagePreview/hooks/useMouseEvent.d.ts +14 -0
- package/dist/ImagePreview/hooks/useMouseEvent.js +100 -0
- package/dist/ImagePreview/hooks/useTouchEvent.d.ts +12 -0
- package/dist/ImagePreview/hooks/useTouchEvent.js +123 -0
- package/dist/ImagePreview/index.d.ts +162 -0
- package/dist/ImagePreview/index.js +303 -0
- package/dist/ImagePreview/props.d.ts +88 -0
- package/dist/ImagePreview/props.js +53 -0
- package/dist/ImagePreview/style.d.ts +30 -0
- package/dist/ImagePreview/style.js +286 -0
- package/dist/ImagePreview/typings.d.ts +19 -0
- package/dist/ImagePreview/typings.js +1 -0
- package/dist/ImagePreview/utils/KeyCode.d.ts +438 -0
- package/dist/ImagePreview/utils/KeyCode.js +173 -0
- package/dist/ImagePreview/utils/addEventListener.d.ts +6 -0
- package/dist/ImagePreview/utils/addEventListener.js +22 -0
- package/dist/ImagePreview/utils/util.d.ts +7 -0
- package/dist/ImagePreview/utils/util.js +8 -0
- package/dist/hooks/useFrameSetState.d.ts +5 -0
- package/dist/hooks/useFrameSetState.js +33 -0
- package/dist/image.esm.js +2374 -0
- package/dist/image.js +1 -0
- package/dist/index.d.ts +5 -7
- package/dist/index.js +6 -0
- package/dist/props.d.ts +82 -77
- package/dist/props.js +66 -0
- package/dist/slots.d.ts +6 -0
- package/dist/slots.js +21 -0
- package/dist/style.d.ts +9 -0
- package/dist/style.js +78 -0
- package/dist/typings.d.ts +6 -0
- package/dist/typings.js +1 -0
- package/dist/utils/aria.d.ts +14 -11
- package/dist/utils/aria.js +16 -0
- package/dist/utils/util.d.ts +4 -0
- package/dist/utils/util.js +8 -0
- package/global.d.ts +8 -0
- package/package.json +57 -60
- package/dist/Image.d.ts +0 -130
- package/dist/components/ImageViewer.d.ts +0 -59
- package/dist/components/ImageViewerGroup.d.ts +0 -14
- package/dist/design/config.less +0 -2
- package/dist/image.es.js +0 -801
- package/dist/image.umd.js +0 -1
- package/dist/style.css +0 -1
- package/dist/style.less +0 -177
package/dist/image.umd.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(v,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("@ant-design/icons-vue"),require("@gx-design-vue/pro-utils"),require("@gx-design-vue/pro-hooks"),require("vue-types"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["exports","vue","@ant-design/icons-vue","@gx-design-vue/pro-utils","@gx-design-vue/pro-hooks","vue-types","@vueuse/core"],e):(v=typeof globalThis!="undefined"?globalThis:v||self,e(v.GImage={},v.vue,v.iconsVue,v.proUtils,v.proHooks,v.vueTypes,v.core))})(this,function(v,e,O,w,J,oe,W){"use strict";var de="",ue="",Q=oe.createTypes({func:void 0,bool:void 0,string:void 0,number:void 0,array:void 0,object:void 0,integer:void 0});Q.extend([{name:"looseBool",getter:!0,type:Boolean,default:void 0},{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VueNode",getter:!0,type:null}]);var H=Q;const j={appendToBody:{type:Boolean,default:!1},hideOnClickModal:{type:Boolean,default:!0},src:{type:String,default:""},fit:{type:String,default:""},lazy:H.bool,scrollContainer:{type:[String,Object]},placeholder:{type:[Function,Object],default:()=>{}},fallback:{type:[Function,Object],default:()=>{}},onError:{type:Function},onClick:{type:Function},disablePreview:H.bool,previewSrcList:{type:Array,default:()=>[]},width:H.number,height:H.number,zIndex:{type:Number,default:2e3}},re={urlList:{type:Array,default:()=>[]},zIndex:j.zIndex,initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},onHideOnClickModal:j.hideOnClickModal},T={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace"},R=function(t,l,u,N=!1){t&&l&&u&&t.addEventListener(l,u,N)},q=function(t,l,u,N=!1){t&&l&&u&&t.removeEventListener(l,u,N)},A={CONTAIN:{name:"contain",icon:e.createVNode(O.ExpandOutlined,null,null)},ORIGINAL:{name:"original",icon:e.createVNode(O.OneToOneOutlined,null,null)}},U=function(){return!w.isServer&&!!window.navigator.userAgent.match(/firefox/i)}()?"DOMMouseScroll":"mousewheel";function B(t){let l=!1;return function(...u){l||(l=!0,window.requestAnimationFrame(()=>{t.apply(this,u),l=!1}))}}const X=e.defineComponent({props:re,emits:["close","switch"],setup:function(t,{emit:l}){let u=null,N=null,b=null;const r=w.getPrefixCls({suffixCls:"image-viewer"}),f=e.ref(!0),h=e.ref(t.initialIndex),I=e.ref(null),x=e.ref(null),p=e.ref(A.CONTAIN),i=e.ref({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),c=e.computed(()=>{const{urlList:a}=t;return a.length<=1}),d=e.computed(()=>h.value===0),m=e.computed(()=>h.value===t.urlList.length-1),k=e.computed(()=>t.urlList[h.value]),S=e.ref("viewer-fade-enter-active"),E=e.computed(()=>{const{scale:a,deg:y,offsetX:n,offsetY:o,enableTransition:s}=i.value,g={transform:`scale(${a}) rotate(${y}deg)`,transition:s?"transform .3s":"",marginLeft:`${n}px`,marginTop:`${o}px`};return p.value.name===A.CONTAIN.name&&(g.maxWidth=g.maxHeight="100%"),g}),z=()=>{Z(),setTimeout(()=>{l("close")},200)},L=()=>{S.value="viewer-fade-enter-active",u=B(a=>{switch(a.code){case T.esc:z();break;case T.space:D();break;case T.left:G();break;case T.up:C("zoomIn");break;case T.right:Y();break;case T.down:C("zoomOut");break}}),N=B(a=>{(a.wheelDelta?a.wheelDelta:-a.detail)>0?C("zoomIn",{zoomRate:.015,enableTransition:!1}):C("zoomOut",{zoomRate:.015,enableTransition:!1})}),R(document,"keydown",u),R(document,U,N)},Z=()=>{S.value="viewer-fade-leave-active",q(document,"keydown",u),q(document,U,N),u=null,N=null},F=()=>{f.value=!1},_=a=>{f.value=!1,a.target.alt="\u52A0\u8F7D\u5931\u8D25"},P=a=>{if(f.value||a.button!==0)return;const{offsetX:y,offsetY:n}=i.value,o=a.pageX,s=a.pageY;b=B(g=>{i.value={...i.value,offsetX:y+g.pageX-o,offsetY:n+g.pageY-s}}),R(document,"mousemove",b),R(document,"mouseup",()=>{q(document,"mousemove",b)}),a.preventDefault()},M=()=>{i.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}},D=()=>{if(f.value)return;const a=Object.keys(A),y=Object.values(A),n=p.value.name,s=(y.findIndex(g=>g.name===n)+1)%a.length;p.value=A[a[s]],M()},G=()=>{if(d.value&&!t.infinite)return;const a=t.urlList.length;h.value=(h.value-1+a)%a},Y=()=>{if(m.value&&!t.infinite)return;const a=t.urlList.length;h.value=(h.value+1)%a},C=(a,y={})=>{if(f.value)return;const{zoomRate:n,rotateDeg:o,enableTransition:s}={zoomRate:.2,rotateDeg:90,enableTransition:!0,...y};switch(a){case"zoomOut":i.value.scale>.2&&(i.value.scale=parseFloat((i.value.scale-n).toFixed(3)));break;case"zoomIn":i.value.scale=parseFloat((i.value.scale+n).toFixed(3));break;case"clocelise":i.value.deg+=o;break;case"anticlocelise":i.value.deg-=o;break}i.value.enableTransition=s};return e.watch(k,()=>{e.nextTick(()=>{x.value.complete||(f.value=!0)})}),e.watch(h,a=>{M(),l("switch",a)}),J.onMountedOrActivated(()=>{var a,y;L(),(y=(a=I.value)==null?void 0:a.focus)==null||y.call(a)}),()=>e.createVNode("div",{ref:a=>I.value=a,tabindex:1,class:[`${r}-wrapper`,`${S.value}`],style:{zIndex:t.zIndex}},[e.createVNode("div",{class:`${r}-mask`,onClick:()=>t.onHideOnClickModal&&z()},null),e.createVNode("span",{class:[`${r}-btn`,`${r}-close`],onClick:()=>z()},[e.createVNode(O.CloseOutlined,null,null)]),!c.value&&e.createVNode(e.Fragment,null,[e.createVNode("span",{class:{[`${r}-btn`]:!0,[`${r}-prev`]:!0,["is-disabled"]:!t.infinite&&d.value},onClick:()=>G()},[e.createVNode(O.LeftOutlined,null,null)]),e.createVNode("span",{class:{[`${r}-btn`]:!0,[`${r}-next`]:!0,["is-disabled"]:!t.infinite&&d.value},onClick:()=>Y()},[e.createVNode(O.RightOutlined,null,null)])]),e.createVNode("div",{class:[`${r}-btn`,`${r}-actions`]},[e.createVNode("div",{class:`${r}-actions-inner`},[e.createVNode(O.ZoomOutOutlined,{onClick:()=>C("zoomOut")},null),e.createVNode(O.ZoomInOutlined,{onClick:()=>C("zoomIn")},null),e.createVNode("i",{class:`${r}-actions-divider`},null),e.createVNode("i",{onClick:()=>D()},[p.value.icon]),e.createVNode("i",{class:`${r}-actions-divider`},null),e.createVNode(O.RotateLeftOutlined,{onClick:()=>C("anticlocelise")},null),e.createVNode(O.RotateRightOutlined,{onClick:()=>C("clocelise")},null)])]),f.value&&e.createVNode("div",{class:`${r}-canvas`},[e.createVNode(e.resolveComponent("a-spin"),{indicator:e.createVNode(O.LoadingOutlined,{style:{color:"#fff",fontSize:"40px"}},null)},null)]),e.createVNode("div",{class:`${r}-canvas`},[t.urlList.map((a,y)=>e.createVNode("img",{ref:n=>x.value=n,class:`${r}-img`,key:a,style:{...E.value,display:y===h.value?"block":"none"},src:a,onLoad:()=>F(),onError:n=>_(n),onMousedown:n=>P(n)},null))])])}});function ie(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}let ee="";const ce=e.defineComponent({props:{hideOnClickModal:j.hideOnClickModal},setup(t,{slots:l}){const u=w.getPrefixCls({suffixCls:"image-viewer-group"}),N=e.ref(!1),b=e.ref(""),r=e.computed(()=>{var c,d,m,k,S;return((c=l.default)==null?void 0:c.call(l).length)===1&&(String((d=l.default)==null?void 0:d.call(l)[0].type)===String(Symbol("Fragment"))||String((m=l.default)==null?void 0:m.call(l)[0].type)===String(Symbol()))?((k=l.default)==null?void 0:k.call(l)[0].children)||[]:((S=l.default)==null?void 0:S.call(l))||[]}),f=e.computed(()=>r.value.filter(m=>I(m)).map(m=>m.props.src).filter(m=>m)||[]),h=e.computed(()=>Array.isArray(f.value)&&f.value.length>0),I=c=>c&&c.type&&(c.type.isGImage||c.type.name==="GImage"),x=()=>{let c=0;const d=f.value.findIndex(m=>m===b.value);return d>=0&&(c=d),c},p=c=>{!h.value||!c||(b.value=c,ee=document.body.style.overflow,document.body.style.overflow="hidden",N.value=!0)},i=()=>{document.body.style.overflow=ee,N.value=!1};return()=>{let c;return e.createVNode("div",{class:`${u}`},[e.createVNode(e.resolveComponent("a-space"),{size:15},ie(c=r.value.map((d,m)=>I(d)?e.createVNode("div",{key:m,class:`${u}-item`,onClick:()=>{var k;return p(((k=d.props)==null?void 0:k.src)||"")}},[e.cloneVNode(d,{disablePreview:!0})]):null))?c:{default:()=>[c]}),e.createVNode(e.Teleport,{to:"body"},{default:()=>[h.value&&N.value&&e.createVNode(X,{initialIndex:x(),urlList:f.value,onHideOnClickModal:t.hideOnClickModal,onClose:()=>i()},null)]})])}}}),se=t=>t&&t.nodeType===Node.ELEMENT_NODE,te=()=>document.documentElement.style.objectFit!==void 0;let ne="";const V={NONE:"none",CONTAIN:"contain",COVER:"cover",FILL:"fill",SCALE_DOWN:"scale-down"},$=e.defineComponent({props:j,name:"GImage",inheritAttrs:!1,emits:["error","click"],setup(t,{slots:l,emit:u,attrs:N}){const b=w.getPrefixCls({suffixCls:"image"}),r=e.ref(!1),f=e.ref(!0),h=e.ref(0),I=e.ref(0),x=e.ref(!1),p=e.ref(null),i=e.ref();let c,d;const m=e.computed(()=>({width:t.width?`${t.width}px`:void 0,height:t.height?`${t.height}px`:void 0})),k=e.computed(()=>{const{fit:n}=t;return!w.isServer&&n?te()?{"object-fit":n,...m.value}:{...Z(n),...m.value}:m.value}),S=e.computed(()=>{const{fit:n}=t;return!w.isServer&&!te()&&n!==V.FILL}),E=e.computed(()=>{const{previewSrcList:n}=t;return Array.isArray(n)&&n.length>0}),z=e.computed(()=>{const{src:n,previewSrcList:o}=t;let s=0;const g=o.indexOf(n);return g>=0&&(s=g),s}),L=e.computed(()=>N),Z=n=>{const o=t.width||h.value,s=t.height||I.value;if(!p.value)return{};const{clientWidth:g,clientHeight:K}=p.value;if(!o||!s||!g||!K)return{};const ae=o/s,le=g/K;switch(n===V.SCALE_DOWN&&(n=o<g&&s<K?V.NONE:V.CONTAIN),n){case V.NONE:return{width:"auto",height:"auto"};case V.CONTAIN:return ae<le?{width:"auto"}:{height:"auto"};case V.COVER:return ae<le?{height:"auto"}:{width:"auto"};default:return{}}},F=()=>{if(w.isServer)return;const n=L.value;f.value=!0,r.value=!1;const o=new Image;o.onload=s=>G(s,o),o.onerror=Y,Object.keys(n).forEach(s=>{if(s.toLowerCase()==="onload")return;const g=n[s];o.setAttribute(s,g)}),o.src=t.src};function _(){w.isInContainer(p.value,i.value)&&(F(),D())}const P=W.useThrottleFn(_,200),M=async()=>{var o;if(w.isServer)return;await e.nextTick();const{scrollContainer:n}=t;se(n)?i.value=n:w.isString(n)&&n!==""?i.value=(o=document.querySelector(n))!=null?o:void 0:p.value&&(i.value=w.getScrollContainer(p.value)),i.value&&(c=W.useEventListener(i,"scroll",P),setTimeout(()=>_(),200))},D=()=>{w.isServer||!i.value||!P||(c(),i.value=void 0)},G=(n,o)=>{h.value=o.width,I.value=o.height,f.value=!1,r.value=!1},Y=n=>{f.value=!1,r.value=!0,u("error",n)},C=n=>{if(!!n.ctrlKey){if(n.deltaY<0)return n.preventDefault(),!1;if(n.deltaY>0)return n.preventDefault(),!1}},a=()=>{!E.value||t.disablePreview||(d=W.useEventListener("wheel",C,{passive:!1}),ne=document.body.style.overflow,document.body.style.overflow="hidden",x.value=!0)},y=()=>{d==null||d(),document.body.style.overflow=ne,x.value=!1};return e.watch(()=>t.src,()=>{t.lazy?(f.value=!0,r.value=!1,D(),M()):F()}),J.onMountedOrActivated(()=>{t.lazy?M():F()}),()=>{const n=w.getSlotVNode(l,t,"fallback"),o=w.getSlotVNode(l,t,"placeholder");return e.createVNode(e.Fragment,null,[e.createVNode("div",{class:{[`${b}`]:!0,[`${L.value.class}`]:L.value.class},ref:s=>p.value=s,style:{...L.value.style||{},display:t.lazy?"block":void 0},onClick:()=>{u("click")}},[f.value?o||e.createVNode("div",{class:`${b}-placeholder`},null):r.value?n||e.createVNode("div",{class:`${b}-error`},[e.createTextVNode("\u52A0\u8F7D\u5931\u8D25")]):e.createVNode("img",e.mergeProps({class:{[`${b}-inner`]:!0,[`${b}-inner-center`]:S.value,[`${b}-preview`]:E.value}},L.value,{src:t.src,style:k.value,onClick:()=>a()}),null),e.createVNode(e.Teleport,{to:"body",disabled:!t.appendToBody},{default:()=>[E.value&&x.value&&e.createVNode(X,{zIndex:t.zIndex,initialIndex:z.value,urlList:t.previewSrcList,onHideOnClickModal:t.hideOnClickModal,onClose:()=>y()},null)]})])])}}});$.isWImage=!0,$.install=t=>(t.component($.name,$),t),v.GImage=$,v.ImageViewer=X,v.ImageViewerGroup=ce,v.default=$,Object.defineProperties(v,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.gx-image{position:relative;display:inline-flex;overflow:hidden}.gx-image-inner{width:100%;height:100%;vertical-align:top}.gx-image-inner.gx-image-inner-center{position:relative;top:50%;left:50%;display:block;transform:translate(-50%,-50%)}.gx-image-placeholder{width:100%;height:100%;background:#f5f7fa}.gx-image-error{display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:14px;color:#c0c4cc;vertical-align:middle;background:#f5f7fa}.gx-image-preview,.gx-image-viewer-group-item{cursor:pointer}.gx-image-viewer-wrapper{position:fixed;top:0;right:0;bottom:0;left:0}.gx-image-viewer-mask{position:absolute;top:0;left:0;width:100%;height:100%;background:#000;opacity:.5}.gx-image-viewer-btn{position:absolute;z-index:1;box-sizing:border-box;display:flex;align-items:center;justify-content:center;cursor:pointer;user-select:none;border-radius:50%;opacity:.8}.gx-image-viewer-close{top:40px;right:40px;width:40px;height:40px;font-size:40px;width:44px;height:44px;font-size:24px;color:#fff;background-color:#606266;border-color:#fff}.gx-image-viewer-canvas{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.gx-image-viewer-actions{bottom:30px;left:50%;width:282px;height:44px;padding:0 23px;background-color:#606266;border-color:#fff;border-radius:22px;transform:translate(-50%)}.gx-image-viewer-actions-inner{display:flex;align-items:center;justify-content:space-around;width:100%;height:100%;font-size:23px;color:#fff;text-align:justify;cursor:default}.gx-image-viewer-prev{top:50%;left:40px;transform:translateY(-50%);width:44px;height:44px;font-size:24px;color:#fff;background-color:#606266;border-color:#fff}.gx-image-viewer-next{top:50%;right:40px;text-indent:2px;transform:translateY(-50%);width:44px;height:44px;font-size:24px;color:#fff;background-color:#606266;border-color:#fff}.viewer-fade-enter-active{animation:viewer-fade-in .3s}.viewer-fade-leave-active{animation:viewer-fade-out .3s}@keyframes viewer-fade-in{0%{opacity:0;transform:translate3d(0,-20px,0)}to{opacity:1;transform:translateZ(0)}}@keyframes viewer-fade-out{0%{opacity:1;transform:translateZ(0)}to{opacity:0;transform:translate3d(0,-20px,0)}}
|
package/dist/style.less
DELETED
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
@import './design/config.less';
|
|
2
|
-
|
|
3
|
-
.size() {
|
|
4
|
-
width: 100%;
|
|
5
|
-
height: 100%;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.op-icon() {
|
|
9
|
-
width: 44px;
|
|
10
|
-
height: 44px;
|
|
11
|
-
font-size: 24px;
|
|
12
|
-
color: #fff;
|
|
13
|
-
background-color: #606266;
|
|
14
|
-
border-color: #fff;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.@{gx-prefix}-image {
|
|
18
|
-
position: relative;
|
|
19
|
-
display: inline-flex;
|
|
20
|
-
overflow: hidden;
|
|
21
|
-
|
|
22
|
-
&-inner {
|
|
23
|
-
.size();
|
|
24
|
-
vertical-align: top;
|
|
25
|
-
|
|
26
|
-
&.gx-image-inner-center {
|
|
27
|
-
position: relative;
|
|
28
|
-
top: 50%;
|
|
29
|
-
left: 50%;
|
|
30
|
-
display: block;
|
|
31
|
-
transform: translate(-50%, -50%);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
&-placeholder {
|
|
36
|
-
.size();
|
|
37
|
-
background: #f5f7fa;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&-error {
|
|
41
|
-
display: flex;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
.size();
|
|
45
|
-
font-size: 14px;
|
|
46
|
-
color: #c0c4cc;
|
|
47
|
-
vertical-align: middle;
|
|
48
|
-
background: #f5f7fa;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&-preview {
|
|
52
|
-
cursor: pointer;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.@{gx-prefix}-image-viewer {
|
|
57
|
-
&-group-item {
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&-wrapper {
|
|
62
|
-
position: fixed;
|
|
63
|
-
top: 0;
|
|
64
|
-
right: 0;
|
|
65
|
-
bottom: 0;
|
|
66
|
-
left: 0;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&-mask {
|
|
70
|
-
position: absolute;
|
|
71
|
-
top: 0;
|
|
72
|
-
left: 0;
|
|
73
|
-
width: 100%;
|
|
74
|
-
height: 100%;
|
|
75
|
-
background: #000;
|
|
76
|
-
opacity: 0.5;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
&-btn {
|
|
80
|
-
position: absolute;
|
|
81
|
-
z-index: 1;
|
|
82
|
-
box-sizing: border-box;
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
justify-content: center;
|
|
86
|
-
cursor: pointer;
|
|
87
|
-
user-select: none;
|
|
88
|
-
border-radius: 50%;
|
|
89
|
-
opacity: 0.8;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
&-close {
|
|
93
|
-
top: 40px;
|
|
94
|
-
right: 40px;
|
|
95
|
-
width: 40px;
|
|
96
|
-
height: 40px;
|
|
97
|
-
font-size: 40px;
|
|
98
|
-
.op-icon();
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
&-canvas {
|
|
102
|
-
display: flex;
|
|
103
|
-
align-items: center;
|
|
104
|
-
justify-content: center;
|
|
105
|
-
width: 100%;
|
|
106
|
-
height: 100%;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
&-actions {
|
|
110
|
-
bottom: 30px;
|
|
111
|
-
left: 50%;
|
|
112
|
-
width: 282px;
|
|
113
|
-
height: 44px;
|
|
114
|
-
padding: 0 23px;
|
|
115
|
-
background-color: #606266;
|
|
116
|
-
border-color: #fff;
|
|
117
|
-
border-radius: 22px;
|
|
118
|
-
transform: translateX(-50%);
|
|
119
|
-
|
|
120
|
-
&-inner {
|
|
121
|
-
display: flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
justify-content: space-around;
|
|
124
|
-
width: 100%;
|
|
125
|
-
height: 100%;
|
|
126
|
-
font-size: 23px;
|
|
127
|
-
color: #fff;
|
|
128
|
-
text-align: justify;
|
|
129
|
-
cursor: default;
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
&-prev {
|
|
134
|
-
top: 50%;
|
|
135
|
-
left: 40px;
|
|
136
|
-
transform: translateY(-50%);
|
|
137
|
-
.op-icon();
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
&-next {
|
|
141
|
-
top: 50%;
|
|
142
|
-
right: 40px;
|
|
143
|
-
text-indent: 2px;
|
|
144
|
-
transform: translateY(-50%);
|
|
145
|
-
.op-icon();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.viewer-fade-enter-active {
|
|
150
|
-
animation: viewer-fade-in 0.3s;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.viewer-fade-leave-active {
|
|
154
|
-
animation: viewer-fade-out 0.3s;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
@keyframes viewer-fade-in {
|
|
158
|
-
0% {
|
|
159
|
-
opacity: 0;
|
|
160
|
-
transform: translate3d(0, -20px, 0);
|
|
161
|
-
}
|
|
162
|
-
100% {
|
|
163
|
-
opacity: 1;
|
|
164
|
-
transform: translate3d(0, 0, 0);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
@keyframes viewer-fade-out {
|
|
169
|
-
0% {
|
|
170
|
-
opacity: 1;
|
|
171
|
-
transform: translate3d(0, 0, 0);
|
|
172
|
-
}
|
|
173
|
-
100% {
|
|
174
|
-
opacity: 0;
|
|
175
|
-
transform: translate3d(0, -20px, 0);
|
|
176
|
-
}
|
|
177
|
-
}
|