@lazycatcloud/lzc-toolkit 0.0.173 → 0.0.174
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 -4
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -853,13 +853,13 @@ function zo(e) {
|
|
|
853
853
|
}
|
|
854
854
|
});
|
|
855
855
|
function M(g) {
|
|
856
|
-
g.button === 0 && s(g.x, g.y);
|
|
856
|
+
g.button === 0 && (s(g.x, g.y), window.addEventListener("mousemove", f), window.addEventListener("mouseup", u));
|
|
857
857
|
}
|
|
858
858
|
function f(g) {
|
|
859
859
|
a(g.x, g.y);
|
|
860
860
|
}
|
|
861
861
|
function u(g) {
|
|
862
|
-
g.composedPath().some((w) => w?.getAttribute?.(e.attribute)) || i(), c();
|
|
862
|
+
window.removeEventListener("mousemove", f), window.removeEventListener("mouseup", u), g.composedPath().some((w) => w?.getAttribute?.(e.attribute)) || i(), c();
|
|
863
863
|
}
|
|
864
864
|
function p(g) {
|
|
865
865
|
try {
|
|
@@ -867,13 +867,13 @@ function zo(e) {
|
|
|
867
867
|
throw "\u521D\u59CB\u5316\u5931\u8D25,Ref\u5143\u7D20\u4E0D\u6B63\u786E";
|
|
868
868
|
if (!t.containerEl?.value)
|
|
869
869
|
return !1;
|
|
870
|
-
ye(ie(r), t.containerEl.value), v(), t.containerEl.value?.addEventListener("scroll", l), t.containerEl.value?.addEventListener("mousedown", M)
|
|
870
|
+
ye(ie(r), t.containerEl.value), v(), t.containerEl.value?.addEventListener("scroll", l), t.containerEl.value?.addEventListener("mousedown", M);
|
|
871
871
|
} catch (T) {
|
|
872
872
|
console.error("\u62D6\u9009\u529F\u80FD\u521D\u59CB\u5316\u5931\u8D25", T);
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
function m() {
|
|
876
|
-
o.disconnect(), t.containerEl.value?.removeEventListener("scroll", l), t.containerEl.value?.removeEventListener("mousedown", M)
|
|
876
|
+
o.disconnect(), t.containerEl.value?.removeEventListener("scroll", l), t.containerEl.value?.removeEventListener("mousedown", M);
|
|
877
877
|
}
|
|
878
878
|
return { init: p, unMount: m };
|
|
879
879
|
}
|
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)}function M(h){i(h.x,h.y)}function c(h){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)
|
|
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-783a5618"]]);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
|
}
|