Skip to content

Commit bb3c55c

Browse files
committed
chore: build
1 parent 74096b2 commit bb3c55c

File tree

11 files changed

+91
-27
lines changed

11 files changed

+91
-27
lines changed

packages/playground/uts/nativeplugins/test-uniplugin/ios/src/TestModuleImpl.uts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import "Foundation";
12
//
23
// TestModuleImpl.swift
34
// libWeex

packages/playground/uts/unpackage/nativeplugins/test-uniplugin-ios/ios/src/TestModuleImpl.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
import Foundation;
12
@objcMembers
23
class TestModuleImpl : NSObject {
3-
func testAsyncFunc(option: NSDictionary, callback: UniModuleKeepAliveCallback) {
4+
func testAsyncFunc(_ option: NSDictionary, _ callback: UniModuleKeepAliveCallback) {
45
console.log(option);
56
callback("success", false);
67
}
7-
func testSyncFunc(option: NSDictionary) -> String {
8+
func testSyncFunc(_ option: NSDictionary) -> String {
89
console.log(option);
910
return "";
1011
}

packages/uni-app-plus/dist/uni-app-view.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uni-h5/dist/uni-h5.cjs.js

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -613,13 +613,23 @@ function useHover(props2) {
613613
});
614614
}
615615
function onTouchstartPassive(evt) {
616-
if (evt._hoverPropagationStopped) {
616+
if (evt.touches.length > 1) {
617617
return;
618618
}
619-
if (!props2.hoverClass || props2.hoverClass === "none" || props2.disabled) {
619+
handleHoverStart(evt);
620+
}
621+
function onMousedown(evt) {
622+
if (hoverTouch) {
620623
return;
621624
}
622-
if (evt.touches.length > 1) {
625+
handleHoverStart(evt);
626+
window.addEventListener("mouseup", handlePCHoverEnd);
627+
}
628+
function handleHoverStart(evt) {
629+
if (evt._hoverPropagationStopped) {
630+
return;
631+
}
632+
if (!props2.hoverClass || props2.hoverClass === "none" || props2.disabled) {
623633
return;
624634
}
625635
if (props2.hoverStopPropagation) {
@@ -634,11 +644,24 @@ function useHover(props2) {
634644
}, parseInt(props2.hoverStartTime));
635645
}
636646
function onTouchend() {
647+
handleHoverEnd();
648+
}
649+
function onMouseup() {
650+
if (!hoverTouch) {
651+
return;
652+
}
653+
handlePCHoverEnd();
654+
}
655+
function handleHoverEnd() {
637656
hoverTouch = false;
638657
if (hovering.value) {
639658
hoverReset();
640659
}
641660
}
661+
function handlePCHoverEnd() {
662+
handleHoverEnd();
663+
window.removeEventListener("mouseup", handlePCHoverEnd);
664+
}
642665
function onTouchcancel() {
643666
hoverTouch = false;
644667
hovering.value = false;
@@ -648,7 +671,9 @@ function useHover(props2) {
648671
hovering,
649672
binding: {
650673
onTouchstartPassive,
674+
onMousedown,
651675
onTouchend,
676+
onMouseup,
652677
onTouchcancel
653678
}
654679
};
@@ -4023,6 +4048,9 @@ function useMovableViewState(props2, trigger, rootRef) {
40234048
vue.watch(ySync, (val) => {
40244049
_setY(val);
40254050
});
4051+
vue.watch(() => props2.disabled, () => {
4052+
__handleTouchStart();
4053+
});
40264054
vue.watch(() => props2.scaleValue, (val) => {
40274055
scaleValueSync.value = Number(val) || 0;
40284056
});
@@ -4080,6 +4108,18 @@ function useMovableViewState(props2, trigger, rootRef) {
40804108
_updateScale(scale, true);
40814109
return scale;
40824110
}
4111+
function __handleTouchStart() {
4112+
{
4113+
if (!props2.disabled) {
4114+
FAandSFACancel();
4115+
if (xMove.value)
4116+
;
4117+
if (yMove.value)
4118+
;
4119+
rootRef.value.style.willChange = "transform";
4120+
}
4121+
}
4122+
}
40834123
function _getLimitXY(x, y) {
40844124
let outOfBounds = false;
40854125
if (x > maxX.value) {
@@ -4390,14 +4430,15 @@ var index$t = /* @__PURE__ */ defineBuiltInComponent({
43904430
return vue.createVNode("a", {
43914431
"class": "navigator-wrap",
43924432
"href": url,
4393-
"onClick": onEventPrevent
4433+
"onClick": onEventPrevent,
4434+
"onMousedown": onEventPrevent
43944435
}, [vue.createVNode("uni-navigator", vue.mergeProps({
43954436
"class": hasHoverClass && hovering.value ? hoverClass : ""
43964437
}, hasHoverClass && binding, vm ? vm.attrs : {}, {
43974438
[__scopeId]: ""
43984439
}, {
43994440
"onClick": onClick
4400-
}), [slots.default && slots.default()], 16, ["onClick"])], 8, ["href", "onClick"]);
4441+
}), [slots.default && slots.default()], 16, ["onClick"])], 40, ["href", "onClick", "onMousedown"]);
44014442
};
44024443
}
44034444
});

packages/uni-h5/dist/uni-h5.es.js

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1688,13 +1688,23 @@ function useHover(props2) {
16881688
});
16891689
}
16901690
function onTouchstartPassive(evt) {
1691-
if (evt._hoverPropagationStopped) {
1691+
if (evt.touches.length > 1) {
16921692
return;
16931693
}
1694-
if (!props2.hoverClass || props2.hoverClass === "none" || props2.disabled) {
1694+
handleHoverStart(evt);
1695+
}
1696+
function onMousedown(evt) {
1697+
if (hoverTouch) {
16951698
return;
16961699
}
1697-
if (evt.touches.length > 1) {
1700+
handleHoverStart(evt);
1701+
window.addEventListener("mouseup", handlePCHoverEnd);
1702+
}
1703+
function handleHoverStart(evt) {
1704+
if (evt._hoverPropagationStopped) {
1705+
return;
1706+
}
1707+
if (!props2.hoverClass || props2.hoverClass === "none" || props2.disabled) {
16981708
return;
16991709
}
17001710
if (props2.hoverStopPropagation) {
@@ -1709,11 +1719,24 @@ function useHover(props2) {
17091719
}, parseInt(props2.hoverStartTime));
17101720
}
17111721
function onTouchend() {
1722+
handleHoverEnd();
1723+
}
1724+
function onMouseup() {
1725+
if (!hoverTouch) {
1726+
return;
1727+
}
1728+
handlePCHoverEnd();
1729+
}
1730+
function handleHoverEnd() {
17121731
hoverTouch = false;
17131732
if (hovering.value) {
17141733
hoverReset();
17151734
}
17161735
}
1736+
function handlePCHoverEnd() {
1737+
handleHoverEnd();
1738+
window.removeEventListener("mouseup", handlePCHoverEnd);
1739+
}
17171740
function onTouchcancel() {
17181741
hoverTouch = false;
17191742
hovering.value = false;
@@ -1723,7 +1746,9 @@ function useHover(props2) {
17231746
hovering,
17241747
binding: {
17251748
onTouchstartPassive,
1749+
onMousedown,
17261750
onTouchend,
1751+
onMouseup,
17271752
onTouchcancel
17281753
}
17291754
};
@@ -9742,6 +9767,9 @@ function useMovableViewState(props2, trigger, rootRef) {
97429767
watch(ySync, (val) => {
97439768
_setY(val);
97449769
});
9770+
watch(() => props2.disabled, () => {
9771+
__handleTouchStart();
9772+
});
97459773
watch(() => props2.scaleValue, (val) => {
97469774
scaleValueSync.value = Number(val) || 0;
97479775
});
@@ -10305,14 +10333,15 @@ var index$q = /* @__PURE__ */ defineBuiltInComponent({
1030510333
return createVNode("a", {
1030610334
"class": "navigator-wrap",
1030710335
"href": url,
10308-
"onClick": onEventPrevent
10336+
"onClick": onEventPrevent,
10337+
"onMousedown": onEventPrevent
1030910338
}, [createVNode("uni-navigator", mergeProps({
1031010339
"class": hasHoverClass && hovering.value ? hoverClass : ""
1031110340
}, hasHoverClass && binding, vm ? vm.attrs : {}, {
1031210341
[__scopeId]: ""
1031310342
}, {
1031410343
"onClick": onClick
10315-
}), [slots.default && slots.default()], 16, ["onClick"])], 8, ["href", "onClick"]);
10344+
}), [slots.default && slots.default()], 16, ["onClick"])], 40, ["href", "onClick", "onMousedown"]);
1031610345
};
1031710346
}
1031810347
});
16.1 KB
Binary file not shown.
24 Bytes
Binary file not shown.
2 KB
Binary file not shown.
7.5 KB
Binary file not shown.

