使用window.base.loadDynamicResource加载外部资源增加attr属性
parent
7f2bb17962
commit
46ebfb1117
|
|
@ -40,6 +40,7 @@ const MapSelector = (props) => {
|
||||||
await window.base.loadDynamicResource({
|
await window.base.loadDynamicResource({
|
||||||
url: "https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr&callback=initialize",
|
url: "https://api.map.baidu.com/api?v=1.0&type=webgl&ak=OElqFYoKiAH8KFtph8ftLKF5NlNrbCUr&callback=initialize",
|
||||||
type: "script",
|
type: "script",
|
||||||
|
attr: { type: "text/javascript" },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,12 @@ const AliPlayer = forwardRef(({
|
||||||
await window.base.loadDynamicResource({
|
await window.base.loadDynamicResource({
|
||||||
url: "https://g.alicdn.com/apsara-media-box/imp-web-player/2.16.3/aliplayer-min.js",
|
url: "https://g.alicdn.com/apsara-media-box/imp-web-player/2.16.3/aliplayer-min.js",
|
||||||
type: "script",
|
type: "script",
|
||||||
|
attr: { type: "text/javascript" },
|
||||||
});
|
});
|
||||||
await window.base.loadDynamicResource({
|
await window.base.loadDynamicResource({
|
||||||
url: "https://g.alicdn.com/apsara-media-box/imp-web-player/2.16.3/skins/default/aliplayer-min.css",
|
url: "https://g.alicdn.com/apsara-media-box/imp-web-player/2.16.3/skins/default/aliplayer-min.css",
|
||||||
type: "link",
|
type: "link",
|
||||||
|
attr: { rel: "stylesheet" , type: "text/css" },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ const Video = ({
|
||||||
title={title}
|
title={title}
|
||||||
footer={[
|
footer={[
|
||||||
<Button key="cancel" onClick={() => setVisible(false)}>
|
<Button key="cancel" onClick={() => setVisible(false)}>
|
||||||
取消
|
关闭
|
||||||
</Button>,
|
</Button>,
|
||||||
]}
|
]}
|
||||||
maskClosable={false}
|
maskClosable={false}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue