mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-05 05:18:34 +08:00
Merge remote-tracking branch 'baidu/master'
This commit is contained in:
commit
1b18212aaf
@ -522,9 +522,9 @@ ${xxx | date[:format][:inputFormat]}
|
|||||||
```
|
```
|
||||||
|
|
||||||
- **format**:需要展示的格式,默认为`LLL`,即本地化时间格式
|
- **format**:需要展示的格式,默认为`LLL`,即本地化时间格式
|
||||||
- **inputFormat**:指定该变量值的格式,默认为`X`,即时间戳秒,如果是毫秒则是 `x`
|
- **inputFormat**:指定该变量值的格式,默认为`X`,即时间戳秒,具体参数的配置需要参考 [moment](https://momentjs.com/docs/),下面是其它几种常见的格式:
|
||||||
|
- `x`,毫秒
|
||||||
具体参数的配置需要参考 [moment](https://momentjs.com/docs/)
|
- `YYYY-MM-DDTHH:mm:ssZ`,ISO8601 格式,其中 YYYY 是年,MM 是月,DD 是日,HH 是小时,mm 是分钟,ss 是秒
|
||||||
|
|
||||||
```schema
|
```schema
|
||||||
{
|
{
|
||||||
@ -882,7 +882,7 @@ ${xxx | join[:glue]}
|
|||||||
|
|
||||||
### topAndOther
|
### topAndOther
|
||||||
|
|
||||||
取前多少个,身下的归位一组比如:`${list|topAndOther:10:name:Others}`
|
取前多少个,剩下的归位一组比如:`${list|topAndOther:10:name:Others}`
|
||||||
|
|
||||||
对数组分为 10 组,前面 9 组分别拿前 9 个,最后一组将剩下的归为一组,并对每项做数字累加。
|
对数组分为 10 组,前面 9 组分别拿前 9 个,最后一组将剩下的归为一组,并对每项做数字累加。
|
||||||
|
|
||||||
|
@ -92,13 +92,15 @@ export default class FieldSetControl extends React.Component<
|
|||||||
$path,
|
$path,
|
||||||
classnames: cx,
|
classnames: cx,
|
||||||
store,
|
store,
|
||||||
formClassName
|
formClassName,
|
||||||
|
disabled
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
let props: any = {
|
let props: any = {
|
||||||
store,
|
store,
|
||||||
data: store!.data,
|
data: store!.data,
|
||||||
render
|
render,
|
||||||
|
disabled
|
||||||
};
|
};
|
||||||
mode && (props.mode = mode);
|
mode && (props.mode = mode);
|
||||||
typeof collapsable !== 'undefined' && (props.collapsable = collapsable);
|
typeof collapsable !== 'undefined' && (props.collapsable = collapsable);
|
||||||
|
@ -520,9 +520,13 @@ export const CRUDStore = ServiceStore.named('CRUDStore')
|
|||||||
import('papaparse').then((papaparse: any) => {
|
import('papaparse').then((papaparse: any) => {
|
||||||
const csvText = papaparse.unparse(items);
|
const csvText = papaparse.unparse(items);
|
||||||
if (csvText) {
|
if (csvText) {
|
||||||
const blob = new Blob([csvText], {
|
const blob = new Blob(
|
||||||
type: 'text/plain;charset=utf-8'
|
// 加上 BOM 这样 Excel 打开的时候就不会乱码
|
||||||
});
|
[new Uint8Array([0xef, 0xbb, 0xbf]), csvText],
|
||||||
|
{
|
||||||
|
type: 'text/plain;charset=utf-8'
|
||||||
|
}
|
||||||
|
);
|
||||||
saveAs(blob, 'data.csv');
|
saveAs(blob, 'data.csv');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user