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: [ parser: [
// docsGennerator, // docsGennerator,
fis.plugin('typescript', { 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: [ parser: [
// docsGennerator, // docsGennerator,
fis.plugin('typescript', { fis.plugin('typescript', {
@ -978,7 +978,7 @@ if (fis.project.currentMedia() === 'publish') {
url: 'null', url: 'null',
useHash: false useHash: false
}); });
ghPages.match('{*.jsx,*.tsx,*.ts}', { ghPages.match('{*.jsx,*.tsx,*.ts,/examples/**.js,}', {
moduleId: function (m, path) { moduleId: function (m, path) {
return fis.util.md5('amis' + path); return fis.util.md5('amis' + path);
}, },

View File

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