mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 18:48:45 +08:00
chore: pr #8039 代码丢失重新补上
This commit is contained in:
parent
a2a4bb8bf7
commit
1d5efac3d7
63
examples/sdk-test.html
Normal file
63
examples/sdk-test.html
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="zh">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<title>amis demo</title>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
<meta
|
||||||
|
name="viewport"
|
||||||
|
content="width=device-width, initial-scale=1, maximum-scale=1"
|
||||||
|
/>
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
|
||||||
|
<link rel="stylesheet" href="../packages/amis/sdk/sdk.css" />
|
||||||
|
<link rel="stylesheet" href="../packages/amis/sdk/helper.css" />
|
||||||
|
<link rel="stylesheet" href="../packages/amis/sdk/iconfont.css" />
|
||||||
|
<!-- 这是默认主题所需的,如果是其他主题则不需要 -->
|
||||||
|
<!-- 从 1.1.0 开始 sdk.css 将不支持 IE 11,如果要支持 IE11 请引用这个 css,并把前面那个删了 -->
|
||||||
|
<!-- <link rel="stylesheet" href="sdk-ie11.css" /> -->
|
||||||
|
<!-- 不过 amis 开发团队几乎没测试过 IE 11 下的效果,所以可能有细节功能用不了,如果发现请报 issue -->
|
||||||
|
<style>
|
||||||
|
html,
|
||||||
|
body,
|
||||||
|
.app-wrapper {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id="root" class="app-wrapper"></div>
|
||||||
|
<script src="../packages/amis/sdk/sdk.js"></script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
(function () {
|
||||||
|
let amis = amisRequire('amis/embed');
|
||||||
|
// 通过替换下面这个配置来生成不同页面
|
||||||
|
let amisJSON = {
|
||||||
|
type: 'page',
|
||||||
|
title: '表单页面',
|
||||||
|
body: {
|
||||||
|
type: 'form',
|
||||||
|
mode: 'horizontal',
|
||||||
|
api: '/saveForm',
|
||||||
|
body: [
|
||||||
|
{
|
||||||
|
label: 'Name',
|
||||||
|
type: 'input-text',
|
||||||
|
name: 'name'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: 'Email',
|
||||||
|
type: 'input-email',
|
||||||
|
name: 'email'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let amisScoped = amis.embed('#root', amisJSON);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -19,6 +19,7 @@ export interface AutoFilterFormProps extends RendererProps {
|
|||||||
onToggleExpanded?: () => void;
|
onToggleExpanded?: () => void;
|
||||||
query?: any;
|
query?: any;
|
||||||
|
|
||||||
|
popOverContainer?: any;
|
||||||
onSearchableFromReset?: any;
|
onSearchableFromReset?: any;
|
||||||
onSearchableFromSubmit?: any;
|
onSearchableFromSubmit?: any;
|
||||||
onSearchableFromInit?: any;
|
onSearchableFromInit?: any;
|
||||||
@ -37,7 +38,8 @@ export function AutoFilterForm({
|
|||||||
data,
|
data,
|
||||||
onSearchableFromReset,
|
onSearchableFromReset,
|
||||||
onSearchableFromSubmit,
|
onSearchableFromSubmit,
|
||||||
onSearchableFromInit
|
onSearchableFromInit,
|
||||||
|
popOverContainer
|
||||||
}: AutoFilterFormProps) {
|
}: AutoFilterFormProps) {
|
||||||
const schema = React.useMemo(() => {
|
const schema = React.useMemo(() => {
|
||||||
const {columnsNum, showBtnToolbar} =
|
const {columnsNum, showBtnToolbar} =
|
||||||
@ -191,7 +193,8 @@ export function AutoFilterForm({
|
|||||||
onSubmit: onSearchableFromSubmit,
|
onSubmit: onSearchableFromSubmit,
|
||||||
onInit: onSearchableFromInit,
|
onInit: onSearchableFromInit,
|
||||||
formStore: undefined,
|
formStore: undefined,
|
||||||
data
|
data,
|
||||||
|
popOverContainer
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1616,6 +1616,7 @@ export default class Table extends React.Component<TableProps, object> {
|
|||||||
onSearchableFromReset={onSearchableFromReset}
|
onSearchableFromReset={onSearchableFromReset}
|
||||||
onSearchableFromSubmit={onSearchableFromSubmit}
|
onSearchableFromSubmit={onSearchableFromSubmit}
|
||||||
onSearchableFromInit={onSearchableFromInit}
|
onSearchableFromInit={onSearchableFromInit}
|
||||||
|
popOverContainer={this.getPopOverContainer}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user