@tarojs/runtime 3.3.14 → 3.3.15
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/dom/element.d.ts +2 -1
- package/dist/runtime.esm.js +14 -6
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +4 -4
package/dist/dom/element.d.ts
CHANGED
|
@@ -27,7 +27,8 @@ export declare class TaroElement extends TaroNode {
|
|
|
27
27
|
set textContent(text: string);
|
|
28
28
|
hasAttribute(qualifiedName: string): boolean;
|
|
29
29
|
hasAttributes(): boolean;
|
|
30
|
-
focus(): void;
|
|
30
|
+
get focus(): () => void;
|
|
31
|
+
set focus(value: () => void);
|
|
31
32
|
blur(): void;
|
|
32
33
|
setAttribute(qualifiedName: string, value: any): void;
|
|
33
34
|
removeAttribute(qualifiedName: string): void;
|
package/dist/runtime.esm.js
CHANGED
|
@@ -1234,7 +1234,6 @@ const TIME_STAMP = 'timeStamp';
|
|
|
1234
1234
|
const KEY_CODE = 'keyCode';
|
|
1235
1235
|
const TOUCHMOVE = 'touchmove';
|
|
1236
1236
|
const DATE = 'Date';
|
|
1237
|
-
const SET_TIMEOUT = 'setTimeout';
|
|
1238
1237
|
const CATCHMOVE = 'catchMove';
|
|
1239
1238
|
const CATCH_VIEW = 'catch-view';
|
|
1240
1239
|
const COMMENT = 'comment';
|
|
@@ -2103,8 +2102,14 @@ let TaroElement = class TaroElement extends TaroNode {
|
|
|
2103
2102
|
hasAttributes() {
|
|
2104
2103
|
return this.attributes.length > 0;
|
|
2105
2104
|
}
|
|
2106
|
-
focus() {
|
|
2107
|
-
|
|
2105
|
+
get focus() {
|
|
2106
|
+
return function () {
|
|
2107
|
+
this.setAttribute(FOCUS, true);
|
|
2108
|
+
};
|
|
2109
|
+
}
|
|
2110
|
+
// 兼容 Vue3,详情请见:https://github.com/NervJS/taro/issues/10579
|
|
2111
|
+
set focus(value) {
|
|
2112
|
+
this.setAttribute(FOCUS, value);
|
|
2108
2113
|
}
|
|
2109
2114
|
blur() {
|
|
2110
2115
|
this.setAttribute(FOCUS, false);
|
|
@@ -5013,9 +5018,12 @@ if (process.env.TARO_ENV && process.env.TARO_ENV !== 'h5') {
|
|
|
5013
5018
|
if (!(DATE in window$1)) {
|
|
5014
5019
|
window$1.Date = Date;
|
|
5015
5020
|
}
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
}
|
|
5021
|
+
window$1.setTimeout = function (cb, delay) {
|
|
5022
|
+
setTimeout(cb, delay);
|
|
5023
|
+
};
|
|
5024
|
+
window$1.clearTimeout = function (seed) {
|
|
5025
|
+
clearTimeout(seed);
|
|
5026
|
+
};
|
|
5019
5027
|
}
|
|
5020
5028
|
|
|
5021
5029
|
const Current = {
|