mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 10:59:42 +08:00
parent
5b4ec444dc
commit
3db2fff72c
@ -28,11 +28,11 @@ order: 51
|
||||
{
|
||||
"type": "page",
|
||||
"data": {
|
||||
"iframeSrc": "https://gitee.com/baidu/amis"
|
||||
"iframeSrc": "baidu/amis"
|
||||
},
|
||||
"body": {
|
||||
"type": "iframe",
|
||||
"src": "${iframeSrc}",
|
||||
"src": "https://gitee.com/${iframeSrc}",
|
||||
"height": 300
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ let amisScoped = amis.embed(
|
||||
|
||||
如果是其它语言,比如目前德语,需要单独引入文件
|
||||
|
||||
```html
|
||||
```
|
||||
<script src="sdk.js"></script>
|
||||
<script src="locale/de-DE.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
@ -6,7 +6,7 @@ import {ScopedContext, IScopedContext} from '../Scoped';
|
||||
import {buildApi, isApiOutdated} from '../utils/api';
|
||||
import {BaseSchema, SchemaUrlPath} from '../Schema';
|
||||
import {ActionSchema} from './Action';
|
||||
import {isPureVariable, resolveVariableAndFilter} from '../utils/tpl-builtin';
|
||||
import {dataMapping} from '../utils/tpl-builtin';
|
||||
|
||||
/**
|
||||
* IFrame 渲染器
|
||||
@ -161,9 +161,7 @@ export default class IFrame extends React.Component<IFrameProps, object> {
|
||||
...style
|
||||
};
|
||||
|
||||
if (isPureVariable(src)) {
|
||||
src = resolveVariableAndFilter(src, data, '| raw');
|
||||
}
|
||||
src = dataMapping(src, data);
|
||||
|
||||
const finalSrc = src ? buildApi(src, data).url : undefined;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user