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