@lazycatcloud/lzc-toolkit 0.0.174 → 0.0.175
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.es.js +4 -3
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/dialog/Dialog.vue.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -927,12 +927,13 @@ const en = Symbol(), tn = /* @__PURE__ */ G({
|
|
|
927
927
|
closeOnClickOverlay: { type: Boolean, default: !0 },
|
|
928
928
|
hiddenOverlay: { type: Boolean },
|
|
929
929
|
dialogClass: { default: "" },
|
|
930
|
-
modalClass: { default: "" }
|
|
930
|
+
modalClass: { default: "" },
|
|
931
|
+
onClickOverlay: null
|
|
931
932
|
},
|
|
932
933
|
emits: ["update:visiable"],
|
|
933
934
|
setup(e, { emit: t }) {
|
|
934
935
|
const o = e, n = () => {
|
|
935
|
-
o.closeOnClickOverlay && t("update:visiable", !1);
|
|
936
|
+
o.onClickOverlay?.(), o.closeOnClickOverlay && t("update:visiable", !1);
|
|
936
937
|
};
|
|
937
938
|
return F(en, () => t("update:visiable", !1)), (l, s) => (B(), Ie(Be, { name: "modal" }, {
|
|
938
939
|
default: Ue(() => [
|
|
@@ -960,7 +961,7 @@ const te = (e, t) => {
|
|
|
960
961
|
for (const [n, l] of t)
|
|
961
962
|
o[n] = l;
|
|
962
963
|
return o;
|
|
963
|
-
}, nn = /* @__PURE__ */ te(tn, [["__scopeId", "data-v-
|
|
964
|
+
}, nn = /* @__PURE__ */ te(tn, [["__scopeId", "data-v-3d61e60a"]]);
|
|
964
965
|
function jo(e) {
|
|
965
966
|
function t(o, n) {
|
|
966
967
|
const l = document.createElement("div"), s = {
|
package/dist/index.umd.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
z-index: 99999;
|
|
4
4
|
background-color: rgb(191 219 254);
|
|
5
5
|
opacity: 0.5;
|
|
6
|
-
}`,{id:"styletag_lzc_dragselect",manual:!0}),u=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"drag-select-box",style:f.value})}});function m(h){h.button===0&&(a(h.x,h.y),window.addEventListener("mousemove",M),window.addEventListener("mouseup",c))}function M(h){i(h.x,h.y)}function c(h){window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",c),h.composedPath().some(w=>w?.getAttribute?.(t.attribute))||r(),d()}function D(h){try{if(!n.init(h))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!n.containerEl?.value)return!1;e.render(e.h(u),n.containerEl.value),g(),n.containerEl.value?.addEventListener("scroll",s),n.containerEl.value?.addEventListener("mousedown",m)}catch(N){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",N)}}function p(){l.disconnect(),n.containerEl.value?.removeEventListener("scroll",s),n.containerEl.value?.removeEventListener("mousedown",m)}return{init:D,unMount:p}}function Mt(t,n,l=600){const o=Te({...t,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:s}=o,{onScroll:a,dragStart:i,dragMove:d,dragEnd:r}=o;let f;function g(){clearTimeout(f)}function u(p){g(),p.composedPath().some(N=>!!N?.getAttribute?.(t.attribute))&&(f=setTimeout(()=>{const{clientX:N,clientY:w}=p.targetTouches[0];i(N,w),n?.(),d(N,w,()=>p.preventDefault()),p.preventDefault()},l))}function m(p){g();const{clientX:h,clientY:N}=p.targetTouches[0];d(h,N,()=>p.preventDefault())}function M(){g(),r()}function c(p){try{if(!o.init(p))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!o.containerEl?.value)return!1;o.containerEl.value?.addEventListener("scroll",a),o.containerEl.value?.addEventListener("touchstart",u),o.containerEl.value?.addEventListener("touchmove",m),window.addEventListener("touchcancel",M),window.addEventListener("touchend",M)}catch(h){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",h)}}function D(){s.disconnect(),o.containerEl.value?.removeEventListener("scroll",a),o.containerEl.value?.removeEventListener("touchstart",u),o.containerEl.value?.removeEventListener("touchmove",m),window.removeEventListener("touchcancel",M),window.removeEventListener("touchEnd",M)}return{init:c,unMount:D}}const xe=Symbol(),gt=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},hiddenOverlay:{type:Boolean},dialogClass:{default:""},modalClass:{default:""}},emits:["update:visiable"],setup(t,{emit:n}){const l=t,o=()=>{l.closeOnClickOverlay&&n("update:visiable",!1)};return e.provide(xe,()=>n("update:visiable",!1)),(s,a)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([t.hiddenOverlay?"no-overlay-modal":"lzc-modal",t.modalClass])},[e.createElementVNode("div",{onMousedown:a[0]||(a[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["lzc-dialog",t.dialogClass])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],34)],2)),[[e.unref(ze),()=>o()]]):e.createCommentVNode("",!0)]),_:3}))}}),Un="",V=(t,n)=>{const l=t.__vccOpts||t;for(const[o,s]of n)l[o]=s;return l},mt=V(gt,[["__scopeId","data-v-
|
|
6
|
+
}`,{id:"styletag_lzc_dragselect",manual:!0}),u=e.defineComponent({render(){return e.h("div",{id:"selectBoxEl",class:"drag-select-box",style:f.value})}});function m(h){h.button===0&&(a(h.x,h.y),window.addEventListener("mousemove",M),window.addEventListener("mouseup",c))}function M(h){i(h.x,h.y)}function c(h){window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",c),h.composedPath().some(w=>w?.getAttribute?.(t.attribute))||r(),d()}function D(h){try{if(!n.init(h))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!n.containerEl?.value)return!1;e.render(e.h(u),n.containerEl.value),g(),n.containerEl.value?.addEventListener("scroll",s),n.containerEl.value?.addEventListener("mousedown",m)}catch(N){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",N)}}function p(){l.disconnect(),n.containerEl.value?.removeEventListener("scroll",s),n.containerEl.value?.removeEventListener("mousedown",m)}return{init:D,unMount:p}}function Mt(t,n,l=600){const o=Te({...t,selectWay:"row",scrollOptions:{startSpeed:5,maxSpeed:5}}),{observer:s}=o,{onScroll:a,dragStart:i,dragMove:d,dragEnd:r}=o;let f;function g(){clearTimeout(f)}function u(p){g(),p.composedPath().some(N=>!!N?.getAttribute?.(t.attribute))&&(f=setTimeout(()=>{const{clientX:N,clientY:w}=p.targetTouches[0];i(N,w),n?.(),d(N,w,()=>p.preventDefault()),p.preventDefault()},l))}function m(p){g();const{clientX:h,clientY:N}=p.targetTouches[0];d(h,N,()=>p.preventDefault())}function M(){g(),r()}function c(p){try{if(!o.init(p))throw"\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";if(!o.containerEl?.value)return!1;o.containerEl.value?.addEventListener("scroll",a),o.containerEl.value?.addEventListener("touchstart",u),o.containerEl.value?.addEventListener("touchmove",m),window.addEventListener("touchcancel",M),window.addEventListener("touchend",M)}catch(h){console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25",h)}}function D(){s.disconnect(),o.containerEl.value?.removeEventListener("scroll",a),o.containerEl.value?.removeEventListener("touchstart",u),o.containerEl.value?.removeEventListener("touchmove",m),window.removeEventListener("touchcancel",M),window.removeEventListener("touchEnd",M)}return{init:c,unMount:D}}const xe=Symbol(),gt=e.defineComponent({__name:"Dialog",props:{visiable:{type:Boolean,default:!1},closeOnClickOverlay:{type:Boolean,default:!0},hiddenOverlay:{type:Boolean},dialogClass:{default:""},modalClass:{default:""},onClickOverlay:null},emits:["update:visiable"],setup(t,{emit:n}){const l=t,o=()=>{l.onClickOverlay?.(),l.closeOnClickOverlay&&n("update:visiable",!1)};return e.provide(xe,()=>n("update:visiable",!1)),(s,a)=>(e.openBlock(),e.createBlock(e.Transition,{name:"modal"},{default:e.withCtx(()=>[t.visiable?e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([t.hiddenOverlay?"no-overlay-modal":"lzc-modal",t.modalClass])},[e.createElementVNode("div",{onMousedown:a[0]||(a[0]=e.withModifiers(()=>{},["stop"])),class:e.normalizeClass(["lzc-dialog",t.dialogClass])},[e.renderSlot(s.$slots,"default",{},void 0,!0)],34)],2)),[[e.unref(ze),()=>o()]]):e.createCommentVNode("",!0)]),_:3}))}}),Un="",V=(t,n)=>{const l=t.__vccOpts||t;for(const[o,s]of n)l[o]=s;return l},mt=V(gt,[["__scopeId","data-v-3d61e60a"]]);function ht(t){function n(l,o){const s=document.createElement("div"),a={setup(){return()=>e.h(mt,{visiable:!0,"onUpdate:visiable":()=>{s?.remove()},...t},{default:()=>e.h(l,o)})}};return document.body.appendChild(s),e.render(e.h(a),s),{close:()=>s?.remove()}}return{create:n}}function Ne({component:t,componentProps:n,delay:l=300}){const s=`lzc-delay-loading-${`${new Date().getTime()}`}`,a=`${l}ms`;return ye(`@keyframes lzcDelayLoad {
|
|
7
7
|
to {
|
|
8
8
|
opacity: 1;
|
|
9
9
|
}
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.no-overlay-modal[data-v-
|
|
1
|
+
.no-overlay-modal[data-v-3d61e60a]{position:absolute;inset:0;display:flex;z-index:999}.lzc-modal[data-v-3d61e60a]{position:absolute;inset:0;display:flex;z-index:999;background-color:#1c191780}.lzc-dialog[data-v-3d61e60a]{margin:auto;display:flex;flex-direction:column}.ldio-mm5gwljcryb[data-v-92a1804d]{width:100%;height:100%;position:relative;transform:translateZ(0) scale(1);backface-visibility:hidden;transform-origin:0 0}.ldio-mm5gwljcryb div[data-v-92a1804d]{box-sizing:content-box;position:absolute;top:50%;left:50%;width:var(--4e4a9ce4);height:var(--e56fe5c2);border:3px solid #dfdfdf;border-top-color:transparent;border-radius:50%;animation:ldio-mm5gwljcryb-92a1804d .7s linear infinite}@keyframes ldio-mm5gwljcryb-92a1804d{0%{transform:translate(-50%,-50%) rotate(0)}to{transform:translate(-50%,-50%) rotate(360deg)}}.loadingio-spinner-rolling-5kajof80q6w[data-v-92a1804d]{width:100%;height:100%;display:inline-block;overflow:hidden;background:#ffffff}.loading-wrap[data-v-3c54972f]{display:flex;align-items:center;justify-content:center;width:100%;transform:rotateY(180deg)}.loading-circle[data-v-3c54972f]{opacity:0;animation:loading-spin-3c54972f .8s var(--b1cf73a8) linear infinite}@keyframes loading-spin-3c54972f{0%{opacity:1}to{opacity:1;transform:rotate(-360deg)}}.lzc-loading-toast[data-v-0947d1e3]{display:flex;position:fixed;top:0;width:100%;height:100%;z-index:2147483647;box-sizing:border-box}.lzc-loading-toast-wrap[data-v-0947d1e3]{margin:auto;text-align:center;box-sizing:border-box}.lzc-loading-toast-content[data-v-0947d1e3]{display:flex;flex-direction:column;border-radius:8px;position:relative;pointer-events:auto;background-color:#000c;box-sizing:border-box}.lzc-loading-toast-content[data-v-0947d1e3]>:not([hidden])~:not([hidden]){margin-top:4px;margin-bottom:0}.lzc-loading-toast-close[data-v-0947d1e3]{height:10px;width:10px;position:absolute;right:12px;top:12px;cursor:pointer;box-sizing:border-box}.lzc-loading-toast-icon[data-v-0947d1e3]{width:35px;height:35px;margin:0 auto;border-radius:9999px;animation:lzc-spin-0947d1e3 1s linear infinite;box-sizing:border-box}.lzc-loading-toast-message[data-v-0947d1e3]{display:flex;flex-wrap:wrap;font-size:16px;color:#fff;margin-left:auto;margin-right:auto;box-sizing:border-box;white-space:pre-wrap;line-height:26px}@keyframes lzc-spin-0947d1e3{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes lzc-fade-in{0%{opacity:0}to{opacity:1}}.lzc-animate-fade-in{animation:lzc-fade-in 1s linear 1}.lzc-animate-duration-300{animation-duration:.3s}@keyframes lzc-fade-out{0%{opacity:1}to{opacity:0}}.lzc-animate-fade-out{animation:lzc-fade-out 1s linear 1}@keyframes slide-25d39b90{0%{opacity:1}to{opacity:0}}.animate-toastAnimation[data-v-25d39b90]{animation:slide-25d39b90 .3s linear}.v-leave-active[data-v-405c22cf]{transition:all .15s ease-out;transition-delay:.9s}.v-leave-to[data-v-405c22cf]{opacity:0}.slider-wrapper[data-v-405c22cf]{position:absolute;right:0;touch-action:none}.default-slider[data-v-405c22cf]{width:6px;height:100%;background-color:#0003;border-radius:3px;margin-right:3px}.pull-refresh[data-v-df5da876]{position:relative}.pull-refresh-box[data-v-df5da876]{position:absolute;display:flex;justify-content:center;width:100%;font-size:14px;color:#85898b99;text-align:center;z-index:500}.pull-arrow-circle[data-v-df5da876]{position:relative;width:30px;height:30px;border-radius:50%;background-color:#fff;display:flex;justify-content:center;align-items:center}.box-load[data-v-df5da876]{position:relative;width:18px;height:18px;border-radius:50%;overflow:hidden;animation:boxs-df5da876 3s infinite linear forwards}@keyframes boxs-df5da876{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.left-load[data-v-df5da876]{position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.left-circle[data-v-df5da876]{position:absolute;width:9px;height:18px;border-radius:18px 0 0 18px;transform:rotate(-180deg);transform-origin:9px 9px;animation:pr1A-df5da876 3s infinite linear forwards}@keyframes pr1A-df5da876{0%{transform:rotate(-180deg)}25%{transform:rotate(-180deg)}50%{transform:rotate(0)}75%{transform:rotate(0)}to{transform:rotate(180deg)}}.right-load[data-v-df5da876]{left:9px;position:absolute;width:50%;height:18px;background:#fff;overflow:hidden}.right-circle[data-v-df5da876]{position:absolute;width:9px;height:18px;border-radius:0 18px 18px 0;transform:rotate(-180deg);transform-origin:0px 9px;animation:pr2A-df5da876 3s infinite linear forwards}@keyframes pr2A-df5da876{0%{transform:rotate(-180deg)}25%{transform:rotate(0)}50%{transform:rotate(0)}75%{transform:rotate(180deg)}to{transform:rotate(180deg)}}.among-load[data-v-df5da876]{top:2px;left:2px;width:14px;height:14px;border-radius:50%;position:absolute;background:#fff;z-index:5;overflow:hidden}.pull-circle-line[data-v-df5da876]{position:relative;width:15px;height:15px;border-radius:50%;background-color:#fff;box-sizing:border-box;border-width:2px;border-style:solid;display:flex;align-items:center;justify-content:center}.pull-arrow[data-v-df5da876]{position:absolute;left:-3px;transform:rotate(120deg);background-color:#fff;width:4px;height:6px}.arrows[data-v-df5da876]{width:0;height:0;position:absolute;right:-4px;bottom:4px;transform:rotate(-30deg);border-bottom-width:6px;border-bottom-style:solid;border-right:6px solid transparent;transition:.5s;opacity:0}.opacity[data-v-df5da876]{opacity:1}.left-item[data-v-df5da876]{text-align:center;height:100px;line-height:100px;color:#333}.left-item-active[data-v-df5da876]{color:#e93b3d}.virtualList[data-v-dfe60586]{width:100%;height:100%;position:absolute;overflow-y:auto;scroll-behavior:smooth;user-select:none}.virtualListWrapper[data-v-dfe60586]{width:100%;height:100%;position:relative}@keyframes loading-rotate-33519afd{to{transform:rotate(360deg);-ms-transform:rotate(360deg);-moz-transform:rotate(360deg);-webkit-transform:rotate(360deg);-o-transform:rotate(360deg)}}.wrapper[data-v-33519afd]{width:100%;height:100%;border-radius:100%;background:conic-gradient(from .25turn at 50% 50%,rgba(255,255,255,0),240deg,#2ec1cc);position:absolute;top:0;animation:loading-rotate-33519afd var(--312487ac) linear infinite}.v-enter-active[data-v-044030a1],.v-leave-active[data-v-044030a1]{transition:opacity .6s ease}.v-enter-from[data-v-044030a1],.v-leave-to[data-v-044030a1]{opacity:0}.tip[data-v-044030a1]{font-size:14px;color:#aeaeae}.tip-wrap[data-v-044030a1]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}.no-support-icon[data-v-044030a1]{width:162px;height:134px;cursor:default}.bad-image[data-v-044030a1]{width:92px;height:92px;cursor:default}.src-class[data-v-044030a1]{width:unset!important;height:unset!important;max-width:none!important;max-height:none!important;transform:scale(0);opacity:.00001}@keyframes fadeIn-044030a1{0%{opacity:0}to{opacity:1}}.showing[data-v-044030a1]{animation:fadeIn-044030a1 .35s linear}img[data-v-044030a1]{user-select:none;pointer-events:none}img[data-v-5a7af152]{pointer-events:none}.icon-wrap[data-v-5a7af152]{display:flex;align-items:center;justify-content:center}.icon[data-v-5a7af152]{width:100%;height:100%}
|