@tarojs/components 3.3.8 → 3.3.12
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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-audio-core.cjs.entry.js +3 -2
- package/dist/cjs/taro-canvas-core.cjs.entry.js +4 -3
- package/dist/cjs/taro-checkbox-core_2.cjs.entry.js +4 -3
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-image-core.cjs.entry.js +3 -2
- package/dist/cjs/taro-input-core.cjs.entry.js +4 -3
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +33 -8
- package/dist/cjs/taro-radio-core_2.cjs.entry.js +4 -3
- package/dist/cjs/taro-switch-core.cjs.entry.js +3 -2
- package/dist/cjs/taro-tabbar.cjs.entry.js +2 -4
- package/dist/cjs/taro-textarea-core.cjs.entry.js +4 -3
- package/dist/cjs/taro-video-control_3.cjs.entry.js +4 -3
- package/dist/collection/components/audio/audio.js +19 -2
- package/dist/collection/components/canvas/canvas.js +20 -3
- package/dist/collection/components/checkbox/checkbox.js +20 -3
- package/dist/collection/components/image/image.js +19 -2
- package/dist/collection/components/input/input.js +20 -3
- package/dist/collection/components/picker/picker-group.js +59 -9
- package/dist/collection/components/radio/radio.js +20 -3
- package/dist/collection/components/switch/switch.js +19 -2
- package/dist/collection/components/tabbar/tabbar.js +2 -4
- package/dist/collection/components/textarea/textarea.js +20 -3
- package/dist/collection/components/video/video.js +20 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-audio-core.entry.js +3 -2
- package/dist/esm/taro-canvas-core.entry.js +4 -3
- package/dist/esm/taro-checkbox-core_2.entry.js +4 -3
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-image-core.entry.js +3 -2
- package/dist/esm/taro-input-core.entry.js +4 -3
- package/dist/esm/taro-picker-core_2.entry.js +33 -8
- package/dist/esm/taro-radio-core_2.entry.js +4 -3
- package/dist/esm/taro-switch-core.entry.js +3 -2
- package/dist/esm/taro-tabbar.entry.js +2 -4
- package/dist/esm/taro-textarea-core.entry.js +4 -3
- package/dist/esm/taro-video-control_3.entry.js +4 -3
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-audio-core.entry.js +1 -1
- package/dist/esm-es5/taro-canvas-core.entry.js +1 -1
- package/dist/esm-es5/taro-checkbox-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-radio-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-switch-core.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/taro-components/p-239bf0ca.system.entry.js +1 -0
- package/dist/taro-components/p-3eb31172.system.entry.js +1 -0
- package/dist/taro-components/p-4afe24d7.entry.js +1 -0
- package/dist/taro-components/p-593ee811.entry.js +1 -0
- package/dist/taro-components/p-6287057a.entry.js +1 -0
- package/dist/taro-components/p-7911ccd6.system.entry.js +1 -0
- package/dist/taro-components/{p-671a39e4.system.entry.js → p-8031d6b5.system.entry.js} +1 -1
- package/dist/taro-components/{p-3bda72b4.entry.js → p-80f50da7.entry.js} +1 -1
- package/dist/taro-components/p-82185d54.system.entry.js +1 -0
- package/dist/taro-components/p-8c43da73.system.entry.js +1 -0
- package/dist/taro-components/p-8f7b75f6.system.entry.js +1 -0
- package/dist/taro-components/p-906c3a0a.entry.js +1 -0
- package/dist/taro-components/p-945fa1a0.entry.js +1 -0
- package/dist/taro-components/p-96f1e9e7.entry.js +1 -0
- package/dist/taro-components/p-970ed6da.system.entry.js +1 -0
- package/dist/taro-components/p-9fe2309f.entry.js +1 -0
- package/dist/taro-components/p-a079321f.system.entry.js +1 -0
- package/dist/taro-components/{p-671dcbc6.system.entry.js → p-a74d5aa5.system.entry.js} +1 -1
- package/dist/taro-components/p-af393b0b.entry.js +1 -0
- package/dist/taro-components/p-b5d2597b.system.js +1 -1
- package/dist/taro-components/p-c2810ece.entry.js +1 -0
- package/dist/taro-components/p-c9380fa6.entry.js +1 -0
- package/dist/taro-components/p-e256974b.system.entry.js +1 -0
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/audio/audio.d.ts +1 -0
- package/dist/types/components/canvas/canvas.d.ts +1 -0
- package/dist/types/components/checkbox/checkbox.d.ts +1 -0
- package/dist/types/components/image/image.d.ts +1 -0
- package/dist/types/components/input/input.d.ts +1 -0
- package/dist/types/components/picker/picker-group.d.ts +7 -0
- package/dist/types/components/radio/radio.d.ts +1 -0
- package/dist/types/components/switch/switch.d.ts +1 -0
- package/dist/types/components/textarea/textarea.d.ts +1 -0
- package/dist/types/components.d.ts +18 -0
- package/dist-h5/react/utils/reactify-wc.js +1 -0
- package/package.json +4 -3
- package/types/Camera.d.ts +7 -7
- package/types/LivePusher.d.ts +51 -3
- package/types/Map.d.ts +11 -1
- package/types/PickerView.d.ts +7 -7
- package/types/Swiper.d.ts +2 -0
- package/dist/taro-components/p-1342e810.system.entry.js +0 -1
- package/dist/taro-components/p-153b839d.system.entry.js +0 -1
- package/dist/taro-components/p-1925bbdb.entry.js +0 -1
- package/dist/taro-components/p-1f44e8ef.system.entry.js +0 -1
- package/dist/taro-components/p-2a504632.system.entry.js +0 -1
- package/dist/taro-components/p-40144442.entry.js +0 -1
- package/dist/taro-components/p-45af8e04.entry.js +0 -1
- package/dist/taro-components/p-50e44e3f.system.entry.js +0 -1
- package/dist/taro-components/p-576b86cb.entry.js +0 -1
- package/dist/taro-components/p-68781eab.entry.js +0 -1
- package/dist/taro-components/p-a5df0ffb.system.entry.js +0 -1
- package/dist/taro-components/p-a9608c73.system.entry.js +0 -1
- package/dist/taro-components/p-b9aa76c5.entry.js +0 -1
- package/dist/taro-components/p-d36e9c1c.entry.js +0 -1
- package/dist/taro-components/p-d8e323fe.entry.js +0 -1
- package/dist/taro-components/p-e05be870.entry.js +0 -1
- package/dist/taro-components/p-ee8eec25.system.entry.js +0 -1
- package/dist/taro-components/p-f23386d1.entry.js +0 -1
- package/dist/taro-components/p-fd44be7c.system.entry.js +0 -1
|
@@ -26,6 +26,7 @@ export class Input {
|
|
|
26
26
|
this.maxlength = 140;
|
|
27
27
|
this.autoFocus = false;
|
|
28
28
|
this.confirmType = 'done';
|
|
29
|
+
this.nativeProps = {};
|
|
29
30
|
this.handleInput = (e) => {
|
|
30
31
|
e.stopPropagation();
|
|
31
32
|
const { type, maxlength, confirmType, password } = this;
|
|
@@ -129,11 +130,11 @@ export class Input {
|
|
|
129
130
|
}
|
|
130
131
|
}
|
|
131
132
|
render() {
|
|
132
|
-
const { _value, type, password, placeholder, disabled, maxlength, autoFocus, confirmType, name } = this;
|
|
133
|
-
return (h("input", { ref: input => {
|
|
133
|
+
const { _value, type, password, placeholder, disabled, maxlength, autoFocus, confirmType, name, nativeProps } = this;
|
|
134
|
+
return (h("input", Object.assign({ ref: input => {
|
|
134
135
|
this.inputRef = input;
|
|
135
136
|
autoFocus && (input === null || input === void 0 ? void 0 : input.focus());
|
|
136
|
-
}, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown }));
|
|
137
|
+
}, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown }, nativeProps)));
|
|
137
138
|
}
|
|
138
139
|
static get is() { return "taro-input-core"; }
|
|
139
140
|
static get originalStyleUrls() { return {
|
|
@@ -300,6 +301,22 @@ export class Input {
|
|
|
300
301
|
},
|
|
301
302
|
"attribute": "name",
|
|
302
303
|
"reflect": false
|
|
304
|
+
},
|
|
305
|
+
"nativeProps": {
|
|
306
|
+
"type": "unknown",
|
|
307
|
+
"mutable": false,
|
|
308
|
+
"complexType": {
|
|
309
|
+
"original": "{}",
|
|
310
|
+
"resolved": "{}",
|
|
311
|
+
"references": {}
|
|
312
|
+
},
|
|
313
|
+
"required": false,
|
|
314
|
+
"optional": false,
|
|
315
|
+
"docs": {
|
|
316
|
+
"tags": [],
|
|
317
|
+
"text": ""
|
|
318
|
+
},
|
|
319
|
+
"defaultValue": "{}"
|
|
303
320
|
}
|
|
304
321
|
}; }
|
|
305
322
|
static get states() { return {
|
|
@@ -30,15 +30,14 @@ export class TaroPickerGroup {
|
|
|
30
30
|
updateHeight(relativeHeight, columnId, true);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
|
|
33
|
+
handleMoveStart(clientY) {
|
|
34
34
|
// 记录第一次的点击位置
|
|
35
|
-
this.startY =
|
|
36
|
-
this.preY =
|
|
35
|
+
this.startY = clientY;
|
|
36
|
+
this.preY = clientY;
|
|
37
37
|
this.hadMove = false;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const y = e.changedTouches[0].clientY;
|
|
39
|
+
handleMoving(clientY) {
|
|
40
|
+
const y = clientY;
|
|
42
41
|
const deltaY = y - this.preY;
|
|
43
42
|
this.preY = y;
|
|
44
43
|
this.touchEnd = false;
|
|
@@ -67,11 +66,11 @@ export class TaroPickerGroup {
|
|
|
67
66
|
}
|
|
68
67
|
this.updateHeight(newPos, this.columnId);
|
|
69
68
|
}
|
|
70
|
-
|
|
69
|
+
handleMoveEnd(clientY) {
|
|
71
70
|
const { mode, range, height, updateHeight, onColumnChange, columnId } = this;
|
|
72
71
|
const max = 0;
|
|
73
72
|
const min = -LINE_HEIGHT * (range.length - 1);
|
|
74
|
-
const endY =
|
|
73
|
+
const endY = clientY;
|
|
75
74
|
this.touchEnd = true;
|
|
76
75
|
// touchEnd 时的高度,可能带小数点,需要再处理
|
|
77
76
|
let absoluteHeight;
|
|
@@ -133,6 +132,32 @@ export class TaroPickerGroup {
|
|
|
133
132
|
updateHeight(relativeHeight, columnId, mode === 'time');
|
|
134
133
|
onColumnChange && onColumnChange(relativeHeight, columnId);
|
|
135
134
|
}
|
|
135
|
+
onMouseDown(e) {
|
|
136
|
+
this.isMove = true;
|
|
137
|
+
this.handleMoveStart(e.clientY);
|
|
138
|
+
}
|
|
139
|
+
onMouseMove(e) {
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
if (!this.isMove)
|
|
142
|
+
return;
|
|
143
|
+
this.handleMoving(e.clientY);
|
|
144
|
+
}
|
|
145
|
+
onMouseMoveEnd(e) {
|
|
146
|
+
if (!this.isMove)
|
|
147
|
+
return;
|
|
148
|
+
this.isMove = false;
|
|
149
|
+
this.handleMoveEnd(e.clientY);
|
|
150
|
+
}
|
|
151
|
+
onTouchStart(e) {
|
|
152
|
+
this.handleMoveStart(e.changedTouches[0].clientY);
|
|
153
|
+
}
|
|
154
|
+
onTouchMove(e) {
|
|
155
|
+
e.preventDefault();
|
|
156
|
+
this.handleMoving(e.changedTouches[0].clientY);
|
|
157
|
+
}
|
|
158
|
+
onTouchEnd(e) {
|
|
159
|
+
this.handleMoveEnd(e.changedTouches[0].clientY);
|
|
160
|
+
}
|
|
136
161
|
render() {
|
|
137
162
|
const { range, rangeKey } = this;
|
|
138
163
|
const pickerItem = range.map(item => {
|
|
@@ -280,9 +305,34 @@ export class TaroPickerGroup {
|
|
|
280
305
|
"startY": {},
|
|
281
306
|
"preY": {},
|
|
282
307
|
"hadMove": {},
|
|
283
|
-
"touchEnd": {}
|
|
308
|
+
"touchEnd": {},
|
|
309
|
+
"isMove": {}
|
|
284
310
|
}; }
|
|
285
311
|
static get listeners() { return [{
|
|
312
|
+
"name": "mousedown",
|
|
313
|
+
"method": "onMouseDown",
|
|
314
|
+
"target": undefined,
|
|
315
|
+
"capture": false,
|
|
316
|
+
"passive": true
|
|
317
|
+
}, {
|
|
318
|
+
"name": "mousemove",
|
|
319
|
+
"method": "onMouseMove",
|
|
320
|
+
"target": undefined,
|
|
321
|
+
"capture": false,
|
|
322
|
+
"passive": true
|
|
323
|
+
}, {
|
|
324
|
+
"name": "mouseup",
|
|
325
|
+
"method": "onMouseMoveEnd",
|
|
326
|
+
"target": undefined,
|
|
327
|
+
"capture": false,
|
|
328
|
+
"passive": true
|
|
329
|
+
}, {
|
|
330
|
+
"name": "mouseleave",
|
|
331
|
+
"method": "onMouseMoveEnd",
|
|
332
|
+
"target": undefined,
|
|
333
|
+
"capture": false,
|
|
334
|
+
"passive": true
|
|
335
|
+
}, {
|
|
286
336
|
"name": "touchstart",
|
|
287
337
|
"method": "onTouchStart",
|
|
288
338
|
"target": undefined,
|
|
@@ -5,6 +5,7 @@ export class Radio {
|
|
|
5
5
|
this.value = '';
|
|
6
6
|
this.checked = false;
|
|
7
7
|
this.disabled = false;
|
|
8
|
+
this.nativeProps = {};
|
|
8
9
|
this.isWillLoadCalled = false;
|
|
9
10
|
this.handleClick = () => {
|
|
10
11
|
if (this.disabled)
|
|
@@ -31,15 +32,15 @@ export class Radio {
|
|
|
31
32
|
this.isWillLoadCalled = true;
|
|
32
33
|
}
|
|
33
34
|
render() {
|
|
34
|
-
const { checked, name, value, disabled } = this;
|
|
35
|
+
const { checked, name, value, disabled, nativeProps } = this;
|
|
35
36
|
return (h(Host, { className: 'weui-cells_checkbox', onClick: this.handleClick },
|
|
36
|
-
h("input", { ref: dom => {
|
|
37
|
+
h("input", Object.assign({ ref: dom => {
|
|
37
38
|
if (!dom)
|
|
38
39
|
return;
|
|
39
40
|
this.inputEl = dom;
|
|
40
41
|
if (this.id)
|
|
41
42
|
dom.setAttribute('id', this.id);
|
|
42
|
-
}, type: 'radio', name: name, value: value, class: 'weui-check', checked: checked, disabled: disabled, onChange: e => e.stopPropagation() }),
|
|
43
|
+
}, type: 'radio', name: name, value: value, class: 'weui-check', checked: checked, disabled: disabled, onChange: e => e.stopPropagation() }, nativeProps)),
|
|
43
44
|
h("i", { class: 'weui-icon-checked' }),
|
|
44
45
|
h("slot", null)));
|
|
45
46
|
}
|
|
@@ -132,6 +133,22 @@ export class Radio {
|
|
|
132
133
|
"attribute": "disabled",
|
|
133
134
|
"reflect": false,
|
|
134
135
|
"defaultValue": "false"
|
|
136
|
+
},
|
|
137
|
+
"nativeProps": {
|
|
138
|
+
"type": "unknown",
|
|
139
|
+
"mutable": false,
|
|
140
|
+
"complexType": {
|
|
141
|
+
"original": "{}",
|
|
142
|
+
"resolved": "{}",
|
|
143
|
+
"references": {}
|
|
144
|
+
},
|
|
145
|
+
"required": false,
|
|
146
|
+
"optional": false,
|
|
147
|
+
"docs": {
|
|
148
|
+
"tags": [],
|
|
149
|
+
"text": ""
|
|
150
|
+
},
|
|
151
|
+
"defaultValue": "{}"
|
|
135
152
|
}
|
|
136
153
|
}; }
|
|
137
154
|
static get states() { return {
|
|
@@ -6,6 +6,7 @@ export class Switch {
|
|
|
6
6
|
this.checked = false;
|
|
7
7
|
this.color = '#04BE02';
|
|
8
8
|
this.disabled = false;
|
|
9
|
+
this.nativeProps = {};
|
|
9
10
|
this.isWillLoadCalled = false;
|
|
10
11
|
this.switchChange = e => {
|
|
11
12
|
e.stopPropagation();
|
|
@@ -33,14 +34,14 @@ export class Switch {
|
|
|
33
34
|
});
|
|
34
35
|
}
|
|
35
36
|
render() {
|
|
36
|
-
const { type, color, isChecked, name, disabled } = this;
|
|
37
|
+
const { type, color, isChecked, name, disabled, nativeProps } = this;
|
|
37
38
|
const style = isChecked
|
|
38
39
|
? {
|
|
39
40
|
borderColor: color || '04BE02',
|
|
40
41
|
backgroundColor: color || '04BE02'
|
|
41
42
|
}
|
|
42
43
|
: {};
|
|
43
|
-
return (h("input", { type: 'checkbox', class: `weui-${type}`, style: style, checked: isChecked, name: name, disabled: disabled, onChange: this.switchChange }));
|
|
44
|
+
return (h("input", Object.assign({ type: 'checkbox', class: `weui-${type}`, style: style, checked: isChecked, name: name, disabled: disabled, onChange: this.switchChange }, nativeProps)));
|
|
44
45
|
}
|
|
45
46
|
static get is() { return "taro-switch-core"; }
|
|
46
47
|
static get originalStyleUrls() { return {
|
|
@@ -138,6 +139,22 @@ export class Switch {
|
|
|
138
139
|
"attribute": "disabled",
|
|
139
140
|
"reflect": false,
|
|
140
141
|
"defaultValue": "false"
|
|
142
|
+
},
|
|
143
|
+
"nativeProps": {
|
|
144
|
+
"type": "unknown",
|
|
145
|
+
"mutable": false,
|
|
146
|
+
"complexType": {
|
|
147
|
+
"original": "{}",
|
|
148
|
+
"resolved": "{}",
|
|
149
|
+
"references": {}
|
|
150
|
+
},
|
|
151
|
+
"required": false,
|
|
152
|
+
"optional": false,
|
|
153
|
+
"docs": {
|
|
154
|
+
"tags": [],
|
|
155
|
+
"text": ""
|
|
156
|
+
},
|
|
157
|
+
"defaultValue": "{}"
|
|
141
158
|
}
|
|
142
159
|
}; }
|
|
143
160
|
static get states() { return {
|
|
@@ -44,7 +44,7 @@ export class Tabbar {
|
|
|
44
44
|
};
|
|
45
45
|
this.switchTab = (index) => {
|
|
46
46
|
this.selectedIndex = index;
|
|
47
|
-
Taro.
|
|
47
|
+
Taro.switchTab({
|
|
48
48
|
url: this.list[index].pagePath
|
|
49
49
|
});
|
|
50
50
|
};
|
|
@@ -72,9 +72,7 @@ export class Tabbar {
|
|
|
72
72
|
}
|
|
73
73
|
if (toLocation && toLocation.path) {
|
|
74
74
|
const tmpPath = addLeadingSlash(toLocation.path);
|
|
75
|
-
currentPage = tmpPath === '/'
|
|
76
|
-
? this.homePage
|
|
77
|
-
: tmpPath;
|
|
75
|
+
currentPage = stripBasename(tmpPath === '/' ? this.homePage : tmpPath, this.conf.basename || '/');
|
|
78
76
|
}
|
|
79
77
|
else {
|
|
80
78
|
currentPage = this.getCurrentUrl();
|
|
@@ -8,6 +8,7 @@ export class Textarea {
|
|
|
8
8
|
this.disabled = false;
|
|
9
9
|
this.maxlength = 140;
|
|
10
10
|
this.autoFocus = false;
|
|
11
|
+
this.nativeProps = {};
|
|
11
12
|
this.hanldeInput = (e) => {
|
|
12
13
|
e.stopPropagation();
|
|
13
14
|
this.onInput.emit({
|
|
@@ -41,12 +42,12 @@ export class Textarea {
|
|
|
41
42
|
this.autoFocus && this.textareaRef.focus();
|
|
42
43
|
}
|
|
43
44
|
render() {
|
|
44
|
-
const { value, placeholder, disabled, maxlength, autoFocus, name, hanldeInput, handleFocus, handleBlur, handleChange } = this;
|
|
45
|
-
return (h("textarea", { ref: input => {
|
|
45
|
+
const { value, placeholder, disabled, maxlength, autoFocus, name, nativeProps, hanldeInput, handleFocus, handleBlur, handleChange } = this;
|
|
46
|
+
return (h("textarea", Object.assign({ ref: input => {
|
|
46
47
|
if (input) {
|
|
47
48
|
this.textareaRef = input;
|
|
48
49
|
}
|
|
49
|
-
}, class: 'taro-textarea', value: fixControlledValue(value), placeholder: placeholder, name: name, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, onInput: hanldeInput, onFocus: handleFocus, onBlur: handleBlur, onChange: handleChange }));
|
|
50
|
+
}, class: 'taro-textarea', value: fixControlledValue(value), placeholder: placeholder, name: name, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, onInput: hanldeInput, onFocus: handleFocus, onBlur: handleBlur, onChange: handleChange }, nativeProps)));
|
|
50
51
|
}
|
|
51
52
|
static get is() { return "taro-textarea-core"; }
|
|
52
53
|
static get originalStyleUrls() { return {
|
|
@@ -160,6 +161,22 @@ export class Textarea {
|
|
|
160
161
|
},
|
|
161
162
|
"attribute": "name",
|
|
162
163
|
"reflect": false
|
|
164
|
+
},
|
|
165
|
+
"nativeProps": {
|
|
166
|
+
"type": "unknown",
|
|
167
|
+
"mutable": false,
|
|
168
|
+
"complexType": {
|
|
169
|
+
"original": "{}",
|
|
170
|
+
"resolved": "{}",
|
|
171
|
+
"references": {}
|
|
172
|
+
},
|
|
173
|
+
"required": false,
|
|
174
|
+
"optional": false,
|
|
175
|
+
"docs": {
|
|
176
|
+
"tags": [],
|
|
177
|
+
"text": ""
|
|
178
|
+
},
|
|
179
|
+
"defaultValue": "{}"
|
|
163
180
|
}
|
|
164
181
|
}; }
|
|
165
182
|
static get events() { return [{
|
|
@@ -75,6 +75,7 @@ export class Video {
|
|
|
75
75
|
* 在全屏模式下,是否开启亮度与音量调节手势
|
|
76
76
|
*/
|
|
77
77
|
this.vslideGestureInFullscreen = true;
|
|
78
|
+
this.nativeProps = {};
|
|
78
79
|
this._enableDanmu = false;
|
|
79
80
|
this.isPlaying = false;
|
|
80
81
|
this.isFirst = true;
|
|
@@ -332,18 +333,18 @@ export class Video {
|
|
|
332
333
|
this.toggleFullScreen(false);
|
|
333
334
|
}
|
|
334
335
|
render() {
|
|
335
|
-
const { src, controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, duration, _duration, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn } = this;
|
|
336
|
+
const { src, controls, autoplay, loop, muted, poster, objectFit, isFirst, isMute, isFullScreen, duration, _duration, showCenterPlayBtn, isPlaying, _enableDanmu, showMuteBtn, danmuBtn, showFullscreenBtn, nativeProps } = this;
|
|
336
337
|
const durationTime = formatTime(duration || _duration || null);
|
|
337
338
|
return (h(Host, { class: classNames('taro-video-container', {
|
|
338
339
|
'taro-video-type-fullscreen': isFullScreen
|
|
339
340
|
}), onTouchStart: this.onTouchStartContainer, onClick: this.onClickContainer },
|
|
340
|
-
h("video", { class: 'taro-video-video', style: {
|
|
341
|
+
h("video", Object.assign({ class: 'taro-video-video', style: {
|
|
341
342
|
'object-fit': objectFit
|
|
342
343
|
}, ref: dom => {
|
|
343
344
|
if (dom) {
|
|
344
345
|
this.videoRef = dom;
|
|
345
346
|
}
|
|
346
|
-
}, src: src, autoplay: autoplay, loop: loop, muted: muted, poster: controls ? poster : undefined, playsinline: true, "webkit-playsinline": true, onPlay: this.handlePlay, onPause: this.handlePause, onEnded: this.handleEnded, onTimeUpdate: this.handleTimeUpdate, onError: this.handleError, onDurationChange: this.handleDurationChange, onProgress: this.handleProgress, onLoadedMetaData: this.handleLoadedMetaData }, "\u6682\u65F6\u4E0D\u652F\u6301\u64AD\u653E\u8BE5\u89C6\u9891"),
|
|
347
|
+
}, src: src, autoplay: autoplay, loop: loop, muted: muted, poster: controls ? poster : undefined, playsinline: true, "webkit-playsinline": true, onPlay: this.handlePlay, onPause: this.handlePause, onEnded: this.handleEnded, onTimeUpdate: this.handleTimeUpdate, onError: this.handleError, onDurationChange: this.handleDurationChange, onProgress: this.handleProgress, onLoadedMetaData: this.handleLoadedMetaData }, nativeProps), "\u6682\u65F6\u4E0D\u652F\u6301\u64AD\u653E\u8BE5\u89C6\u9891"),
|
|
347
348
|
h("taro-video-danmu", { ref: dom => {
|
|
348
349
|
if (dom) {
|
|
349
350
|
this.danmuRef = dom;
|
|
@@ -770,6 +771,22 @@ export class Video {
|
|
|
770
771
|
"attribute": "vslide-gesture-in-fullscreen",
|
|
771
772
|
"reflect": false,
|
|
772
773
|
"defaultValue": "true"
|
|
774
|
+
},
|
|
775
|
+
"nativeProps": {
|
|
776
|
+
"type": "unknown",
|
|
777
|
+
"mutable": false,
|
|
778
|
+
"complexType": {
|
|
779
|
+
"original": "{}",
|
|
780
|
+
"resolved": "{}",
|
|
781
|
+
"references": {}
|
|
782
|
+
},
|
|
783
|
+
"required": false,
|
|
784
|
+
"optional": false,
|
|
785
|
+
"docs": {
|
|
786
|
+
"tags": [],
|
|
787
|
+
"text": ""
|
|
788
|
+
},
|
|
789
|
+
"defaultValue": "{}"
|
|
773
790
|
}
|
|
774
791
|
}; }
|
|
775
792
|
static get states() { return {
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1028],"disabled":[4],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[1,"form-type"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core"]]],["taro-cover-view-core",[[0,"taro-cover-view-core"]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-form-core",[[4,"taro-form-core",{"slotParent":[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"aspectFillMode":[32]}]]],["taro-input-core",[[0,"taro-input-core",{"value":[1],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"confirmType":[1,"confirm-type"],"name":[1],"_value":[32]}]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-movable-area-core",[[0,"taro-movable-area-core"]]],["taro-movable-view-core",[[0,"taro-movable-view-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core"]]],["taro-picker-view-core",[[0,"taro-picker-view-core"]]],["taro-progress-core",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[8,"scroll-top"],"mpScrollLeft":[8,"scroll-left"],"mpScrollIntoView":[1,"scroll-into-view"],"scrollWithAnimation":[4,"scroll-with-animation"]}]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1026],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"val":[32],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"selectedIndex":[32],"status":[32]}]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"name":[1]}]]],["taro-view-core",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[8],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]], options);
|
|
13
|
+
return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1028],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[1,"form-type"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core"]]],["taro-cover-view-core",[[0,"taro-cover-view-core"]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-form-core",[[4,"taro-form-core",{"slotParent":[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-input-core",[[0,"taro-input-core",{"value":[1],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"_value":[32]}]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-movable-area-core",[[0,"taro-movable-area-core"]]],["taro-movable-view-core",[[0,"taro-movable-view-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core"]]],["taro-picker-view-core",[[0,"taro-picker-view-core"]]],["taro-progress-core",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[8,"scroll-top"],"mpScrollLeft":[8,"scroll-left"],"mpScrollIntoView":[1,"scroll-into-view"],"scrollWithAnimation":[4,"scroll-with-animation"]}]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1026],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"val":[32],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"selectedIndex":[32],"status":[32]}]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"name":[1],"nativeProps":[16]}]]],["taro-view-core",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[8],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -14,6 +14,7 @@ const Audio = class {
|
|
|
14
14
|
this.autoplay = false;
|
|
15
15
|
this.loop = false;
|
|
16
16
|
this.muted = false;
|
|
17
|
+
this.nativeProps = {};
|
|
17
18
|
}
|
|
18
19
|
bindevent() {
|
|
19
20
|
this.audio.addEventListener('timeupdate', (e) => {
|
|
@@ -43,8 +44,8 @@ const Audio = class {
|
|
|
43
44
|
this.bindevent();
|
|
44
45
|
}
|
|
45
46
|
render() {
|
|
46
|
-
const { src, controls, autoplay, loop, muted } = this;
|
|
47
|
-
return (h("audio", { src: src, controls: controls, autoplay: autoplay, loop: loop, muted: muted, ref: audio => { this.audio = audio; } }));
|
|
47
|
+
const { src, controls, autoplay, loop, muted, nativeProps } = this;
|
|
48
|
+
return (h("audio", Object.assign({ src: src, controls: controls, autoplay: autoplay, loop: loop, muted: muted, ref: audio => { this.audio = audio; } }, nativeProps)));
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
51
|
Audio.style = indexCss;
|
|
@@ -7,6 +7,7 @@ const Canvas = class {
|
|
|
7
7
|
constructor(hostRef) {
|
|
8
8
|
registerInstance(this, hostRef);
|
|
9
9
|
this.onLongTap = createEvent(this, "longtap", 7);
|
|
10
|
+
this.nativeProps = {};
|
|
10
11
|
this.onTouchStart = () => {
|
|
11
12
|
this.timer = setTimeout(() => {
|
|
12
13
|
this.onLongTap.emit();
|
|
@@ -20,11 +21,11 @@ const Canvas = class {
|
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
render() {
|
|
23
|
-
const { canvasId } = this;
|
|
24
|
-
return (h("canvas", { "canvas-id": canvasId, style: {
|
|
24
|
+
const { canvasId, nativeProps } = this;
|
|
25
|
+
return (h("canvas", Object.assign({ "canvas-id": canvasId, style: {
|
|
25
26
|
width: '100%',
|
|
26
27
|
height: '100%'
|
|
27
|
-
}, onTouchStart: this.onTouchStart, onTouchMove: this.onTouchMove, onTouchEnd: this.onTouchEnd }));
|
|
28
|
+
}, onTouchStart: this.onTouchStart, onTouchMove: this.onTouchMove, onTouchEnd: this.onTouchEnd }, nativeProps)));
|
|
28
29
|
}
|
|
29
30
|
get el() { return getElement(this); }
|
|
30
31
|
};
|
|
@@ -8,6 +8,7 @@ const Checkbox = class {
|
|
|
8
8
|
this.onChange = createEvent(this, "checkboxchange", 7);
|
|
9
9
|
this.value = '';
|
|
10
10
|
this.checked = false;
|
|
11
|
+
this.nativeProps = {};
|
|
11
12
|
this.isWillLoadCalled = false;
|
|
12
13
|
this.handleChange = e => {
|
|
13
14
|
e.stopPropagation();
|
|
@@ -29,14 +30,14 @@ const Checkbox = class {
|
|
|
29
30
|
this.id && this.el.removeAttribute('id');
|
|
30
31
|
}
|
|
31
32
|
render() {
|
|
32
|
-
const { checked, name, color, value } = this;
|
|
33
|
-
return (h(Host, { className: 'weui-cells_checkbox' }, h("input", { ref: dom => {
|
|
33
|
+
const { checked, name, color, value, nativeProps } = this;
|
|
34
|
+
return (h(Host, { className: 'weui-cells_checkbox' }, h("input", Object.assign({ ref: dom => {
|
|
34
35
|
if (!dom)
|
|
35
36
|
return;
|
|
36
37
|
this.inputEl = dom;
|
|
37
38
|
if (this.id)
|
|
38
39
|
dom.setAttribute('id', this.id);
|
|
39
|
-
}, type: 'checkbox', value: value, name: name, class: 'taro-checkbox_checked', style: { color }, checked: checked, onChange: this.handleChange }), h("slot", null)));
|
|
40
|
+
}, type: 'checkbox', value: value, name: name, class: 'taro-checkbox_checked', style: { color }, checked: checked, onChange: this.handleChange }, nativeProps)), h("slot", null)));
|
|
40
41
|
}
|
|
41
42
|
get el() { return getElement(this); }
|
|
42
43
|
static get watchers() { return {
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1028],"disabled":[4],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[1,"form-type"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core"]]],["taro-cover-view-core",[[0,"taro-cover-view-core"]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-form-core",[[4,"taro-form-core",{"slotParent":[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"aspectFillMode":[32]}]]],["taro-input-core",[[0,"taro-input-core",{"value":[1],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"confirmType":[1,"confirm-type"],"name":[1],"_value":[32]}]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-movable-area-core",[[0,"taro-movable-area-core"]]],["taro-movable-view-core",[[0,"taro-movable-view-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core"]]],["taro-picker-view-core",[[0,"taro-picker-view-core"]]],["taro-progress-core",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[8,"scroll-top"],"mpScrollLeft":[8,"scroll-left"],"mpScrollIntoView":[1,"scroll-into-view"],"scrollWithAnimation":[4,"scroll-with-animation"]}]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1026],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"val":[32],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"selectedIndex":[32],"status":[32]}]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"name":[1]}]]],["taro-view-core",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[8],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]], options);
|
|
16
|
+
return bootstrapLazy([["taro-checkbox-core_2",[[4,"taro-checkbox-core",{"name":[1],"value":[1],"color":[1],"id":[1025],"checked":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-checkbox-group-core",{"name":[8]},[[0,"checkboxchange","function"]]]]],["taro-radio-core_2",[[4,"taro-radio-core",{"name":[1],"value":[1],"id":[1025],"checked":[1028],"disabled":[4],"nativeProps":[16],"isWillLoadCalled":[32]}],[0,"taro-radio-group-core",{"name":[8]},[[0,"radiochange","function"]]]]],["taro-swiper-core_2",[[4,"taro-swiper-core",{"indicatorDots":[4,"indicator-dots"],"indicatorColor":[1,"indicator-color"],"indicatorActiveColor":[1,"indicator-active-color"],"autoplay":[4],"current":[2],"interval":[2],"duration":[2],"circular":[4],"vertical":[4],"previousMargin":[1,"previous-margin"],"nextMargin":[1,"next-margin"],"displayMultipleItems":[2,"display-multiple-items"],"full":[4],"swiperWrapper":[32],"swiper":[32],"isWillLoadCalled":[32],"observer":[32],"observerFirst":[32],"observerLast":[32]}],[0,"taro-swiper-item-core",{"itemId":[1,"item-id"]}]]],["taro-audio-core",[[0,"taro-audio-core",{"src":[1],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"nativeProps":[16]}]]],["taro-block-core",[[0,"taro-block-core"]]],["taro-button-core",[[4,"taro-button-core",{"disabled":[4],"hoverClass":[1,"hover-class"],"type":[1],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"size":[1],"plain":[4],"loading":[4],"formType":[1,"form-type"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchend","onTouchEnd"]]]]],["taro-camera-core",[[0,"taro-camera-core"]]],["taro-canvas-core",[[0,"taro-canvas-core",{"canvasId":[1,"canvas-id"],"nativeProps":[16]}]]],["taro-cover-image-core",[[0,"taro-cover-image-core"]]],["taro-cover-view-core",[[0,"taro-cover-view-core"]]],["taro-custom-wrapper-core",[[0,"taro-custom-wrapper-core"]]],["taro-form-core",[[4,"taro-form-core",{"slotParent":[32]},[[0,"tarobuttonsubmit","onButtonSubmit"],[0,"tarobuttonreset","onButtonReset"]]]]],["taro-icon-core",[[0,"taro-icon-core",{"type":[1],"size":[8],"color":[1]}]]],["taro-image-core",[[0,"taro-image-core",{"src":[1],"mode":[1],"lazyLoad":[4,"lazy-load"],"nativeProps":[16],"aspectFillMode":[32]}]]],["taro-input-core",[[0,"taro-input-core",{"value":[1],"type":[1],"password":[4],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"confirmType":[1,"confirm-type"],"name":[1],"nativeProps":[16],"_value":[32]}]]],["taro-label-core",[[4,"taro-label-core",{"for":[1]}]]],["taro-movable-area-core",[[0,"taro-movable-area-core"]]],["taro-movable-view-core",[[0,"taro-movable-view-core"]]],["taro-navigator-core",[[0,"taro-navigator-core",{"hoverClass":[1,"hover-class"],"url":[1],"openType":[1,"open-type"],"isHover":[4,"is-hover"],"delta":[2]},[[0,"click","onClick"]]]]],["taro-open-data-core",[[0,"taro-open-data-core"]]],["taro-picker-view-column-core",[[0,"taro-picker-view-column-core"]]],["taro-picker-view-core",[[0,"taro-picker-view-core"]]],["taro-progress-core",[[0,"taro-progress-core",{"percent":[2],"showInfo":[4,"show-info"],"borderRadius":[8,"border-radius"],"fontSize":[8,"font-size"],"strokeWidth":[8,"stroke-width"],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"active":[4]}]]],["taro-pull-to-refresh",[[4,"taro-pull-to-refresh",{"prefixCls":[1,"prefix-cls"],"distanceToRefresh":[2,"distance-to-refresh"],"damping":[2],"indicator":[16],"currSt":[32],"dragOnEdge":[32]}]]],["taro-rich-text-core",[[0,"taro-rich-text-core",{"nodes":[1]}]]],["taro-scroll-view-core",[[4,"taro-scroll-view-core",{"scrollX":[4,"scroll-x"],"scrollY":[4,"scroll-y"],"upperThreshold":[8,"upper-threshold"],"lowerThreshold":[8,"lower-threshold"],"mpScrollTop":[8,"scroll-top"],"mpScrollLeft":[8,"scroll-left"],"mpScrollIntoView":[1,"scroll-into-view"],"scrollWithAnimation":[4,"scroll-with-animation"]}]]],["taro-slider-core",[[0,"taro-slider-core",{"min":[2],"max":[2],"step":[2],"disabled":[4],"value":[1026],"activeColor":[1,"active-color"],"backgroundColor":[1,"background-color"],"blockSize":[2,"block-size"],"blockColor":[1,"block-color"],"showValue":[4,"show-value"],"name":[1],"val":[32],"totalWidth":[32],"touching":[32],"ogX":[32],"touchId":[32],"percent":[32],"ogPercent":[32],"isWillLoadCalled":[32]}]]],["taro-switch-core",[[0,"taro-switch-core",{"type":[1],"checked":[4],"color":[1],"name":[1],"disabled":[4],"nativeProps":[16],"isChecked":[32],"isWillLoadCalled":[32]}]]],["taro-tabbar",[[0,"taro-tabbar",{"conf":[16],"list":[32],"selectedIndex":[32],"status":[32]}]]],["taro-text-core",[[4,"taro-text-core",{"selectable":[4]}]]],["taro-textarea-core",[[0,"taro-textarea-core",{"value":[1],"placeholder":[1],"disabled":[4],"maxlength":[2],"autoFocus":[4,"auto-focus"],"name":[1],"nativeProps":[16]}]]],["taro-view-core",[[4,"taro-view-core",{"animation":[1],"hoverClass":[1,"hover-class"],"hoverStartTime":[2,"hover-start-time"],"hoverStayTime":[2,"hover-stay-time"],"hover":[32],"touch":[32]},[[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-web-view-core",[[0,"taro-web-view-core",{"src":[1]}]]],["taro-picker-core_2",[[4,"taro-picker-core",{"mode":[1],"disabled":[4],"range":[16],"rangeKey":[1,"range-key"],"value":[8],"start":[1],"end":[1],"fields":[1],"name":[1],"pickerValue":[32],"height":[32],"hidden":[32],"fadeOut":[32],"isWillLoadCalled":[32]}],[0,"taro-picker-group",{"mode":[1],"range":[16],"rangeKey":[1,"range-key"],"height":[2],"columnId":[1,"column-id"],"updateHeight":[16],"onColumnChange":[16],"updateDay":[16],"startY":[32],"preY":[32],"hadMove":[32],"touchEnd":[32],"isMove":[32]},[[1,"mousedown","onMouseDown"],[1,"mousemove","onMouseMove"],[1,"mouseup","onMouseMoveEnd"],[1,"mouseleave","onMouseMoveEnd"],[1,"touchstart","onTouchStart"],[1,"touchmove","onTouchMove"],[1,"touchend","onTouchEnd"]]]]],["taro-video-control_3",[[0,"taro-video-core",{"src":[1],"duration":[2],"controls":[4],"autoplay":[4],"loop":[4],"muted":[4],"initialTime":[2,"initial-time"],"poster":[1],"objectFit":[1,"object-fit"],"showProgress":[4,"show-progress"],"showFullscreenBtn":[4,"show-fullscreen-btn"],"showPlayBtn":[4,"show-play-btn"],"showCenterPlayBtn":[4,"show-center-play-btn"],"showMuteBtn":[4,"show-mute-btn"],"danmuList":[16],"danmuBtn":[4,"danmu-btn"],"enableDanmu":[4,"enable-danmu"],"enablePlayGesture":[4,"enable-play-gesture"],"enableProgressGesture":[4,"enable-progress-gesture"],"vslideGesture":[4,"vslide-gesture"],"vslideGestureInFullscreen":[4,"vslide-gesture-in-fullscreen"],"nativeProps":[16],"_duration":[32],"_enableDanmu":[32],"isPlaying":[32],"isFirst":[32],"isFullScreen":[32],"fullScreenTimestamp":[32],"isMute":[32],"play":[64],"pause":[64],"stop":[64],"seek":[64],"requestFullScreen":[64],"exitFullScreen":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[4,"taro-video-control",{"controls":[4],"currentTime":[2,"current-time"],"duration":[2],"isPlaying":[4,"is-playing"],"pauseFunc":[16],"playFunc":[16],"seekFunc":[16],"showPlayBtn":[4,"show-play-btn"],"showProgress":[4,"show-progress"],"setProgressBall":[64],"toggleVisibility":[64],"getIsDraggingProgressBall":[64],"setCurrentTime":[64]},[[5,"touchmove","onDocumentTouchMove"],[5,"touchend","onDocumentTouchEnd"],[5,"touchcancel","onDocumentTouchEnd"]]],[0,"taro-video-danmu",{"enable":[4],"danmuList":[32],"sendDanmu":[64],"tick":[64]}]]]], options);
|
|
17
17
|
});
|
|
@@ -11,6 +11,7 @@ const Image = class {
|
|
|
11
11
|
this.onError = createEvent(this, "error", 7);
|
|
12
12
|
this.mode = 'scaleToFill';
|
|
13
13
|
this.lazyLoad = false;
|
|
14
|
+
this.nativeProps = {};
|
|
14
15
|
this.aspectFillMode = 'width';
|
|
15
16
|
}
|
|
16
17
|
componentDidLoad() {
|
|
@@ -39,14 +40,14 @@ const Image = class {
|
|
|
39
40
|
this.onError.emit();
|
|
40
41
|
}
|
|
41
42
|
render() {
|
|
42
|
-
const { src, mode, lazyLoad, aspectFillMode, imageOnLoad, imageOnError } = this;
|
|
43
|
+
const { src, mode, lazyLoad, aspectFillMode, imageOnLoad, imageOnError, nativeProps } = this;
|
|
43
44
|
const cls = classnames({
|
|
44
45
|
'taro-img__widthfix': mode === 'widthFix'
|
|
45
46
|
});
|
|
46
47
|
const imgCls = classnames(`taro-img__mode-${mode.toLowerCase().replace(/\s/g, '')}`, {
|
|
47
48
|
[`taro-img__mode-aspectfill--${aspectFillMode}`]: mode === 'aspectFill'
|
|
48
49
|
});
|
|
49
|
-
return (h(Host, { class: cls }, lazyLoad ? (h("img", { ref: img => (this.imgRef = img), class: imgCls, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) })) : (h("img", { ref: img => (this.imgRef = img), class: imgCls, src: src, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) }))));
|
|
50
|
+
return (h(Host, { class: cls }, lazyLoad ? (h("img", Object.assign({ ref: img => (this.imgRef = img), class: imgCls, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) }, nativeProps))) : (h("img", Object.assign({ ref: img => (this.imgRef = img), class: imgCls, src: src, onLoad: imageOnLoad.bind(this), onError: imageOnError.bind(this) }, nativeProps)))));
|
|
50
51
|
}
|
|
51
52
|
};
|
|
52
53
|
Image.style = indexCss;
|
|
@@ -36,6 +36,7 @@ const Input = class {
|
|
|
36
36
|
this.maxlength = 140;
|
|
37
37
|
this.autoFocus = false;
|
|
38
38
|
this.confirmType = 'done';
|
|
39
|
+
this.nativeProps = {};
|
|
39
40
|
this.handleInput = (e) => {
|
|
40
41
|
e.stopPropagation();
|
|
41
42
|
const { type, maxlength, confirmType, password } = this;
|
|
@@ -139,11 +140,11 @@ const Input = class {
|
|
|
139
140
|
}
|
|
140
141
|
}
|
|
141
142
|
render() {
|
|
142
|
-
const { _value, type, password, placeholder, disabled, maxlength, autoFocus, confirmType, name } = this;
|
|
143
|
-
return (h("input", { ref: input => {
|
|
143
|
+
const { _value, type, password, placeholder, disabled, maxlength, autoFocus, confirmType, name, nativeProps } = this;
|
|
144
|
+
return (h("input", Object.assign({ ref: input => {
|
|
144
145
|
this.inputRef = input;
|
|
145
146
|
autoFocus && (input === null || input === void 0 ? void 0 : input.focus());
|
|
146
|
-
}, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown }));
|
|
147
|
+
}, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown }, nativeProps)));
|
|
147
148
|
}
|
|
148
149
|
get el() { return getElement(this); }
|
|
149
150
|
static get watchers() { return {
|