fix: 修复导出 CSV 的 api 不支持数据域变量问题 (#3547)

This commit is contained in:
吴多益 2022-02-09 11:18:32 +08:00 committed by GitHub
parent 26741539be
commit c0f1a1d974
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -173,7 +173,7 @@ fis.on('compile:optimizer', function (file) {
}
});
fis.match('{*.ts,*.jsx,*.tsx,/src/**.js,/src/**.ts}', {
fis.match('{*.ts,*.jsx,*.tsx,/examples/**.js,/src/**.js,/src/**.ts}', {
parser: [
// docsGennerator,
fis.plugin('typescript', {
@ -441,7 +441,7 @@ if (fis.project.currentMedia() === 'publish') {
})
});
env.match('{*.ts,*.jsx,*.tsx,/src/**.js,/src/**.ts}', {
env.match('{*.ts,*.jsx,*.tsx,/examples/**.js,/src/**.js,/src/**.ts}', {
parser: [
// docsGennerator,
fis.plugin('typescript', {
@ -978,7 +978,7 @@ if (fis.project.currentMedia() === 'publish') {
url: 'null',
useHash: false
});
ghPages.match('{*.jsx,*.tsx,*.ts}', {
ghPages.match('{*.jsx,*.tsx,*.ts,/examples/**.js,}', {
moduleId: function (m, path) {
return fis.util.md5('amis' + path);
},

View File

@ -1776,7 +1776,8 @@ export default class CRUD extends React.Component<CRUDProps, any> {
classPrefix: ns,
classnames: cx,
translate: __,
loadDataOnce
loadDataOnce,
data
} = this.props;
const api = (toolbar as Schema).api;
@ -1787,7 +1788,8 @@ export default class CRUD extends React.Component<CRUDProps, any> {
onClick={() =>
store.exportAsCSV({
loadDataOnce,
api
api,
data
})
}
size="sm"