fix: minor problems (#72)
This commit is contained in:
parent
d0d7751d49
commit
9495917e97
@ -48,9 +48,9 @@ Why choose NocoBase
|
|||||||
- Precise configuration of data manipulation rights, access rights to pages and menus
|
- Precise configuration of data manipulation rights, access rights to pages and menus
|
||||||
- **Developer-friendly**
|
- **Developer-friendly**
|
||||||
- Microkernel architecture, flexible and easy to extend, with a robust plug-in system
|
- Microkernel architecture, flexible and easy to extend, with a robust plug-in system
|
||||||
- Node.js-based, using mainstream frameworks and technologies, including Koa, Sequelize, React, Ant Design, etc.
|
- Node.js-based, with popular frameworks and technologies, including Koa, Sequelize, React, Ant Design, etc.
|
||||||
- Progressive development, low start-up difficulty, friendly to newcomers
|
- Progressive development, easy for getting-started, friendly to newcomers
|
||||||
- No abduction, no strong dependencies, can be used in any combination or extensions, can be used in existing projects
|
- No binding, no strong dependencies, can be used in any combination or extensions, can be used in existing projects
|
||||||
|
|
||||||
Architecture
|
Architecture
|
||||||
----------
|
----------
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "cd packages/app && npm start",
|
"start": "cd packages/app && npm start",
|
||||||
"start-server": "cd packages/api && nodemon",
|
"start-server": "cd packages/api && npm start",
|
||||||
"start-client": "cd packages/app && umi dev",
|
"start-client": "cd packages/app && npx umi dev",
|
||||||
"bootstrap": "lerna bootstrap --no-ci",
|
"bootstrap": "lerna bootstrap --no-ci",
|
||||||
"build": "father-build",
|
"build": "father-build",
|
||||||
"clean": "lerna clean",
|
"clean": "lerna clean",
|
||||||
|
@ -9,7 +9,7 @@ import {
|
|||||||
BELONGSTOMANY,
|
BELONGSTOMANY,
|
||||||
whereCompare
|
whereCompare
|
||||||
} from '@nocobase/database';
|
} from '@nocobase/database';
|
||||||
import { DEFAULT_PAGE, DEFAULT_PER_PAGE } from '@nocobase/resourcer';
|
import { PageParameter } from '@nocobase/resourcer';
|
||||||
import { filterByFields } from '../utils';
|
import { filterByFields } from '../utils';
|
||||||
|
|
||||||
async function hasManyGet(instances, options: any = {}) {
|
async function hasManyGet(instances, options: any = {}) {
|
||||||
@ -158,8 +158,8 @@ async function belongsToManyGet(instance, options) {
|
|||||||
*/
|
*/
|
||||||
export async function list(ctx: Context, next: Next) {
|
export async function list(ctx: Context, next: Next) {
|
||||||
const {
|
const {
|
||||||
page = DEFAULT_PAGE,
|
page = PageParameter.DEFAULT_PAGE,
|
||||||
perPage = DEFAULT_PER_PAGE,
|
perPage = PageParameter.DEFAULT_PER_PAGE,
|
||||||
sort = [],
|
sort = [],
|
||||||
fields = [],
|
fields = [],
|
||||||
filter = {},
|
filter = {},
|
||||||
|
@ -337,7 +337,7 @@ export function Actions(props) {
|
|||||||
{actions.map(
|
{actions.map(
|
||||||
action =>
|
action =>
|
||||||
ACTIONS.has(action.type) && (
|
ACTIONS.has(action.type) && (
|
||||||
<div className={`${action.type}-action-button action-button`}>
|
<div key={action.__index} className={`${action.type}-action-button action-button`}>
|
||||||
<Action
|
<Action
|
||||||
{...restProps}
|
{...restProps}
|
||||||
onFinish={onTrigger[action.type]}
|
onFinish={onTrigger[action.type]}
|
||||||
|
@ -67,7 +67,7 @@ export function Page(props: any) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className={`noco-col noco-col-${span} float-${float}`}>
|
<div key={view.__index} className={`noco-col noco-col-${span} float-${float}`}>
|
||||||
<View
|
<View
|
||||||
wrapper={'card'}
|
wrapper={'card'}
|
||||||
currentRowId={currentRowId}
|
currentRowId={currentRowId}
|
||||||
|
@ -236,7 +236,7 @@ export function Kanban(props: any) {
|
|||||||
<Descriptions column={1} size={'small'} layout={'vertical'}>
|
<Descriptions column={1} size={'small'} layout={'vertical'}>
|
||||||
{fields.map((field: any) => {
|
{fields.map((field: any) => {
|
||||||
return (
|
return (
|
||||||
<Descriptions.Item label={field.title || field.name}>
|
<Descriptions.Item key={field.id} label={field.title || field.name}>
|
||||||
<Field
|
<Field
|
||||||
data={data}
|
data={data}
|
||||||
viewType={'descriptions'}
|
viewType={'descriptions'}
|
||||||
|
@ -424,7 +424,7 @@ export function AttachmentField(props: any) {
|
|||||||
}
|
}
|
||||||
const values = Array.isArray(value) ? value : [value];
|
const values = Array.isArray(value) ? value : [value];
|
||||||
const images = getImgUrls(values);
|
const images = getImgUrls(values);
|
||||||
console.log(images);
|
// console.log(images);
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
onClick={e => {
|
onClick={e => {
|
||||||
|
@ -172,10 +172,6 @@ export interface ActionParams {
|
|||||||
[key: string]: any;
|
[key: string]: any;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DEFAULT_PAGE = PageParameter.DEFAULT_PAGE;
|
|
||||||
export const DEFAULT_PER_PAGE = PageParameter.DEFAULT_PER_PAGE;
|
|
||||||
export const MAX_PER_PAGE = PageParameter.MAX_PER_PAGE;
|
|
||||||
|
|
||||||
export class Action {
|
export class Action {
|
||||||
|
|
||||||
protected handler: any;
|
protected handler: any;
|
||||||
|
@ -3,6 +3,7 @@ import Resourcer from './resourcer';
|
|||||||
export * from './utils';
|
export * from './utils';
|
||||||
export * from './middleware';
|
export * from './middleware';
|
||||||
export * from './action';
|
export * from './action';
|
||||||
|
export * from './parameter';
|
||||||
export * from './resource';
|
export * from './resource';
|
||||||
export * from './resourcer';
|
export * from './resourcer';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user