packages/uts/src/index.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ function resolveSrcDir(target: UtsTarget, dir: string) {
103103
return path.join(dir, UtsTargetDirs[target] + '/src')
104104
}
105105

106-
function initInputOptions(root: string): UtsInputOptions {
106+
function initInputOptions(_: UtsTarget, root: string): UtsInputOptions {
107107
return {
108108
root,
109109
filename: '',
@@ -136,10 +136,10 @@ function watch(
136136

137137
extname = extname || EXTNAME
138138

139-
const inputSrcDir = resolveSrcDir(UtsTarget.KOTLIN, inputDir)
140-
const outputSrcDir = resolveSrcDir(UtsTarget.KOTLIN, outputDir)
139+
const inputSrcDir = resolveSrcDir(target, inputDir)
140+
const outputSrcDir = resolveSrcDir(target, outputDir)
141141

142-
const input = initInputOptions(inputSrcDir)
142+
const input = initInputOptions(target, inputSrcDir)
143143
const output = initOutputOptions(
144144
target,
145145
outputSrcDir,
@@ -195,7 +195,7 @@ function build(
195195

196196
const inputSrcDir = resolveSrcDir(target, inputDir)
197197
const outputSrcDir = resolveSrcDir(target, outputDir)
198-
const input = initInputOptions(inputSrcDir)
198+
const input = initInputOptions(target, inputSrcDir)
199199
const output = initOutputOptions(
200200
target,
201201
outputSrcDir,

0 commit comments

Comments
 (0)