docs: update doc
This commit is contained in:
parent
1c03fbb853
commit
1d2b46ea1b
@ -2,6 +2,19 @@
|
||||
|
||||
## To be released
|
||||
|
||||
- fix(plugin-export): allow to configure in acl
|
||||
- fix: sign in/sign up with enter key
|
||||
- fix(client): percent precision
|
||||
- feat: association field block (#493)
|
||||
- feat: plugin export (#479)
|
||||
- fix: create or delete collection error (#501)
|
||||
- feat: update collections & fields (#500)
|
||||
- fix: rollback when field creation fails (#498)
|
||||
- fix(client): set `dropdownMatchSelectWidth` to false globally (#497)
|
||||
- fix(client): no-key warning in user menu items (#496)
|
||||
- Feat(plugin workflow): cron field for schedule trigger configuration (#495)
|
||||
- feat: audit logs (#494)
|
||||
- fix(client): language settings
|
||||
- feat(client): improve locale
|
||||
- refactor(plugin-workflow): add revision column to execution (#491)
|
||||
- fix(plugin-multi-app-manager): fix pg cannot create database block tests
|
||||
@ -29,12 +42,14 @@
|
||||
|
||||
### New Features
|
||||
|
||||
- Fields: formula、relationships(o2o, o2m, m2o, m2m)
|
||||
- Blocks: charts(g2plot)
|
||||
- Fields: Formula、Relationships(o2o, o2m, m2o, m2m)
|
||||
- Blocks: Charts(g2plot)
|
||||
- Plugins: Audit logs, Export
|
||||
|
||||
### Break Changes
|
||||
|
||||
- The value of the percentage field, such as 20%, the new version is 0.2, the old version is 20
|
||||
- Deleted the sub-table field and used the one-to-many field instead
|
||||
|
||||
## 2022/06/01 ~ v0.7.0-alpha.83
|
||||
|
||||
|
@ -1,3 +0,0 @@
|
||||
# Charts
|
||||
|
||||
<code src="./demos/demo1.tsx"/>
|
@ -2,6 +2,19 @@
|
||||
|
||||
## To be released
|
||||
|
||||
- fix(plugin-export): allow to configure in acl
|
||||
- fix: sign in/sign up with enter key
|
||||
- fix(client): percent precision
|
||||
- feat: association field block (#493)
|
||||
- feat: plugin export (#479)
|
||||
- fix: create or delete collection error (#501)
|
||||
- feat: update collections & fields (#500)
|
||||
- fix: rollback when field creation fails (#498)
|
||||
- fix(client): set `dropdownMatchSelectWidth` to false globally (#497)
|
||||
- fix(client): no-key warning in user menu items (#496)
|
||||
- Feat(plugin workflow): cron field for schedule trigger configuration (#495)
|
||||
- feat: audit logs (#494)
|
||||
- fix(client): language settings
|
||||
- feat(client): improve locale
|
||||
- refactor(plugin-workflow): add revision column to execution (#491)
|
||||
- fix(plugin-multi-app-manager): fix pg cannot create database block tests
|
||||
@ -29,12 +42,14 @@
|
||||
|
||||
### New Features
|
||||
|
||||
- Fields: formula、relationships(o2o, o2m, m2o, m2m)
|
||||
- Blocks: charts(g2plot)
|
||||
- Fields: Formula、Relationships(o2o, o2m, m2o, m2m)
|
||||
- Blocks: Charts(g2plot)
|
||||
- Plugins: Audit logs, Export
|
||||
|
||||
### Break Changes
|
||||
|
||||
- The value of the percentage field, such as 20%, the new version is 0.2, the old version is 20
|
||||
- Deleted the sub-table field and used the one-to-many field instead
|
||||
|
||||
## 2022/06/01 ~ v0.7.0-alpha.83
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
import React from 'react';
|
||||
|
||||
export const Chart = () => {
|
||||
return <div>Chart</div>;
|
||||
};
|
@ -1 +0,0 @@
|
||||
export * from './Chart';
|
@ -0,0 +1,84 @@
|
||||
import { APIClient, APIClientProvider, G2Plot, SchemaComponent, SchemaComponentProvider } from '@nocobase/client';
|
||||
import MockAdapter from 'axios-mock-adapter';
|
||||
import React from 'react';
|
||||
|
||||
const api = new APIClient();
|
||||
|
||||
const mock = new MockAdapter(api.axios);
|
||||
|
||||
mock.onGet('/test').reply(200, {
|
||||
data: [
|
||||
{
|
||||
Date: '2010-01',
|
||||
scales: 1998,
|
||||
},
|
||||
{
|
||||
Date: '2010-02',
|
||||
scales: 1850,
|
||||
},
|
||||
{
|
||||
Date: '2010-03',
|
||||
scales: 1720,
|
||||
},
|
||||
{
|
||||
Date: '2010-04',
|
||||
scales: 1818,
|
||||
},
|
||||
{
|
||||
Date: '2010-05',
|
||||
scales: 1920,
|
||||
},
|
||||
{
|
||||
Date: '2010-06',
|
||||
scales: 1802,
|
||||
},
|
||||
{
|
||||
Date: '2010-07',
|
||||
scales: 1945,
|
||||
},
|
||||
{
|
||||
Date: '2010-08',
|
||||
scales: 1856,
|
||||
},
|
||||
{
|
||||
Date: '2010-09',
|
||||
scales: 2107,
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const fetchData = async (api: APIClient, options) => {
|
||||
const response = await api.request(options);
|
||||
return response?.data?.data;
|
||||
};
|
||||
|
||||
const schema = {
|
||||
type: 'void',
|
||||
name: 'line',
|
||||
'x-designer': 'G2Plot.Designer',
|
||||
'x-decorator': 'CardItem',
|
||||
'x-component': 'G2Plot',
|
||||
'x-component-props': {
|
||||
plot: 'Line',
|
||||
config: {
|
||||
data: '{{ fetchData(api, { url: "/test" }) }}',
|
||||
padding: 'auto',
|
||||
xField: 'Date',
|
||||
yField: 'scales',
|
||||
xAxis: {
|
||||
// type: 'timeCat',
|
||||
tickCount: 5,
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
export default () => {
|
||||
return (
|
||||
<APIClientProvider apiClient={api}>
|
||||
<SchemaComponentProvider>
|
||||
<SchemaComponent schema={schema} components={{ G2Plot }} scope={{ api, fetchData }} />
|
||||
</SchemaComponentProvider>
|
||||
</APIClientProvider>
|
||||
);
|
||||
};
|
@ -5,4 +5,6 @@ group:
|
||||
path: /schema-components
|
||||
---
|
||||
|
||||
# Chart <Badge>待定</Badge>
|
||||
# G2Plot
|
||||
|
||||
<code src="./demos/demo1.tsx"/>
|
@ -3,7 +3,6 @@ export * from './block-item';
|
||||
export * from './calendar';
|
||||
export * from './card-item';
|
||||
export * from './cascader';
|
||||
export * from './chart';
|
||||
export * from './checkbox';
|
||||
export * from './color-select';
|
||||
export * from './date-picker';
|
||||
|
Loading…
Reference in New Issue
Block a user