mirror of
https://gitee.com/nocobase/nocobase.git
synced 2025-05-05 21:49:25 +08:00
refactor(client): change block initializers icons (#5757)
This commit is contained in:
parent
9ddb4c179e
commit
b59d53dde8
@ -7,7 +7,7 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TableOutlined } from '@ant-design/icons';
|
import { ProfileOutlined } from '@ant-design/icons';
|
||||||
import React, { useCallback } from 'react';
|
import React, { useCallback } from 'react';
|
||||||
import { useSchemaInitializer, useSchemaInitializerItem } from '../../../../application';
|
import { useSchemaInitializer, useSchemaInitializerItem } from '../../../../application';
|
||||||
import { useCollectionManager_deprecated } from '../../../../collection-manager';
|
import { useCollectionManager_deprecated } from '../../../../collection-manager';
|
||||||
@ -50,7 +50,7 @@ export const DetailsBlockInitializer = ({
|
|||||||
return (
|
return (
|
||||||
<DataBlockInitializer
|
<DataBlockInitializer
|
||||||
{...itemConfig}
|
{...itemConfig}
|
||||||
icon={<TableOutlined />}
|
icon={<ProfileOutlined />}
|
||||||
componentType={componentType}
|
componentType={componentType}
|
||||||
onCreateBlockSchema={async (options) => {
|
onCreateBlockSchema={async (options) => {
|
||||||
if (createBlockSchema) {
|
if (createBlockSchema) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { OrderedListOutlined } from '@ant-design/icons';
|
import { AppstoreOutlined } from '@ant-design/icons';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useSchemaInitializer, useSchemaInitializerItem } from '../../../../application';
|
import { useSchemaInitializer, useSchemaInitializerItem } from '../../../../application';
|
||||||
import { useCollectionManager_deprecated } from '../../../../collection-manager';
|
import { useCollectionManager_deprecated } from '../../../../collection-manager';
|
||||||
@ -48,7 +48,7 @@ export const GridCardBlockInitializer = ({
|
|||||||
return (
|
return (
|
||||||
<DataBlockInitializer
|
<DataBlockInitializer
|
||||||
{...itemConfig}
|
{...itemConfig}
|
||||||
icon={<OrderedListOutlined />}
|
icon={<AppstoreOutlined />}
|
||||||
componentType={`GridCard`}
|
componentType={`GridCard`}
|
||||||
onCreateBlockSchema={async (options) => {
|
onCreateBlockSchema={async (options) => {
|
||||||
if (createBlockSchema) {
|
if (createBlockSchema) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { TableOutlined } from '@ant-design/icons';
|
import { RightSquareOutlined } from '@ant-design/icons';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { useSchemaInitializer, useSchemaInitializerItem } from '../../../../application';
|
import { useSchemaInitializer, useSchemaInitializerItem } from '../../../../application';
|
||||||
@ -31,7 +31,7 @@ export const FilterCollapseBlockInitializer = ({
|
|||||||
<DataBlockInitializer
|
<DataBlockInitializer
|
||||||
{...itemConfig}
|
{...itemConfig}
|
||||||
onlyCurrentDataSource={onlyCurrentDataSource}
|
onlyCurrentDataSource={onlyCurrentDataSource}
|
||||||
icon={<TableOutlined />}
|
icon={<RightSquareOutlined />}
|
||||||
componentType={`FilterCollapse`}
|
componentType={`FilterCollapse`}
|
||||||
onCreateBlockSchema={async ({ item }) => {
|
onCreateBlockSchema={async ({ item }) => {
|
||||||
const schema = createCollapseBlockSchema({
|
const schema = createCollapseBlockSchema({
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormOutlined } from '@ant-design/icons';
|
import { PicRightOutlined } from '@ant-design/icons';
|
||||||
import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client';
|
import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
@ -17,7 +17,7 @@ export const IframeBlockInitializer = () => {
|
|||||||
return (
|
return (
|
||||||
<SchemaInitializerItem
|
<SchemaInitializerItem
|
||||||
{...itemConfig}
|
{...itemConfig}
|
||||||
icon={<FormOutlined />}
|
icon={<PicRightOutlined />}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
insert({
|
insert({
|
||||||
type: 'void',
|
type: 'void',
|
||||||
|
@ -14,7 +14,7 @@ import { blockSchema } from './blockSchema';
|
|||||||
export const workbenchBlockInitializerItem: SchemaInitializerItemType = {
|
export const workbenchBlockInitializerItem: SchemaInitializerItemType = {
|
||||||
type: 'item',
|
type: 'item',
|
||||||
name: 'workbenchBlock',
|
name: 'workbenchBlock',
|
||||||
icon: 'FileImageOutlined',
|
icon: 'AppstoreAddOutlined',
|
||||||
useComponentProps() {
|
useComponentProps() {
|
||||||
const { t } = useTranslation('@nocobase/plugin-block-workbench');
|
const { t } = useTranslation('@nocobase/plugin-block-workbench');
|
||||||
const { insert } = useSchemaInitializer();
|
const { insert } = useSchemaInitializer();
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormOutlined } from '@ant-design/icons';
|
import { CalendarOutlined } from '@ant-design/icons';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@formily/antd-v5';
|
||||||
import { SchemaOptionsContext } from '@formily/react';
|
import { SchemaOptionsContext } from '@formily/react';
|
||||||
import {
|
import {
|
||||||
@ -46,7 +46,7 @@ export const CalendarBlockInitializer = ({
|
|||||||
<DataBlockInitializer
|
<DataBlockInitializer
|
||||||
{...itemConfig}
|
{...itemConfig}
|
||||||
componentType={`Calendar`}
|
componentType={`Calendar`}
|
||||||
icon={<FormOutlined />}
|
icon={<CalendarOutlined />}
|
||||||
onCreateBlockSchema={async (options) => {
|
onCreateBlockSchema={async (options) => {
|
||||||
if (createBlockSchema) {
|
if (createBlockSchema) {
|
||||||
return createBlockSchema(options);
|
return createBlockSchema(options);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormOutlined } from '@ant-design/icons';
|
import { ProjectOutlined } from '@ant-design/icons';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@formily/antd-v5';
|
||||||
import { SchemaOptionsContext } from '@formily/react';
|
import { SchemaOptionsContext } from '@formily/react';
|
||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
@ -47,7 +47,7 @@ export const GanttBlockInitializer = ({
|
|||||||
<DataBlockInitializer
|
<DataBlockInitializer
|
||||||
{...itemConfig}
|
{...itemConfig}
|
||||||
componentType={`Gantt`}
|
componentType={`Gantt`}
|
||||||
icon={<FormOutlined />}
|
icon={<ProjectOutlined rotate={90} />}
|
||||||
onCreateBlockSchema={async (options) => {
|
onCreateBlockSchema={async (options) => {
|
||||||
if (createBlockSchema) {
|
if (createBlockSchema) {
|
||||||
return createBlockSchema(options);
|
return createBlockSchema(options);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* For more information, please refer to: https://www.nocobase.com/agreement.
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { FormOutlined } from '@ant-design/icons';
|
import { ProjectOutlined } from '@ant-design/icons';
|
||||||
import { FormLayout } from '@formily/antd-v5';
|
import { FormLayout } from '@formily/antd-v5';
|
||||||
import { SchemaOptionsContext, useForm } from '@formily/react';
|
import { SchemaOptionsContext, useForm } from '@formily/react';
|
||||||
import React, { useContext } from 'react';
|
import React, { useContext } from 'react';
|
||||||
@ -131,7 +131,7 @@ export const KanbanBlockInitializer = ({
|
|||||||
<DataBlockInitializer
|
<DataBlockInitializer
|
||||||
{...itemConfig}
|
{...itemConfig}
|
||||||
componentType={`Kanban`}
|
componentType={`Kanban`}
|
||||||
icon={<FormOutlined />}
|
icon={<ProjectOutlined />}
|
||||||
onCreateBlockSchema={async (options) => {
|
onCreateBlockSchema={async (options) => {
|
||||||
if (createBlockSchema) {
|
if (createBlockSchema) {
|
||||||
return createBlockSchema(options);
|
return createBlockSchema(options);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user