y-design-ssr 1.1.7 → 1.1.9
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/libs/dialog/index.d.ts +9 -0
- package/libs/dialog/index.mjs +114 -107
- package/libs/dialog/index.umd.js +1 -1
- package/libs/dialog/src/dialog.d.ts +13 -0
- package/libs/index.mjs +2022 -1839
- package/libs/index.umd.js +1 -1
- package/libs/tab/index.mjs +244 -67
- package/libs/tab/index.umd.js +1 -1
- package/libs/tabs/index.mjs +502 -326
- package/libs/tabs/index.umd.js +2 -2
- package/libs/tabs/src/smoothscroll-polyfill.d.ts +6 -0
- package/package.json +2 -1
package/libs/dialog/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h.dialog={},h.Vue))})(this,function(h,e){"use strict";var _=document.createElement("style");_.textContent=`@charset "UTF-8";body,p,h1,h2,h3,h4,h5,h6,ul,dl,ol,dd,form,figure,blockquote{margin:0}ul,ol{list-style:none;padding:0}a{color:inherit;text-decoration:none;outline:none}em,cite,i{font-style:normal}input,textarea,select{font-family:inherit;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none}img{display:inline-block}p{word-break:break-all}main{display:block}table{border-spacing:0;border-collapse:collapse}body{color:var(--Surface);fill:currentColor;font-size:14px;line-height:1.5715;line-height:calc(1em + 8px);font-family:var(--Font_Family);-webkit-tap-highlight-color:var(--Click_Active);-webkit-font-smoothing:antialiased}button{line-height:inherit}button:focus{outline:none}.y-el--clickable{cursor:pointer}.y-el--clickable:active{opacity:.85}.y-el--hairline,.y-el--hairline-top,.y-el--hairline-right,.y-el--hairline-bottom,.y-el--hairline-left{position:relative}.y-el--hairline:after,.y-el--hairline-top:after,.y-el--hairline-right:after,.y-el--hairline-bottom:after,.y-el--hairline-left:after{position:absolute;-webkit-box-sizing:border-box;box-sizing:border-box;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid var(--Outline);-webkit-transform:scale(.5);transform:scale(.5)}.y-el--hairline-top:after{border-top-width:1px}.y-el--hairline-right:after{border-right-width:1px}.y-el--hairline-bottom:after{border-bottom-width:1px}.y-el--hairline-left:after{border-left-width:1px}.y-el--hairline:after{border-width:1px}.y-el--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.y-el--ellipsis-l2{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.y-el--ellipsis-l3{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}.y-el--unclickable{overflow:hidden}.y-el--unclickable *{pointer-events:none}@font-face{font-family:var(--Font_Family_Number);font-style:normal;font-weight:400;src:url(data:application/octet-stream;base64,AAEAAAAOAIAAAwBgT1MvMnvzdUwAAAFoAAAAYGNtYXAAcgDHAAAB7AAAAEhjdnQgAgMCAgAAEDwAAAAuZnBnbTkajnwAAAI0AAANbWdhc3AAAAAQAAAbJAAAAAhnbHlmglhSggAAEIgAAAfQaGVhZBLfe2YAAADsAAAANmhoZWEM1QNQAAABJAAAACRobXR4FRsDewAAAcgAAAAibG9jYQ6SDNIAABBsAAAAGm1heHACAw5FAAABSAAAACBuYW1lIdSxzwAAGFgAAAKNcG9zdP/IANgAABroAAAAOnByZXAWsXzsAAAPpAAAAJgAAQAAAAIAAPoiibxfDzz1AAcIAAAAAADXIFDsAAAAANdP4OEAKv5bBSgGQgABAAcAAgAAAAAAAAABAAAHgf4xAAAE0AAqAEkFKAABAAAAAAAAAAAAAAAAAAAABQABAAAADABuAAoAAAAAAAIAVgBoAIsAAAELDW0AAAAAAAMEkQGQAAUACAUzBMwAAACZBTMEzAAAAswAZgNyAAACCwUAAAAAAAAAAAAALwAAAAAAAAAAAAAAAFVLV04AIAAg/+UGMf5b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kusS4BFCstsEIssDkriiAgPLAEI0KKOCMgLkawAiVGsBFDWFAbUllYIDxZLrEuARQrsARDLrAuKy2wQyywABawBCWwBCYgICBGI0dhsAojQi5HI0cjYbAJQysjIDwgLiM4sS4BFCstsEQssQgEJUKwABawBCWwBCUgLkcjRyNhILAEI0KxCgBCsAlDKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7ACYiCwAFBYsEBgWWawAWNgILABKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwAmIgsABQWLBAYFlmsAFjYbACJUZhOCMgPCM4GyEgIEYjR7ABKyNhOCFZsS4BFCstsEUssQA4Ky6xLgEUKy2wRiyxADkrISMgIDywBCNCIzixLgEUK7AEQy6wListsEcssAAVIEewACNCsgABARUUEy6wNCotsEgssAAVIEewACNCsgABARUUEy6wNCotsEkssQABFBOwNSotsEossDcqLbBLLLAAFkUjIC4gRoojYTixLgEUKy2wTCywCCNCsEsrLbBNLLIAAEQrLbBOLLIAAUQrLbBPLLIBAEQrLbBQLLIBAUQrLbBRLLIAAEUrLbBSLLIAAUUrLbBTLLIBAEUrLbBULLIBAUUrLbBVLLMAAABBKy2wViyzAAEAQSstsFcsswEAAEErLbBYLLMBAQBBKy2wWSyzAAABQSstsFosswABAUErLbBbLLMBAAFBKy2wXCyzAQEBQSstsF0ssgAAQystsF4ssgABQystsF8ssgEAQystsGAssgEBQystsGEssgAARistsGIssgABRistsGMssgEARistsGQssgEBRistsGUsswAAAEIrLbBmLLMAAQBCKy2wZyyzAQAAQistsGgsswEBAEIrLbBpLLMAAAFCKy2waiyzAAEBQistsGssswEAAUIrLbBsLLMBAQFCKy2wbSyxADorLrEuARQrLbBuLLEAOiuwPistsG8ssQA6K7A/Ky2wcCywABaxADorsEArLbBxLLEBOiuwPistsHIssQE6K7A/Ky2wcyywABaxATorsEArLbB0LLEAOysusS4BFCstsHUssQA7K7A+Ky2wdiyxADsrsD8rLbB3LLEAOyuwQCstsHgssQE7K7A+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C4oAAAAABEA0gABAAAAAAAAAC0AAAABAAAAAAABAAsALQABAAAAAAACAAcAOAABAAAAAAADAB0APwABAAAAAAAEABMAXAABAAAAAAAFAA0AbwABAAAAAAAGABIAfAABAAAAAAAJAAMAjgADAAEECQAAAFoAkQADAAEECQABABYA6wADAAEECQACAAgBAQADAAEECQADADoBCQADAAEECQAEACYBQwADAAEECQAFABoBaQADAAEECQAGACQBgwADAAEECQAJAAYBpwADAAEECQARAA4BrUNvcHlyaWdodCCpIDIwMTcgYnkgWVVYLiBBbGwgcmlnaHRzIHJlc2VydmVkLll1ZXdlbiBGb250UmVndWxhcjIuMDAwO1VLV047WXVld2VuRm9udC1SZWd1bGFyWXVld2VuIEZvbnQgUmVndWxhclZlcnNpb24gMi4wMDBZdWV3ZW5Gb250LVJlZ3VsYXJZVVgAQwBvAHAAeQByAGkAZwBoAHQAIACpACAAMgAwADEANwAgAGIAeQAgAFkAVQBYAC4AIABBAGwAbAAgAHIAaQBnAGgAdABzACAAcgBlAHMAZQByAHYAZQBkAC4AWQB1AGUAdwBlAG4AIABGAG8AbgB0AEIAbwBsAGQAMgAuADAAMAAwADsAVQBLAFcATgA7AFkAdQBlAHcAZQBuAEYAbwBuAHQALQBSAGUAZwB1AGwAYQByAFkAdQBlAHcAZQBuACAARgBvAG4AdAAgAFIAZQBnAHUAbABhAHIAVgBlAHIAcwBpAG8AbgAgADIALgAwADAAMABZAHUAZQB3AGUAbgBGAG8AbgB0AC0AUgBlAGcAdQBsAGEAcgBZAFUAWABSAGUAZwB1AGwAYQByAAAAAAIAAAAAAAD/MwBmAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAA4AEwAUABUAFgAXABgAGgAbABkAHAAAAAEAAf//AA8=) format("truetype")}.y-font--number{font-family:var(--Font_Family_Number);speak:none;font-style:normal;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}@-webkit-keyframes y-keyframes--slide-bottom-enter{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes y-keyframes--slide-bottom-enter{0%{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes y-keyframes--slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes y-keyframes--slide-bottom-leave{to{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@-webkit-keyframes y-keyframes--slide-top-enter{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes y-keyframes--slide-top-enter{0%{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes y-keyframes--slide-top-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes y-keyframes--slide-top-leave{to{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@-webkit-keyframes y-keyframes--slide-left-enter{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes y-keyframes--slide-left-enter{0%{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes y-keyframes--slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes y-keyframes--slide-left-leave{to{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@-webkit-keyframes y-keyframes--slide-right-enter{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes y-keyframes--slide-right-enter{0%{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes y-keyframes--slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes y-keyframes--slide-right-leave{to{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@-webkit-keyframes y-keyframes--fade-enter{0%{opacity:0}to{opacity:1}}@keyframes y-keyframes--fade-enter{0%{opacity:0}to{opacity:1}}@-webkit-keyframes y-keyframes--fade-leave{0%{opacity:1}to{opacity:0}}@keyframes y-keyframes--fade-leave{0%{opacity:1}to{opacity:0}}@-webkit-keyframes y-keyframes--rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes y-keyframes--rotate{0%{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.y-animation--fade-enter-active{-webkit-animation:.3s y-keyframes--fade-enter both ease-out;animation:.3s y-keyframes--fade-enter both ease-out}.y-animation--fade-leave-active{-webkit-animation:.3s y-keyframes--fade-leave both ease-in;animation:.3s y-keyframes--fade-leave both ease-in}.y-animation--slide-bottom-enter-active{-webkit-animation:.3s y-keyframes--slide-bottom-enter both ease-out;animation:.3s y-keyframes--slide-bottom-enter both ease-out}.y-animation--slide-bottom-leave-active{-webkit-animation:.3s y-keyframes--slide-bottom-leave both ease-in;animation:.3s y-keyframes--slide-bottom-leave both ease-in}.y-animation--slide-top-enter-active{-webkit-animation:.3s y-keyframes--slide-top-enter both ease-out;animation:.3s y-keyframes--slide-top-enter both ease-out}.y-animation--slide-top-leave-active{-webkit-animation:.3s y-keyframes--slide-top-leave both ease-in;animation:.3s y-keyframes--slide-top-leave both ease-in}.y-animation--slide-left-enter-active{-webkit-animation:.3s y-keyframes--slide-left-enter both ease-out;animation:.3s y-keyframes--slide-left-enter both ease-out}.y-animation--slide-left-leave-active{-webkit-animation:.3s y-keyframes--slide-left-leave both ease-in;animation:.3s y-keyframes--slide-left-leave both ease-in}.y-animation--slide-right-enter-active{-webkit-animation:.3s y-keyframes--slide-right-enter both ease-out;animation:.3s y-keyframes--slide-right-enter both ease-out}.y-animation--slide-right-leave-active{-webkit-animation:.3s y-keyframes--slide-right-leave both ease-in;animation:.3s y-keyframes--slide-right-leave both ease-in}:root{--Primary: #68e38b;--Primary_1: #95f0ab;--Primary_2: #f0fff2;--Secondary: #5790df;--Secondary_1: #84b4f5;--Secondary_2: #edf1fc;--Surface: #191919;--Surface_1: #4c4c4c;--Surface_2: #808080;--Surface_3: #adadad;--Surface_4: #ccc;--Surface_5: #e0e0e0;--Surface_6: #ebebeb;--Surface_7: #f5f5f5;--Surface_8: #fff;--Background: #f5f5f5;--Background_1: #fff;--SheetBackground: #f5f5f5;--SheetBackground_1: #fff;--Outline: rgba(0, 0, 0, .08);--Segmentation: rgba(0, 0, 0, .04);--Overlay: rgba(0, 0, 0, .9);--Overlay_1: rgba(0, 0, 0, .6);--Overlay_2: rgba(0, 0, 0, .36);--Success: #40d76f;--Error: #e5353e;--Warn: #ff5e1a;--Warn_1: #ffe1d5;--Click_Active: rgba(0, 0, 0, .05);--Font_Family: PingFang SC, sans-serif;--Font_Family_Number: Yuewen Font}.y-mask{position:fixed;top:0;left:0;z-index:100;width:100%;height:100%;background-color:var(--Overlay_1)}.y-popup__content{position:fixed;max-height:100%;background-color:var(--Background_1);overflow:auto}.y-popup__content--center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.y-popup__content--bottom{bottom:0;left:0;width:100%}.y-popup__content--right{top:0;right:0}.y-popup__content--left{top:0;left:0}.y-popup__content--top{top:0;left:0;width:100%}@font-face{font-weight:400;font-family:y-icon;src:url(https://imgservices-1252317822.image.myqcloud.com/file/031920220182811/7cdace70.eot?cmrron);src:url(https://imgservices-1252317822.image.myqcloud.com/file/031920220182811/7cdace70.eot?cmrron#iefix) format("embedded-opentype"),url(https://imgservices-1252317822.image.myqcloud.com/file/031920220182811/d235a87c.ttf?cmrron) format("truetype"),url(https://imgservices-1252317822.image.myqcloud.com/file/031920220182811/a13b82e6.woff?cmrron) format("woff"),url(https://imgservices-1252317822.image.myqcloud.com/image/031920220182811/a73151ca.svg?cmrron#y-icon) format("svg");font-style:normal;font-display:block}.y-icon--warning:before{content:"\\e92a"}.y-icon--warning-o:before{content:"\\e929"}.y-icon--image-fail:before{content:"\\e924"}.y-icon--circle-arrow-left:before{content:"\\e920"}.y-icon--circle-arrow:before{content:"\\e921"}.y-icon--circle-arrow-up:before{content:"\\e922"}.y-icon--circle-arrow-down:before{content:"\\e923"}.y-icon--reward:before{content:"\\e900"}.y-icon--input-ban:before{content:"\\e901"}.y-icon--success:before{content:"\\e902"}.y-icon--crown:before{content:"\\e903"}.y-icon--gift:before{content:"\\e904"}.y-icon--clock:before{content:"\\e905"}.y-icon--cartoon:before{content:"\\e906"}.y-icon--boy:before{content:"\\e907"}.y-icon--chat:before{content:"\\e908"}.y-icon--file:before{content:"\\e909"}.y-icon--audio:before{content:"\\e90a"}.y-icon--img-bad:before{content:"\\e90b"}.y-icon--flower:before{content:"\\e90c"}.y-icon--circle-question:before{content:"\\e90d"}.y-icon--pause:before{content:"\\e90e"}.y-icon--pill-o:before{content:"\\e90f"}.y-icon--pill:before{content:"\\e910"}.y-icon--play:before{content:"\\e912"}.y-icon--play-o:before{content:"\\e913"}.y-icon--thumb-down-o:before{content:"\\e914"}.y-icon--thumb-down:before{content:"\\e915"}.y-icon--i-card:before{content:"\\e916"}.y-icon--input-ok:before{content:"\\e918"}.y-icon--close-o:before{content:"\\e919"}.y-icon--success-o:before{content:"\\e91a"}.y-icon--ok:before{content:"\\e91b"}.y-icon--no:before{content:"\\e91c"}.y-icon--jinhao:before{content:"\\e91d"}.y-icon--fire:before{content:"\\e91e"}.y-icon--add-book:before{content:"\\e91f"}.y-icon--speed:before{content:"\\e925"}.y-icon--chat-o:before{content:"\\e926"}.y-icon--dian:before{content:"\\e927"}.y-icon--qidian:before{content:"\\e928"}.y-icon--favorite:before{content:"\\e92e"}.y-icon--favorite-o:before{content:"\\e92f"}.y-icon--circle-pause:before{content:"\\e932"}.y-icon--retreat:before{content:"\\e933"}.y-icon--next:before{content:"\\e934"}.y-icon--heart-o:before{content:"\\e935"}.y-icon--heart:before{content:"\\e936"}.y-icon--circle-favorite:before{content:"\\e937"}.y-icon--cirle-pause:before{content:"\\e93b"}.y-icon--thumb-up-o:before{content:"\\e93c"}.y-icon--thumb-up:before{content:"\\e93d"}.y-icon--loading:before{content:"\\e93e"}.y-icon--at:before{content:"\\e93f"}.y-icon--bookmark:before{content:"\\e940"}.y-icon--mark:before{content:"\\e941"}.y-icon--undo:before{content:"\\e942"}.y-icon--local:before{content:"\\e943"}.y-icon--catalog:before{content:"\\e944"}.y-icon--share:before{content:"\\e945"}.y-icon--more:before{content:"\\e946"}.y-icon--more-2:before{content:"\\e947"}.y-icon--done:before{content:"\\e948"}.y-icon--shopping:before{content:"\\e949"}.y-icon--circle-close:before{content:"\\e94a"}.y-icon--cross:before{content:"\\e94b"}.y-icon--info:before{content:"\\e94c"}.y-icon--user-done:before{content:"\\e94d"}.y-icon--add-user:before{content:"\\e94e"}.y-icon--red-packet:before{content:"\\e94f"}.y-icon--exchange:before{content:"\\e950"}.y-icon--add-fav:before{content:"\\e952"}.y-icon--arrow:before{content:"\\e953"}.y-icon--arrow-down:before{content:"\\e911"}.y-icon--arrow-up:before{content:"\\e917"}.y-icon--arrow-left:before{content:"\\e954"}.y-icon--trophy:before{content:"\\e955"}.y-icon--rank:before{content:"\\e956"}.y-icon--ban:before{content:"\\e958"}.y-icon--clock-o:before{content:"\\e95a"}.y-icon--count-down:before{content:"\\e95b"}.y-icon--link:before{content:"\\e95c"}.y-icon--girl:before{content:"\\e95f"}.y-icon--sort:before{content:"\\e960"}.y-icon--cv:before{content:"\\e961"}.y-icon--download:before{content:"\\e962"}.y-icon--zoom-out:before{content:"\\e963"}.y-icon--restore:before{content:"\\e964"}.y-icon--filter:before{content:"\\e965"}.y-icon--filter-done:before{content:"\\e966"}.y-icon--trash:before{content:"\\e967"}.y-icon--slide-up:before{content:"\\e968"}.y-icon--quote:before{content:"\\e969"}.y-icon--setup:before{content:"\\e96a"}.y-icon--sort-flip:before{content:"\\e96b"}.y-icon--video:before{content:"\\e96c"}.y-icon--phone:before{content:"\\e96d"}.y-icon--book:before{content:"\\e96e"}.y-icon--refresh:before{content:"\\e96f"}.y-icon--mail:before{content:"\\e970"}.y-icon--search:before{content:"\\e971"}.y-icon--unlock:before{content:"\\e972"}.y-icon--lock:before{content:"\\e973"}.y-icon--lock-o:before{content:"\\e974"}.y-icon--notice-off:before{content:"\\e975"}.y-icon--notice-o:before{content:"\\e976"}.y-icon--add:before{content:"\\e978"}.y-icon--mute:before{content:"\\e97a"}.y-icon--sound:before{content:"\\e97b"}.y-icon--post:before{content:"\\e97c"}.y-icon--image:before{content:"\\e97d"}.y-icon--image-o:before{content:"\\e97e"}.y-icon--slide-down:before{content:"\\1f3b5"}.y-icon--restore1:before{content:"\\e980"}.y-icon--card:before{content:"\\e981"}.y-icon--circle-question-o:before{content:"\\e982"}.y-icon--user:before{content:"\\e983"}.y-icon--money:before{content:"\\e984"}.y-icon--voice:before{content:"\\e985"}.y-icon--ticket:before{content:"\\e986"}.y-icon--cloud:before{content:"\\e987"}.y-icon--reload:before{content:"\\e988"}.y-icon--transmit:before{content:"\\e989"}.y-icon--gif:before{content:"\\e98b"}.y-icon{position:relative;display:inline-block;font-family:y-icon,sans-serif!important;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;font-size:inherit;text-rendering:auto;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.y-icon__dot,.y-icon__badge{position:absolute;top:0;right:0;padding:0;height:8px;width:8px;-webkit-box-sizing:border-box;box-sizing:border-box;line-height:1;color:var(--Surface_8);font-weight:500;font-size:12px;text-align:center;background-color:var(--Primary);border-radius:100%;-webkit-transform-origin:100%;transform-origin:100%;-webkit-transform:scale(1) translate(50%,-50%);transform:scale(1) translate(50%,-50%)}.y-icon__badge{width:auto;height:auto;border-radius:16px;padding:2.4px 4.8px;-webkit-transform:scale(.85) translate(50%,-50%);transform:scale(.85) translate(50%,-50%)}.y-icon__node{display:inline-block;width:1em;height:1em}.y-icon__image{width:90%;height:90%;-o-object-fit:contain;object-fit:contain}.y-button{position:relative;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;font-weight:500;font-size:14px;margin:0;text-align:center;background:var(--Background_1);cursor:pointer;vertical-align:middle}.y-button:active:before{opacity:.1}.y-button--disabled{pointer-events:none}.y-button--disabled:before{display:none}.y-button--primary{background:var(--Primary);border:none;color:var(--Surface_8)}.y-button--primary_danger{background:var(--Warn);color:var(--Surface_8)}.y-button--primary_disabled{background:var(--Surface_6);color:var(--Surface_4);cursor:not-allowed}.y-button--secondary{background:var(--Primary_2);border:none;color:var(--Primary)}.y-button--secondary_danger{background:var(--Warn_1);color:var(--Warn)}.y-button--secondary_disabled{background:var(--Surface_6);color:var(--Surface_4);cursor:not-allowed}.y-button--tertiary{border:1px solid var(--Surface_4);color:var(--Surface)}.y-button--tertiary_danger{background:transparent;border:1px solid var(--Warn);color:var(--Warn)}.y-button--tertiary_disabled{border:1px solid var(--Surface_5);color:var(--Surface_4);cursor:not-allowed}.y-button--text{background:transparent;border:none;color:var(--Surface)}.y-button--text_danger{color:var(--Warn)}.y-button--text_disabled{color:var(--Surface_4);cursor:not-allowed}.y-button--link{background:transparent;border:none;color:var(--Secondary)}.y-button--link_danger{color:var(--Warn)}.y-button--link_disabled{color:var(--Surface_4);cursor:not-allowed}.y-button--large{font-size:16px;border-radius:24px;padding:0 16px;height:48px}.y-button--middle{font-size:14px;border-radius:20px;padding:0 16px;height:40px}.y-button--small{font-size:12px;border-radius:16px;padding:0 12px;height:32px}.y-button--mini{font-size:12px;border-radius:16px;padding:0 12px;height:28px}.y-button--shadow_low{-webkit-box-shadow:0 2px 8px rgba(64,215,111,.24);box-shadow:0 2px 8px #40d76f3d}.y-button--shadow_middle{-webkit-box-shadow:0 4px 16px rgba(64,215,111,.24);box-shadow:0 4px 16px #40d76f3d}.y-button--shadow_high{-webkit-box-shadow:0 6px 24px rgba(64,215,111,.24);box-shadow:0 6px 24px #40d76f3d}.y-button--square{border-radius:0}.y-button--semicircle{border-radius:12px}.y-button--block{display:block;width:100%}.y-button__content{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;height:100%}.y-button__content:before{content:" "}.y-button__subtext{font-size:12px;-webkit-transform:scale(.85);transform:scale(.85);-webkit-transform-origin:center;transform-origin:center;font-weight:400;line-height:1}.y-loading__wrap .y-button__content{display:none}.y-loading{font-weight:500}.y-loading--fixed{position:fixed}.y-loading--absolute{position:absolute}.y-loading--fixed,.y-loading--absolute{z-index:188;width:100%;height:100%;top:0;left:0}.y-loading__bg{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.y-loading__bg--fixed,.y-loading__bg--absolute{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.y-loading__icon-wrapper{display:inline-block;text-align:center}.y-loading__icon--forward{-webkit-animation:qd-loading__icon-circular 1.3s ease-in-out infinite;animation:qd-loading__icon-circular 1.3s ease-in-out infinite}.y-loading__icon--reverse{-webkit-animation:qd-loading__icon-circular--reverse 1.3s ease-in-out infinite;animation:qd-loading__icon-circular--reverse 1.3s ease-in-out infinite}.y-loading__icon{display:block;width:100%;height:100%}.y-loading__icon-circle{stroke:currentColor;stroke-linecap:round}.y-loading__icon-circle--absolute{stroke:var(--Surface_8)}.y-loading__text{white-space:nowrap}.y-loading__text--left{margin-right:8px}.y-loading__text--right{margin-left:8px}.y-loading__text--top{margin-bottom:8px}.y-loading__text--bottom{margin-top:8px}@-webkit-keyframes qd-loading__icon-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:100,150;stroke-dashoffset:-40}to{stroke-dasharray:100,150;stroke-dashoffset:-120}}@keyframes qd-loading__icon-circular{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:100,150;stroke-dashoffset:-40}to{stroke-dasharray:100,150;stroke-dashoffset:-120}}@-webkit-keyframes qd-loading__icon-circular--reverse{0%{stroke-dasharray:100,150;stroke-dashoffset:-120}50%{stroke-dasharray:100,150;stroke-dashoffset:-40}to{stroke-dasharray:1,200;stroke-dashoffset:0}}@keyframes qd-loading__icon-circular--reverse{0%{stroke-dasharray:100,150;stroke-dashoffset:-120}50%{stroke-dasharray:100,150;stroke-dashoffset:-40}to{stroke-dasharray:1,200;stroke-dashoffset:0}}.y-dialog{background:var(--Background_1);border-radius:20px;overflow:visible}.y-dialog__container{position:relative}.y-dialog__img--circle{position:absolute}.y-dialog__title{font-weight:500;font-size:18px;color:var(--Surface);text-align:center;padding:0 24px}.y-dialog__content{padding:24px}.y-dialog__message{font-weight:400;font-size:14px;color:var(--Surface_2)}.y-dialog__footer{display:-webkit-box;display:-ms-flexbox;display:flex}.y-dialog__footer-btn{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.y-dialog__footer-btn:nth-child(2){margin-left:12px}.y-dialog__close{position:absolute;left:50%;bottom:-72px;width:32px;height:32px;border-radius:100%;background:rgba(0,0,0,.4);-webkit-transform:translate(-50%,0%);transform:translate(-50%);cursor:pointer;font-size:22px;color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}
|
|
2
|
-
`,document.head.appendChild(_);const U=t=>o=>Object.prototype.toString.call(o)===`[object ${t}]`,$=U("Function"),q=U("Promise"),L=(t,o)=>o?typeof o=="string"?` ${t}--${o}`:Array.isArray(o)?o.reduce((a,r)=>a+L(t,r),""):Object.keys(o).reduce((a,r)=>a+(o[r]?L(t,r):""),""):"",X=t=>(o,a)=>{let r=o,s=a;return r&&typeof r!="string"&&(s=r,r=""),r=r?`${t}__${r}`:t,`${r}${L(r,s)}`},ee=()=>(t,o)=>o?`${L(`y-${t}`,o)}`:`y-${t}`,te={"pull-refresh":{pulling:"下拉刷新...",loosing:"释放刷新...",loading:"数据加载中...",success:"数据已更新",failed:"数据跟新失败,请稍后再试"},"form-item":{validateMessage:"请输入正确内容"}};e.ref("zh-CN"),e.reactive({"zh-CN":te});const C=t=>{const o=`y-${t}`;return[o,X(o),ee()]},g=t=>isNaN(Number(t))&&typeof t=="string"?t:`${t}px`,oe=t=>{switch(t){case"top":return"column-reverse";case"bottom":return"column";case"left":return"row-reverse";case"right":return"row";default:return"column"}},[Ae,ne,re]=C("mask"),ae={modelValue:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:null},duration:{type:Number,default:300},customClass:{type:String,default:""},customStyle:{type:Object,default:()=>({})},lockScroll:{type:Boolean,default:!0},onAfterLeave:{type:Function,default:null}},B=e.reactive([]);let V=0;const ie=e.defineComponent({name:Ae,props:ae,emits:["update:modelValue"],setup(t,{slots:o}){const a=e.ref("");e.onMounted(()=>{a.value=`mask${V}`,V+=1,r(t.modelValue,!0)}),e.onUnmounted(()=>{const n=B.findIndex(i=>i._id===a.value);n>=0&&B.splice(n,1)}),e.watch(()=>t.modelValue,n=>{r(n)});const r=(n,i)=>{n?(B.unshift({_id:a.value,_state:n}),B.length>1&&(B[1]._state=!1)):i||(B.splice(0,1),B.length>0&&(B[0]._state=!0))},s=()=>{let n=!1;for(let i=0;i<B.length;i++)B[i]._id===a.value&&(n=B[i]._state);return{_state:n}},d=n=>{const{lockScroll:i}=t;i&&(n.preventDefault(),n.stopPropagation())};return()=>{const{customClass:n,duration:i,zIndex:b,customStyle:m,onAfterLeave:y}=t,{_state:c}=s();return e.createVNode(e.Transition,{name:re("animation","fade"),onAfterLeave:y},{default:()=>{var A;return[e.withDirectives(e.createVNode("div",{style:{animationDuration:`${i}ms`,zIndex:b,...m},class:[ne(),n],onTouchmove:d},[(A=o.default)==null?void 0:A.call(o)]),[[e.vShow,c]])]}})}}});function E(t){const o=t;return o.install=a=>{const{name:r}=t;r&&a.component(r,t)},o}const De="",_e="",Ue="",Ve="",We="",Me="",W=E(ie),[se,M,G]=C("popup"),ce={modelValue:{type:Boolean,default:!1},position:{type:String,default:"center"},borderRadius:{type:[Number,String],default:""},customClass:{type:String,default:""},customStyle:{type:Object,default:()=>({})},maskCustomClass:{type:String,default:""},maskCustomStyle:{type:Object,default:()=>({})},teleport:{type:String,default:"body"},duration:{type:Number,default:300},isCloseOnClickMask:{type:Boolean,default:!0},onAfterLeave:{type:Function,default:null},lockScroll:{type:Boolean,default:!0},zIndex:{type:Number,default:100}},le=e.defineComponent({name:se,props:ce,emits:["clickMask","update:modelValue"],setup(t,{slots:o,emit:a}){const r=e.computed(()=>{const{position:n,borderRadius:i,customStyle:b,duration:m,zIndex:y}=t,c=g(i);let A="0";switch(n){case"top":A=` 0 0 ${c} ${c}`;break;case"bottom":A=`${c} ${c} 0 0`;break;case"left":A=`0 ${c} ${c} 0`;break;case"right":A=`${c} 0 0 ${c}`;break;default:A=`${c}`}return{borderRadius:A,animationDuration:`${m}ms`,...b,zIndex:y+1}}),s=n=>{a("clickMask",n),t.isCloseOnClickMask&&(d.value=!1)},d=e.computed({get:()=>t.modelValue,set:n=>a("update:modelValue",n)});return e.watch(()=>d.value,(n,i)=>{n!==i&&(n&&t.lockScroll?document.body.style.overflow="hidden":document.body.style.overflow="")}),()=>{const{teleport:n,position:i,customClass:b,duration:m,onAfterLeave:y,lockScroll:c,zIndex:A,maskCustomClass:f,maskCustomStyle:u}=t;return n?e.createVNode(e.Teleport,{to:n},{default:()=>[e.createVNode(W,{modelValue:d.value,"onUpdate:modelValue":l=>d.value=l,duration:m,lockScroll:c,onClick:s,onAfterLeave:y,zIndex:A,customClass:f,customStyle:u},null),e.createVNode(e.Transition,{name:G("animation",`slide-${i}`)},{default:()=>{var l;return[e.withDirectives(e.createVNode("div",{style:r.value,class:[M("content",{[i]:i}),b]},[((l=o.default)==null?void 0:l.call(o))||null]),[[e.vShow,d.value]])]}})]}):e.createVNode(e.Fragment,null,[e.createVNode(W,{modelValue:d.value,"onUpdate:modelValue":l=>d.value=l,duration:m,lockScroll:c,onClick:s,onAfterLeave:y,zIndex:A,customClass:f,customStyle:u},null),e.createVNode(e.Transition,{name:G("animation",`slide-${i}`)},{default:()=>{var l;return[e.withDirectives(e.createVNode("div",{style:r.value,class:[M("content",{[i]:i}),b]},[((l=o.default)==null?void 0:l.call(o))||null]),[[e.vShow,d.value]])]}})])}}}),Ge="",de=E(le),[fe,F]=C("icon"),ye=t=>new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(t.toLowerCase()),be=e.defineComponent({name:fe,props:{dot:{type:Boolean,default:!1},name:{type:String,default:""},size:{type:[Number,String],default:""},info:{type:[Number,String],default:""},badge:{type:[Number,String],default:""},color:{type:String,default:""},subColor:{type:String,default:""},subBg:{type:String,default:""},classPrefix:{type:String,default:"y-icon"},tag:{type:String,default:"i"}},emits:["click"],setup(t,{slots:o,emit:a}){const r=ye(t.name),s=()=>({fontSize:g(t.size),color:t.color}),d=n=>{a("click",n)};return()=>{const{name:n,classPrefix:i,badge:b,dot:m,subColor:y,subBg:c,tag:A}=t;return e.createVNode(A,{class:`${i}${r?"":` y-icon--${n}`}`,style:s(),onClick:d},{default:()=>{var f;return[r?e.createVNode("em",{class:F("node")},[e.createVNode("img",{class:F("image"),src:n,alt:"icon"},null)]):null,m?e.createVNode("em",{class:F("dot"),style:{backgroundColor:c}},null):null,b?e.createVNode("em",{class:F("badge"),style:{color:y,backgroundColor:c}},[b]):null,((f=o.default)==null?void 0:f.call(o))||null]}})}}}),ve="",ge=E(be),[me,x,ue]=C("button"),Be=e.defineComponent({name:me,props:{tag:{type:String,default:"button"},text:{type:String,default:""},type:{type:String,default:"primary"},size:{type:String,default:"middle"},disabled:{type:Boolean,default:!1},shadow:{type:String,default:""},square:{type:Boolean,default:!1},semicircle:{type:Boolean,default:!1},radius:{type:[Number,String],default:""},supplementText:{type:String,default:""},block:{type:Boolean,default:!1},danger:{type:Boolean,default:!1}},emits:["click"],setup(t,{slots:o,emit:a}){const r=s=>{a("click",s)};return()=>{let{tag:s}=t;const{radius:d,type:n,size:i,disabled:b,shadow:m,block:y,square:c,semicircle:A,danger:f,text:u,supplementText:l}=t,p=o.default?o.default():u;return s=n==="link"?"a":s,e.createVNode(s,{class:[x([n,i,{block:y,square:c,semicircle:A,disabled:b&&s==="a"},(n==="primary"||n==="secondary")&&m?`shadow_${m}`:"",f?`${n}_danger`:"",b?`${n}_disabled`:""]),ue("el","clickable")],style:{borderRadius:g(d)},disabled:b,onClick:r},{default:()=>{var k,S;return[e.createVNode("div",{class:x("content")},[((k=o.leftIcon)==null?void 0:k.call(o))||null,p&&e.createVNode(e.Fragment,null,[l?e.createVNode("div",{class:x("text")},[e.createVNode("p",null,[p]),e.createVNode("p",{class:x("subtext")},[l])]):e.createVNode("span",{class:x("text")},[p])]),((S=o.rightIcon)==null?void 0:S.call(o))||null])]}})}}}),Re="",v=E(Be),[we,I]=C("loading"),pe={color:{type:String,default:""},bgColor:{type:String,default:""},bgBorderRadius:{type:[Number,String],default:"16px"},thick:{type:[Number,String],default:8},direction:{type:String,default:"forward"},size:{type:[Number,String],default:"24px"},padding:{type:[Number,String],default:""},text:{type:String,default:""},textLocation:{type:String,default:"bottom"},textSize:{type:[Number,String],default:""},textColor:{type:String,default:""},position:{type:String,default:"relative"}},R=e.defineComponent({name:we,props:pe,setup(t,{slots:o}){return()=>{var l,p;const{position:a,textLocation:r,bgColor:s,bgBorderRadius:d,size:n,padding:i,color:b,thick:m,direction:y,text:c,textColor:A,textSize:f}=t,u=((l=o.default)==null?void 0:l.call(o))||c;return e.createVNode("div",{class:I({[a]:a!=="relative"})},[e.createVNode("div",{class:I("bg",{[a]:a!=="relative"}),style:{flexDirection:oe(r),backgroundColor:s,borderRadius:g(d),padding:g(i)}},[e.createVNode("span",{class:I("icon-wrapper"),style:{width:g(n),height:g(n)}},[((p=o.icon)==null?void 0:p.call(o))||e.createVNode("svg",{class:I("icon",{[y]:y}),viewBox:"25 25 50 50"},[e.createVNode("circle",{class:I("icon-circle"),style:{stroke:b,strokeWidth:g(m)},cx:"50",cy:"50",r:"20",fill:"none"},null)])]),u&&e.createVNode("span",{class:I("text",{[r]:r}),style:{color:A,fontSize:g(f)}},[u])])])}}}),he=(t,o)=>{const a={render:()=>e.h(R,{...t},{...o})},r=e.createApp(a),s=document.createElement("div");return r.mount(s)},j=(t,o)=>{o.value?(t.classList.add("y-loading__wrap"),t.appendChild(t.instance.$el)):(t.classList.remove("y-loading__wrap"),t.removeChild(t.instance.$el))},ke={getSSRProps:t=>({...t}),mounted:(t,o)=>{t.instance=he({...t.customProps},{...t.customSlots}),o.value&&j(t,o)},updated:(t,o)=>{o.oldValue!==o.value&&j(t,o)},unmounted:t=>{t.instance&&t.instance.$el.remove()}},je="";E(R);function Ce(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const[Ee,w]=C("dialog"),Ie={modelValue:{type:Boolean,default:!1},width:{type:[Number,String],default:288},title:{type:String,default:""},titleAlign:{type:String,default:"center"},message:{type:String,default:""},messageAlign:{type:String,default:"center"},isCloseOnClickMask:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!1},showCancelBtn:{type:Boolean,default:!1},cancelButtonText:{type:String,default:"取消"},showConfirmBtn:{type:Boolean,default:!1},confirmButtonText:{type:String,default:"确认"},beforeClose:{type:Function,default:null},callback:{type:Function,default:null},imgSrc:{type:String,default:null},circleImg:{type:Boolean,default:!1},teleport:{type:String,default:"body"}},K=e.defineComponent({name:Ee,directives:{loading:ke},props:Ie,emits:["update:modelValue","cancel","confirm"],setup(t,{emit:o,slots:a}){const r=e.reactive({cancel:!1,confirm:!1}),s=A=>{c.value=A},d=A=>{var f;s(!1),(f=t.callback)==null||f.call(t,A)},n=A=>{o("cancel",A,b("cancel"))},i=A=>{o("confirm",A,b("confirm"))},b=A=>{const{modelValue:f,beforeClose:u}=t;if(f)if($(u)){r[A]=!0;const l=u(A);q(l)?l.then(k=>{m(k,A)}).catch(k=>{throw new Error(k)}):m(l,A)}else d(A)},m=(A,f)=>{A&&d(f),r[f]=!1},y=(A,f,u)=>{let l=Number(A.substring(0,A.length-2));return l/=f||2,u?`${u(l)}px`:`${l}px`},c=e.computed({get:()=>t.modelValue,set:A=>o("update:modelValue",A)});return()=>{const{width:A,title:f,titleAlign:u,message:l,messageAlign:p,isCloseOnClickMask:k,showCloseIcon:S,showCancelBtn:z,cancelButtonText:D,showConfirmBtn:J,confirmButtonText:Se,imgSrc:O,circleImg:Q,teleport:Ye}=t;return e.createVNode(de,e.mergeProps({modelValue:c.value,"onUpdate:modelValue":Y=>c.value=Y,customClass:w(),customStyle:{width:g(A)}},{"onUpdate:modelValue":s},{isCloseOnClickMask:k,teleport:Ye}),{default:()=>{var Y,H,T,P;return[((Y=a.img)==null?void 0:Y.call(a))||O&&e.createVNode("div",{class:w("img",{circle:Q}),style:{top:Q?`-${y(g(A),4)}`:"auto",left:Q?`calc(50% - ${y(g(A),4)})`:"auto"}},[e.createVNode("div",{style:{width:Q?y(g(A)):g(A),height:y(g(A)),background:`url(${O}) center`,borderRadius:Q?"50%":"20px 20px 0 0"}},null)]),e.createVNode("div",{class:w("container")},[e.createVNode("div",{style:{height:Q?y(g(A),4,Ne=>Ne+20):"24px"}},null),((H=a.title)==null?void 0:H.call(a))||e.createVNode("div",{class:w("title"),style:{textAlign:u}},[f]),e.createVNode("div",{class:w("content")},[e.createVNode("div",{class:w("message"),style:{textAlign:p}},[((T=a.default)==null?void 0:T.call(a))||l]),((P=a.footer)==null?void 0:P.call(a))||e.createVNode("div",{class:w("footer"),style:{paddingTop:z||J?"20px":"0px"}},[z&&e.withDirectives(e.createVNode(v,{type:"secondary",class:w("footer-btn"),onClick:n},Ce(D)?D:{default:()=>[D]}),[[e.resolveDirective("loading"),r.cancel]]),J&&e.withDirectives(e.createVNode(v,{type:"primary",class:w("footer-btn"),onClick:i},{default:()=>[r.confirm?"":Se]}),[[e.resolveDirective("loading"),r.confirm]])])]),S&&e.createVNode("div",{class:w("close"),onClick:()=>d("close")},[e.createVNode(ge,{name:"cross"},null)])])]}})}}});let N=e.createApp({}),Qe=0;const Z=[],xe=(t,o)=>{const a=`dialog${Qe+=1}`,r={setup(){const d=e.ref(!0),n=i=>{d.value=i};return()=>e.h(K,{modelValue:d.value,"onUpdate:modelValue":n,...t,onAfterLeave:()=>{Le(a)}},{...o})}};N=e.createApp(r);const s=document.createElement("div");Z.push({id:a,app:N,el:s}),N.mount(s)},Le=t=>{Z.forEach(o=>{t===o.id&&o.app.unmount()})},Ke="",Fe=E(K);h.createDialog=xe,h.default=Fe,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2
|
+
`,document.head.appendChild(_);const U=t=>o=>Object.prototype.toString.call(o)===`[object ${t}]`,$=U("Function"),q=U("Promise"),L=(t,o)=>o?typeof o=="string"?` ${t}--${o}`:Array.isArray(o)?o.reduce((a,r)=>a+L(t,r),""):Object.keys(o).reduce((a,r)=>a+(o[r]?L(t,r):""),""):"",X=t=>(o,a)=>{let r=o,s=a;return r&&typeof r!="string"&&(s=r,r=""),r=r?`${t}__${r}`:t,`${r}${L(r,s)}`},ee=()=>(t,o)=>o?`${L(`y-${t}`,o)}`:`y-${t}`,te={"pull-refresh":{pulling:"下拉刷新...",loosing:"释放刷新...",loading:"数据加载中...",success:"数据已更新",failed:"数据跟新失败,请稍后再试"},"form-item":{validateMessage:"请输入正确内容"}};e.ref("zh-CN"),e.reactive({"zh-CN":te});const C=t=>{const o=`y-${t}`;return[o,X(o),ee()]},g=t=>isNaN(Number(t))&&typeof t=="string"?t:`${t}px`,oe=t=>{switch(t){case"top":return"column-reverse";case"bottom":return"column";case"left":return"row-reverse";case"right":return"row";default:return"column"}},[Ae,ne,re]=C("mask"),ae={modelValue:{type:Boolean,default:!1},zIndex:{type:[Number,String],default:null},duration:{type:Number,default:300},customClass:{type:String,default:""},customStyle:{type:Object,default:()=>({})},lockScroll:{type:Boolean,default:!0},onAfterLeave:{type:Function,default:null}},B=e.reactive([]);let V=0;const ie=e.defineComponent({name:Ae,props:ae,emits:["update:modelValue"],setup(t,{slots:o}){const a=e.ref("");e.onMounted(()=>{a.value=`mask${V}`,V+=1,r(t.modelValue,!0)}),e.onUnmounted(()=>{const n=B.findIndex(i=>i._id===a.value);n>=0&&B.splice(n,1)}),e.watch(()=>t.modelValue,n=>{r(n)});const r=(n,i)=>{n?(B.unshift({_id:a.value,_state:n}),B.length>1&&(B[1]._state=!1)):i||(B.splice(0,1),B.length>0&&(B[0]._state=!0))},s=()=>{let n=!1;for(let i=0;i<B.length;i++)B[i]._id===a.value&&(n=B[i]._state);return{_state:n}},d=n=>{const{lockScroll:i}=t;i&&(n.preventDefault(),n.stopPropagation())};return()=>{const{customClass:n,duration:i,zIndex:b,customStyle:u,onAfterLeave:y}=t,{_state:c}=s();return e.createVNode(e.Transition,{name:re("animation","fade"),onAfterLeave:y},{default:()=>{var A;return[e.withDirectives(e.createVNode("div",{style:{animationDuration:`${i}ms`,zIndex:b,...u},class:[ne(),n],onTouchmove:d},[(A=o.default)==null?void 0:A.call(o)]),[[e.vShow,c]])]}})}}});function E(t){const o=t;return o.install=a=>{const{name:r}=t;r&&a.component(r,t)},o}const _e="",Ue="",Ve="",We="",Me="",Ge="",W=E(ie),[se,M,G]=C("popup"),ce={modelValue:{type:Boolean,default:!1},position:{type:String,default:"center"},borderRadius:{type:[Number,String],default:""},customClass:{type:String,default:""},customStyle:{type:Object,default:()=>({})},maskCustomClass:{type:String,default:""},maskCustomStyle:{type:Object,default:()=>({})},teleport:{type:String,default:"body"},duration:{type:Number,default:300},isCloseOnClickMask:{type:Boolean,default:!0},onAfterLeave:{type:Function,default:null},lockScroll:{type:Boolean,default:!0},zIndex:{type:Number,default:100}},le=e.defineComponent({name:se,props:ce,emits:["clickMask","update:modelValue"],setup(t,{slots:o,emit:a}){const r=e.computed(()=>{const{position:n,borderRadius:i,customStyle:b,duration:u,zIndex:y}=t,c=g(i);let A="0";switch(n){case"top":A=` 0 0 ${c} ${c}`;break;case"bottom":A=`${c} ${c} 0 0`;break;case"left":A=`0 ${c} ${c} 0`;break;case"right":A=`${c} 0 0 ${c}`;break;default:A=`${c}`}return{borderRadius:A,animationDuration:`${u}ms`,...b,zIndex:y+1}}),s=n=>{a("clickMask",n),t.isCloseOnClickMask&&(d.value=!1)},d=e.computed({get:()=>t.modelValue,set:n=>a("update:modelValue",n)});return e.watch(()=>d.value,(n,i)=>{n!==i&&(n&&t.lockScroll?document.body.style.overflow="hidden":document.body.style.overflow="")}),()=>{const{teleport:n,position:i,customClass:b,duration:u,onAfterLeave:y,lockScroll:c,zIndex:A,maskCustomClass:f,maskCustomStyle:m}=t;return n?e.createVNode(e.Teleport,{to:n},{default:()=>[e.createVNode(W,{modelValue:d.value,"onUpdate:modelValue":l=>d.value=l,duration:u,lockScroll:c,onClick:s,onAfterLeave:y,zIndex:A,customClass:f,customStyle:m},null),e.createVNode(e.Transition,{name:G("animation",`slide-${i}`)},{default:()=>{var l;return[e.withDirectives(e.createVNode("div",{style:r.value,class:[M("content",{[i]:i}),b]},[((l=o.default)==null?void 0:l.call(o))||null]),[[e.vShow,d.value]])]}})]}):e.createVNode(e.Fragment,null,[e.createVNode(W,{modelValue:d.value,"onUpdate:modelValue":l=>d.value=l,duration:u,lockScroll:c,onClick:s,onAfterLeave:y,zIndex:A,customClass:f,customStyle:m},null),e.createVNode(e.Transition,{name:G("animation",`slide-${i}`)},{default:()=>{var l;return[e.withDirectives(e.createVNode("div",{style:r.value,class:[M("content",{[i]:i}),b]},[((l=o.default)==null?void 0:l.call(o))||null]),[[e.vShow,d.value]])]}})])}}}),ve="",de=E(le),[fe,F]=C("icon"),ye=t=>new RegExp(/\.(https|png|jpg|gif|jpeg|webp|apng)$/).test(t.toLowerCase()),be=e.defineComponent({name:fe,props:{dot:{type:Boolean,default:!1},name:{type:String,default:""},size:{type:[Number,String],default:""},info:{type:[Number,String],default:""},badge:{type:[Number,String],default:""},color:{type:String,default:""},subColor:{type:String,default:""},subBg:{type:String,default:""},classPrefix:{type:String,default:"y-icon"},tag:{type:String,default:"i"}},emits:["click"],setup(t,{slots:o,emit:a}){const r=ye(t.name),s=()=>({fontSize:g(t.size),color:t.color}),d=n=>{a("click",n)};return()=>{const{name:n,classPrefix:i,badge:b,dot:u,subColor:y,subBg:c,tag:A}=t;return e.createVNode(A,{class:`${i}${r?"":` y-icon--${n}`}`,style:s(),onClick:d},{default:()=>{var f;return[r?e.createVNode("em",{class:F("node")},[e.createVNode("img",{class:F("image"),src:n,alt:"icon"},null)]):null,u?e.createVNode("em",{class:F("dot"),style:{backgroundColor:c}},null):null,b?e.createVNode("em",{class:F("badge"),style:{color:y,backgroundColor:c}},[b]):null,((f=o.default)==null?void 0:f.call(o))||null]}})}}}),Re="",ge=E(be),[ue,x,me]=C("button"),Be=e.defineComponent({name:ue,props:{tag:{type:String,default:"button"},text:{type:String,default:""},type:{type:String,default:"primary"},size:{type:String,default:"middle"},disabled:{type:Boolean,default:!1},shadow:{type:String,default:""},square:{type:Boolean,default:!1},semicircle:{type:Boolean,default:!1},radius:{type:[Number,String],default:""},supplementText:{type:String,default:""},block:{type:Boolean,default:!1},danger:{type:Boolean,default:!1}},emits:["click"],setup(t,{slots:o,emit:a}){const r=s=>{a("click",s)};return()=>{let{tag:s}=t;const{radius:d,type:n,size:i,disabled:b,shadow:u,block:y,square:c,semicircle:A,danger:f,text:m,supplementText:l}=t,p=o.default?o.default():m;return s=n==="link"?"a":s,e.createVNode(s,{class:[x([n,i,{block:y,square:c,semicircle:A,disabled:b&&s==="a"},(n==="primary"||n==="secondary")&&u?`shadow_${u}`:"",f?`${n}_danger`:"",b?`${n}_disabled`:""]),me("el","clickable")],style:{borderRadius:g(d)},disabled:b,onClick:r},{default:()=>{var k,S;return[e.createVNode("div",{class:x("content")},[((k=o.leftIcon)==null?void 0:k.call(o))||null,p&&e.createVNode(e.Fragment,null,[l?e.createVNode("div",{class:x("text")},[e.createVNode("p",null,[p]),e.createVNode("p",{class:x("subtext")},[l])]):e.createVNode("span",{class:x("text")},[p])]),((S=o.rightIcon)==null?void 0:S.call(o))||null])]}})}}}),je="",v=E(Be),[we,I]=C("loading"),pe={color:{type:String,default:""},bgColor:{type:String,default:""},bgBorderRadius:{type:[Number,String],default:"16px"},thick:{type:[Number,String],default:8},direction:{type:String,default:"forward"},size:{type:[Number,String],default:"24px"},padding:{type:[Number,String],default:""},text:{type:String,default:""},textLocation:{type:String,default:"bottom"},textSize:{type:[Number,String],default:""},textColor:{type:String,default:""},position:{type:String,default:"relative"}},R=e.defineComponent({name:we,props:pe,setup(t,{slots:o}){return()=>{var l,p;const{position:a,textLocation:r,bgColor:s,bgBorderRadius:d,size:n,padding:i,color:b,thick:u,direction:y,text:c,textColor:A,textSize:f}=t,m=((l=o.default)==null?void 0:l.call(o))||c;return e.createVNode("div",{class:I({[a]:a!=="relative"})},[e.createVNode("div",{class:I("bg",{[a]:a!=="relative"}),style:{flexDirection:oe(r),backgroundColor:s,borderRadius:g(d),padding:g(i)}},[e.createVNode("span",{class:I("icon-wrapper"),style:{width:g(n),height:g(n)}},[((p=o.icon)==null?void 0:p.call(o))||e.createVNode("svg",{class:I("icon",{[y]:y}),viewBox:"25 25 50 50"},[e.createVNode("circle",{class:I("icon-circle"),style:{stroke:b,strokeWidth:g(u)},cx:"50",cy:"50",r:"20",fill:"none"},null)])]),m&&e.createVNode("span",{class:I("text",{[r]:r}),style:{color:A,fontSize:g(f)}},[m])])])}}}),he=(t,o)=>{const a={render:()=>e.h(R,{...t},{...o})},r=e.createApp(a),s=document.createElement("div");return r.mount(s)},j=(t,o)=>{o.value?(t.classList.add("y-loading__wrap"),t.appendChild(t.instance.$el)):(t.classList.remove("y-loading__wrap"),t.removeChild(t.instance.$el))},ke={getSSRProps:t=>({...t}),mounted:(t,o)=>{t.instance=he({...t.customProps},{...t.customSlots}),o.value&&j(t,o)},updated:(t,o)=>{o.oldValue!==o.value&&j(t,o)},unmounted:t=>{t.instance&&t.instance.$el.remove()}},Ke="";E(R);function Ce(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!e.isVNode(t)}const[Ee,w]=C("dialog"),Ie={modelValue:{type:Boolean,default:!1},width:{type:[Number,String],default:288},title:{type:String,default:""},titleAlign:{type:String,default:"center"},message:{type:String,default:""},messageAlign:{type:String,default:"center"},isCloseOnClickMask:{type:Boolean,default:!0},showCloseIcon:{type:Boolean,default:!1},showCancelBtn:{type:Boolean,default:!1},cancelButtonText:{type:String,default:"取消"},showConfirmBtn:{type:Boolean,default:!1},confirmButtonText:{type:String,default:"确认"},beforeClose:{type:Function,default:null},callback:{type:Function,default:null},imgSrc:{type:String,default:null},circleImg:{type:Boolean,default:!1},teleport:{type:String,default:"body"},duration:{type:Number,default:300}},K=e.defineComponent({name:Ee,directives:{loading:ke},props:Ie,emits:["update:modelValue","cancel","confirm"],setup(t,{emit:o,slots:a}){const r=e.reactive({cancel:!1,confirm:!1}),s=A=>{c.value=A},d=A=>{var f;s(!1),(f=t.callback)==null||f.call(t,A)},n=A=>{o("cancel",A,b("cancel"))},i=A=>{o("confirm",A,b("confirm"))},b=A=>{const{modelValue:f,beforeClose:m}=t;if(f)if($(m)){r[A]=!0;const l=m(A);q(l)?l.then(k=>{u(k,A)}).catch(k=>{throw new Error(k)}):u(l,A)}else d(A)},u=(A,f)=>{A&&d(f),r[f]=!1},y=(A,f,m)=>{let l=Number(A.substring(0,A.length-2));return l/=f||2,m?`${m(l)}px`:`${l}px`},c=e.computed({get:()=>t.modelValue,set:A=>o("update:modelValue",A)});return()=>{const{width:A,title:f,titleAlign:m,message:l,messageAlign:p,isCloseOnClickMask:k,showCloseIcon:S,showCancelBtn:z,cancelButtonText:D,showConfirmBtn:J,confirmButtonText:Se,imgSrc:O,circleImg:Q,teleport:Ye,duration:Ne}=t;return e.createVNode(de,e.mergeProps({modelValue:c.value,"onUpdate:modelValue":Y=>c.value=Y,customClass:w(),customStyle:{width:g(A)}},{"onUpdate:modelValue":s},{isCloseOnClickMask:k,teleport:Ye,duration:Ne}),{default:()=>{var Y,H,T,P;return[((Y=a.img)==null?void 0:Y.call(a))||O&&e.createVNode("div",{class:w("img",{circle:Q}),style:{top:Q?`-${y(g(A),4)}`:"auto",left:Q?`calc(50% - ${y(g(A),4)})`:"auto"}},[e.createVNode("div",{style:{width:Q?y(g(A)):g(A),height:y(g(A)),background:`url(${O}) center`,borderRadius:Q?"50%":"20px 20px 0 0"}},null)]),e.createVNode("div",{class:w("container")},[e.createVNode("div",{style:{height:Q?y(g(A),4,De=>De+20):"24px"}},null),((H=a.title)==null?void 0:H.call(a))||e.createVNode("div",{class:w("title"),style:{textAlign:m}},[f]),e.createVNode("div",{class:w("content")},[e.createVNode("div",{class:w("message"),style:{textAlign:p}},[((T=a.default)==null?void 0:T.call(a))||l]),((P=a.footer)==null?void 0:P.call(a))||e.createVNode("div",{class:w("footer"),style:{paddingTop:z||J?"20px":"0px"}},[z&&e.withDirectives(e.createVNode(v,{type:"secondary",class:w("footer-btn"),onClick:n},Ce(D)?D:{default:()=>[D]}),[[e.resolveDirective("loading"),r.cancel]]),J&&e.withDirectives(e.createVNode(v,{type:"primary",class:w("footer-btn"),onClick:i},{default:()=>[r.confirm?"":Se]}),[[e.resolveDirective("loading"),r.confirm]])])]),S&&e.createVNode("div",{class:w("close"),onClick:()=>d("close")},[e.createVNode(ge,{name:"cross"},null)])])]}})}}});let N=e.createApp({}),Qe=0;const Z=[],xe=(t,o)=>{const a=`dialog${Qe+=1}`,r={setup(){const d=e.ref(!0),n=i=>{d.value=i};return()=>e.h(K,{modelValue:d.value,"onUpdate:modelValue":n,...t,onAfterLeave:()=>{Le(a)}},{...o})}};N=e.createApp(r);const s=document.createElement("div");Z.push({id:a,app:N,el:s}),N.mount(s)},Le=t=>{Z.forEach(o=>{t===o.id&&o.app.unmount()})},Ze="",Fe=E(K);h.createDialog=xe,h.default=Fe,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -69,6 +69,10 @@ declare const _props: {
|
|
|
69
69
|
type: StringConstructor;
|
|
70
70
|
default: string;
|
|
71
71
|
};
|
|
72
|
+
duration: {
|
|
73
|
+
type: NumberConstructor;
|
|
74
|
+
default: number;
|
|
75
|
+
};
|
|
72
76
|
};
|
|
73
77
|
export type DialogPropsType = ExtractPropTypes<typeof _props>;
|
|
74
78
|
declare const _default: import("vue").DefineComponent<{
|
|
@@ -140,6 +144,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
140
144
|
type: StringConstructor;
|
|
141
145
|
default: string;
|
|
142
146
|
};
|
|
147
|
+
duration: {
|
|
148
|
+
type: NumberConstructor;
|
|
149
|
+
default: number;
|
|
150
|
+
};
|
|
143
151
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, "update:modelValue" | "cancel" | "confirm", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<ExtractPropTypes<{
|
|
144
152
|
modelValue: {
|
|
145
153
|
type: BooleanConstructor;
|
|
@@ -209,8 +217,13 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
209
217
|
type: StringConstructor;
|
|
210
218
|
default: string;
|
|
211
219
|
};
|
|
220
|
+
duration: {
|
|
221
|
+
type: NumberConstructor;
|
|
222
|
+
default: number;
|
|
223
|
+
};
|
|
212
224
|
}>>, {
|
|
213
225
|
title: string;
|
|
226
|
+
duration: number;
|
|
214
227
|
modelValue: boolean;
|
|
215
228
|
message: string;
|
|
216
229
|
teleport: string;
|