mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 13:37:37 +00:00
feat: improve text
This commit is contained in:
parent
6c779a7e6b
commit
f8c3c6a19b
@ -20,7 +20,7 @@ import { useState } from 'react';
|
||||
|
||||
const actionTypeMap = new Map(
|
||||
Object.entries({
|
||||
create: '创建',
|
||||
create: '添加',
|
||||
get: '查看',
|
||||
update: '编辑',
|
||||
destroy: '删除',
|
||||
|
@ -299,7 +299,7 @@ const schema: ISchema = {
|
||||
},
|
||||
[uid()]: {
|
||||
type: 'void',
|
||||
title: '创建',
|
||||
title: '添加',
|
||||
'x-align': 'right',
|
||||
'x-decorator': 'AddNew.Displayed',
|
||||
'x-decorator-props': {
|
||||
@ -313,7 +313,7 @@ const schema: ISchema = {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-component-props': {
|
||||
|
@ -61,18 +61,36 @@ export const UserInfo = () => {
|
||||
个人资料
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<Select
|
||||
className={'roles-select'}
|
||||
bordered={false}
|
||||
style={{ minWidth: 100, paddingLeft: 0 }}
|
||||
size={'small'}
|
||||
defaultValue={'admin'}
|
||||
options={[
|
||||
{ label: '超级管理员', value: 'admin' },
|
||||
{ label: '数据管理员', value: 'editor' },
|
||||
{ label: '普通成员', value: 'member' },
|
||||
]}
|
||||
/>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ marginRight: 16, display: 'inline-block' }}>角色切换</span>
|
||||
<Select
|
||||
className={'roles-select'}
|
||||
bordered={false}
|
||||
style={{ minWidth: 100 }}
|
||||
size={'small'}
|
||||
defaultValue={'admin'}
|
||||
options={[
|
||||
{ label: '超级管理员', value: 'admin' },
|
||||
{ label: '数据管理员', value: 'editor' },
|
||||
{ label: '普通成员', value: 'member' },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
<span style={{ marginRight: 16, display: 'inline-block' }}>语言设置</span>
|
||||
<Select
|
||||
className={'roles-select'}
|
||||
bordered={false}
|
||||
size={'small'}
|
||||
defaultValue={'zh-CN'}
|
||||
options={[
|
||||
{ label: '简体中文', value: 'zh-CN' },
|
||||
{ label: 'English', value: 'en-US' },
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
</Menu.Item>
|
||||
<Menu.Divider />
|
||||
<Menu.Item
|
||||
|
@ -34,7 +34,7 @@
|
||||
// }
|
||||
.roles-select {
|
||||
.ant-select-selector {
|
||||
padding-left: 0 !important;
|
||||
// padding-left: 0 !important;
|
||||
}
|
||||
}
|
||||
.nb-spin-center {
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: AddNew - 创建
|
||||
title: AddNew - 添加
|
||||
nav:
|
||||
title: 组件
|
||||
path: /client
|
||||
@ -9,7 +9,7 @@ group:
|
||||
path: /client/schemas
|
||||
---
|
||||
|
||||
# AddNew - 创建
|
||||
# AddNew - 添加
|
||||
|
||||
## Node Tree
|
||||
|
||||
|
@ -186,7 +186,7 @@ function generateCardItemSchema(component) {
|
||||
[uid()]: {
|
||||
type: 'void',
|
||||
name: 'action1',
|
||||
title: '创建',
|
||||
title: '添加',
|
||||
'x-align': 'right',
|
||||
'x-decorator': 'AddNew.Displayed',
|
||||
'x-decorator-props': {
|
||||
@ -201,7 +201,7 @@ function generateCardItemSchema(component) {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-component-props': {
|
||||
@ -382,7 +382,7 @@ function generateCardItemSchema(component) {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-decorator-props': {
|
||||
useResource: '{{ Kanban.useCreateResource }}',
|
||||
@ -507,7 +507,7 @@ function generateCardItemSchema(component) {
|
||||
},
|
||||
create: {
|
||||
type: 'void',
|
||||
title: '创建',
|
||||
title: '添加',
|
||||
'x-align': 'right',
|
||||
'x-designable-bar': 'Calendar.ActionDesignableBar',
|
||||
'x-component': 'Action',
|
||||
@ -522,7 +522,7 @@ function generateCardItemSchema(component) {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-component-props': {
|
||||
@ -1336,7 +1336,7 @@ AddNew.CardItem = observer((props: any) => {
|
||||
</Menu.ItemGroup>
|
||||
<Menu.Divider></Menu.Divider>
|
||||
<Menu.Item disabled key={'addNewRef'}>
|
||||
创建模板
|
||||
添加模板
|
||||
</Menu.Item>
|
||||
</Menu.SubMenu>
|
||||
</Menu>
|
||||
|
@ -164,7 +164,7 @@ function generateActionSchema(type) {
|
||||
},
|
||||
create: {
|
||||
type: 'void',
|
||||
title: '创建',
|
||||
title: '添加',
|
||||
'x-align': 'right',
|
||||
'x-designable-bar': 'Calendar.ActionDesignableBar',
|
||||
'x-component': 'Action',
|
||||
@ -179,7 +179,7 @@ function generateActionSchema(type) {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-component-props': {
|
||||
@ -223,7 +223,7 @@ function AddActionButton() {
|
||||
{ title: '标题', name: 'title' },
|
||||
{ title: '视图切换', name: 'viewSelect' },
|
||||
{ title: '筛选', name: 'filter' },
|
||||
{ title: '创建', name: 'create' },
|
||||
{ title: '添加', name: 'create' },
|
||||
].map((item) => (
|
||||
<SwitchMenuItem
|
||||
key={item.name}
|
||||
|
@ -92,7 +92,7 @@ const schema: ISchema = {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-component-props': {
|
||||
|
@ -183,8 +183,8 @@ export const DatabaseCollection = observer((props) => {
|
||||
>
|
||||
<Input.Search
|
||||
size={'middle'}
|
||||
placeholder={'创建数据表'}
|
||||
enterButton={<PlusOutlined />}
|
||||
placeholder={'填写数据表名称'}
|
||||
enterButton={<><PlusOutlined /> 创建</>}
|
||||
value={newValue}
|
||||
onChange={(e) => {
|
||||
setNewValue(e.target.value);
|
||||
|
@ -7,7 +7,7 @@ export const createdAt: FieldOptions = {
|
||||
type: 'object',
|
||||
group: 'systemInfo',
|
||||
order: 1,
|
||||
title: '创建时间',
|
||||
title: '添加时间',
|
||||
sortable: true,
|
||||
default: {
|
||||
dataType: 'date',
|
||||
@ -15,7 +15,7 @@ export const createdAt: FieldOptions = {
|
||||
// name,
|
||||
uiSchema: {
|
||||
type: 'datetime',
|
||||
title: '创建时间',
|
||||
title: '添加时间',
|
||||
'x-component': 'DatePicker',
|
||||
'x-component-props': {},
|
||||
'x-read-pretty': true,
|
||||
|
@ -7,7 +7,7 @@ export const createdBy: FieldOptions = {
|
||||
type: 'object',
|
||||
group: 'systemInfo',
|
||||
order: 3,
|
||||
title: '创建人',
|
||||
title: '添加人',
|
||||
isAssociation: true,
|
||||
default: {
|
||||
dataType: 'belongsTo',
|
||||
@ -16,7 +16,7 @@ export const createdBy: FieldOptions = {
|
||||
// name,
|
||||
uiSchema: {
|
||||
type: 'object',
|
||||
title: '创建人',
|
||||
title: '添加人',
|
||||
'x-component': 'Select.Drawer',
|
||||
'x-component-props': {
|
||||
fieldNames: {
|
||||
|
@ -27,7 +27,7 @@ group:
|
||||
</Form.Field>
|
||||
</Form>
|
||||
|
||||
// Form 用作 decorator 时只用于创建独立的作用域
|
||||
// Form 用作 decorator 时只用于添加独立的作用域
|
||||
<Table x-decorator={'Form'}/>
|
||||
</pre>
|
||||
|
||||
|
@ -137,8 +137,11 @@ const schema: ISchema = {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-decorator-props': {
|
||||
useResource: '{{ Kanban.useCreateResource }}',
|
||||
},
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-component-props': {
|
||||
useOkAction: '{{ Kanban.useCreateAction }}',
|
||||
|
@ -101,7 +101,7 @@ const SideMenu = (props: any) => {
|
||||
icon={<PlusOutlined />}
|
||||
className={`nb-add-new-menu-item menu-mode-inline designable-btn designable-btn-dash`}
|
||||
>
|
||||
创建菜单项
|
||||
添加菜单项
|
||||
</Button>
|
||||
</Menu.AddNew>
|
||||
</AntdMenu>
|
||||
@ -216,7 +216,7 @@ export const Menu: any = observer((props: any) => {
|
||||
icon={<PlusOutlined />}
|
||||
type={mode == 'inline' ? 'dashed' : 'primary'}
|
||||
>
|
||||
创建菜单项
|
||||
添加菜单项
|
||||
</Button>
|
||||
</Menu.AddNew>
|
||||
</AntdMenu>
|
||||
@ -404,7 +404,7 @@ Menu.AddNew = observer((props: any) => {
|
||||
const schemas = {
|
||||
'Menu.Link': {
|
||||
icon: <MenuOutlined />,
|
||||
title: '创建页面',
|
||||
title: '添加页面',
|
||||
schema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
@ -426,7 +426,7 @@ Menu.AddNew = observer((props: any) => {
|
||||
},
|
||||
'Menu.SubMenu': {
|
||||
icon: <GroupOutlined />,
|
||||
title: '创建分组',
|
||||
title: '添加分组',
|
||||
schema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
@ -448,7 +448,7 @@ Menu.AddNew = observer((props: any) => {
|
||||
},
|
||||
'Menu.URL': {
|
||||
icon: <LinkOutlined />,
|
||||
title: '创建链接',
|
||||
title: '添加链接',
|
||||
schema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
|
@ -139,7 +139,7 @@ export const SimpleDesignableBar = observer((props) => {
|
||||
'x-component': 'Select',
|
||||
enum: [
|
||||
{
|
||||
label: '创建数据',
|
||||
label: '添加数据',
|
||||
value: 'create',
|
||||
},
|
||||
{
|
||||
|
@ -53,13 +53,13 @@ const schema: ISchema = {
|
||||
[uid()]: {
|
||||
type: 'void',
|
||||
name: 'action1',
|
||||
title: '创建',
|
||||
title: '添加',
|
||||
'x-component': 'Action',
|
||||
'x-designable-bar': 'Table.Action.DesignableBar',
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-component': 'Action.Modal',
|
||||
'x-component-props': {
|
||||
|
@ -883,7 +883,7 @@ function generateActionSchema(type) {
|
||||
key: uid(),
|
||||
type: 'void',
|
||||
name: uid(),
|
||||
title: '创建',
|
||||
title: '添加',
|
||||
'x-align': 'right',
|
||||
'x-decorator': 'AddNew.Displayed',
|
||||
'x-decorator-props': {
|
||||
@ -898,7 +898,7 @@ function generateActionSchema(type) {
|
||||
properties: {
|
||||
modal: {
|
||||
type: 'void',
|
||||
title: '创建数据',
|
||||
title: '添加数据',
|
||||
'x-decorator': 'Form',
|
||||
'x-component': 'Action.Drawer',
|
||||
'x-component-props': {
|
||||
@ -1071,7 +1071,7 @@ function AddActionButton() {
|
||||
{[
|
||||
{ title: '筛选', name: 'filter' },
|
||||
{ title: '导出', name: 'export' },
|
||||
{ title: '创建', name: 'create' },
|
||||
{ title: '添加', name: 'create' },
|
||||
{ title: '删除', name: 'destroy' },
|
||||
].map((item) => (
|
||||
<SwitchMenuItem
|
||||
|
@ -119,7 +119,7 @@ export const Tabs: any = observer((props: any) => {
|
||||
type={'dashed'}
|
||||
icon={<PlusOutlined />}
|
||||
onClick={async () => {
|
||||
const values = await FormDialog('创建标签页', () => {
|
||||
const values = await FormDialog('添加标签页', () => {
|
||||
return (
|
||||
<FormLayout layout={'vertical'}>
|
||||
<SchemaField
|
||||
@ -172,7 +172,7 @@ export const Tabs: any = observer((props: any) => {
|
||||
await createSchema(data);
|
||||
}}
|
||||
>
|
||||
创建标签页
|
||||
添加标签页
|
||||
</Button>
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user