@tarojs/components
Version:
Taro 组件库。
72 lines (71 loc) • 1.69 kB
JavaScript
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { Component, h, Prop, Event } from '@stencil/core';
export class WebView {
render() {
const { src, onLoad, onError } = this;
return (h("iframe", { class: 'taro-webview', onLoad: (e) => {
e.stopPropagation();
onLoad.emit({ src });
}, onError: (e) => {
e.stopPropagation();
onError.emit({ src });
}, src: src }));
}
static get is() { return "taro-web-view-core"; }
static get originalStyleUrls() { return {
"$": ["./style/index.scss"]
}; }
static get styleUrls() { return {
"$": ["./style/index.css"]
}; }
static get properties() { return {
"src": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "src",
"reflect": false
}
}; }
static get events() { return [{
"method": "onLoad",
"name": "load",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}, {
"method": "onError",
"name": "error",
"bubbles": true,
"cancelable": true,
"composed": true,
"docs": {
"tags": [],
"text": ""
},
"complexType": {
"original": "any",
"resolved": "any",
"references": {}
}
}]; }
}