فهرست منبع

fix(table): align =left

Lind 3 سال پیش
والد
کامیت
fa2d191afe

+ 3 - 6
src/pages/device/Category/index.tsx

@@ -1,12 +1,11 @@
 import { PageContainer } from '@ant-design/pro-layout';
 import Service from '@/pages/device/Category/service';
-import type { ProColumns } from '@jetlinks/pro-table';
+import type { ActionType, ProColumns } from '@jetlinks/pro-table';
+import ProTable from '@jetlinks/pro-table';
 import { DeleteOutlined, EditOutlined, PlusOutlined } from '@ant-design/icons';
 import { Button, message, Popconfirm, Tooltip } from 'antd';
 import { useRef, useState } from 'react';
-import type { ActionType } from '@jetlinks/pro-table';
 import { useIntl } from '@@/plugin-locale/localeExports';
-import ProTable from '@jetlinks/pro-table';
 import Save from '@/pages/device/Category/Save';
 import { model } from '@formily/reactive';
 import { observer } from '@formily/react';
@@ -41,7 +40,6 @@ const Category = observer(() => {
     {
       title: '分类排序',
       dataIndex: 'sortIndex',
-      align: 'center',
       // render: (text) => (
       //   <Space>{text}<EditOutlined onClick={() => {
 
@@ -55,7 +53,6 @@ const Category = observer(() => {
       }),
       dataIndex: 'description',
       width: 300,
-      align: 'center',
       ellipsis: true,
     },
     {
@@ -64,7 +61,7 @@ const Category = observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
+      width: 200,
       render: (text, record) => [
         <a
           key={'edit'}

+ 0 - 1
src/pages/device/Instance/index.tsx

@@ -237,7 +237,6 @@ const Instance = () => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (text, record) => tools(record),
     },

+ 0 - 9
src/pages/device/Product/Detail/Access/index.tsx

@@ -54,7 +54,6 @@ const Access = () => {
       dataIndex: 'group',
       key: 'group',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}
@@ -66,14 +65,12 @@ const Access = () => {
       dataIndex: 'qos',
       key: 'qos',
       ellipsis: true,
-      align: 'center',
     },
     {
       title: '地址',
       dataIndex: 'address',
       key: 'address',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}
@@ -85,7 +82,6 @@ const Access = () => {
       dataIndex: 'topic',
       key: 'topic',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}
@@ -97,7 +93,6 @@ const Access = () => {
       dataIndex: 'description',
       key: 'description',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}
@@ -112,7 +107,6 @@ const Access = () => {
       dataIndex: 'address',
       key: 'address',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}
@@ -124,7 +118,6 @@ const Access = () => {
       dataIndex: 'group',
       key: 'group',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}
@@ -136,7 +129,6 @@ const Access = () => {
       dataIndex: 'example',
       key: 'example',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}
@@ -148,7 +140,6 @@ const Access = () => {
       dataIndex: 'description',
       key: 'description',
       ellipsis: true,
-      align: 'center',
       render: (text: any) => (
         <Tooltip placement="top" title={text}>
           {text}

+ 0 - 1
src/pages/device/Product/index.tsx

@@ -251,7 +251,6 @@ const Product = observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (_, record) => tools(record),
     },

+ 5 - 5
src/pages/device/components/Metadata/Base/columns.ts

@@ -2,11 +2,11 @@ import type { ProColumns } from '@jetlinks/pro-table';
 import type { MetadataItem } from '@/pages/device/Product/typings';
 
 const BaseColumns: ProColumns<MetadataItem>[] = [
-  {
-    dataIndex: 'index',
-    valueType: 'indexBorder',
-    width: 48,
-  },
+  // {
+  //   dataIndex: 'index',
+  //   valueType: 'indexBorder',
+  //   width: 48,
+  // },
   {
     title: '标识',
     dataIndex: 'id',

+ 0 - 1
src/pages/link/Protocol/index.tsx

@@ -69,7 +69,6 @@ const Protocol = () => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (text, record) => [
         <a

+ 0 - 2
src/pages/link/Type/index.tsx

@@ -57,7 +57,6 @@ const Network = () => {
       dataIndex: 'configuration',
       title: '详情',
       renderText: (text, record) => {
-        console.log(record, '详情');
         if (record.shareCluster) {
           const publicHost = record.configuration.publicHost;
           const publicPort = record.configuration.publicPort;
@@ -103,7 +102,6 @@ const Network = () => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (text, record) => [
         <a

+ 0 - 1
src/pages/system/Department/Member/index.tsx

@@ -119,7 +119,6 @@ const Member = observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (text, record) => [
         <Popconfirm

+ 0 - 1
src/pages/system/Department/index.tsx

@@ -79,7 +79,6 @@ export default observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 240,
       render: (text, record) => [
         <a

+ 0 - 1
src/pages/system/Menu/index.tsx

@@ -124,7 +124,6 @@ export default observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 240,
       render: (_, record) => [
         <a

+ 0 - 4
src/pages/system/Permission/index.tsx

@@ -110,7 +110,6 @@ const Permission: React.FC = observer(() => {
       dataIndex: 'id',
       // copyable: true,
       ellipsis: true,
-      align: 'center',
       // sorter: true,
       defaultSortOrder: 'ascend',
     },
@@ -122,7 +121,6 @@ const Permission: React.FC = observer(() => {
       dataIndex: 'name',
       // copyable: true,
       ellipsis: true,
-      align: 'center',
     },
     {
       title: intl.formatMessage({
@@ -131,7 +129,6 @@ const Permission: React.FC = observer(() => {
       }),
       dataIndex: 'status',
       // filters: true,
-      align: 'center',
       valueType: 'select',
       valueEnum: {
         1: {
@@ -159,7 +156,6 @@ const Permission: React.FC = observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (text, record) => [
         <a

+ 0 - 1
src/pages/system/Role/index.tsx

@@ -79,7 +79,6 @@ const Role: React.FC = observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (text, record) => [
         <Link to={`/system/role/edit/${record.id}`} key="link">

+ 0 - 4
src/pages/system/User/index.tsx

@@ -38,7 +38,6 @@ const User = observer(() => {
       dataIndex: 'name',
       // copyable: true,
       ellipsis: true,
-      align: 'center',
       // tip: intl.formatMessage({
       //   id: 'pages.system.name.tips',
       //   defaultMessage: '姓名过长会自动收缩',
@@ -62,7 +61,6 @@ const User = observer(() => {
       dataIndex: 'username',
       // copyable: true,
       ellipsis: true,
-      align: 'center',
       // tip: intl.formatMessage({
       //   id: 'pages.system.userName.tips',
       //   defaultMessage: '用户名过长会自动收缩',
@@ -84,7 +82,6 @@ const User = observer(() => {
       }),
       dataIndex: 'status',
       // filters: true,
-      align: 'center',
       // onFilter: true,
       valueType: 'select',
       valueEnum: {
@@ -113,7 +110,6 @@ const User = observer(() => {
         defaultMessage: '操作',
       }),
       valueType: 'option',
-      align: 'center',
       width: 200,
       render: (text, record) => [
         <a key="editable" onClick={() => edit(record)}>