Просмотр исходного кода

<a> 风格按钮改为 <button type='link'>

visuddhinanda 3 лет назад
Родитель
Сommit
41a1260228

+ 2 - 1
dashboard/src/locales/zh-Hans/term/index.ts

@@ -2,7 +2,8 @@ const items = {
   "term": "字典",
   "term": "字典",
   "term.fields.sn.label": "序号",
   "term.fields.sn.label": "序号",
   "term.fields.word.label": "词头",
   "term.fields.word.label": "词头",
-  "term.fields.tag.label": "标签",
+  "term.fields.description.label": "标签",
+  "term.fields.description.tooltip": "单词说明,可以用来区分相同拼写的不同单词。",
   "term.fields.channel.label": "所属版本",
   "term.fields.channel.label": "所属版本",
   "term.fields.meaning.label": "意思",
   "term.fields.meaning.label": "意思",
   "term.fields.meaning2.label": "其他意思",
   "term.fields.meaning2.label": "其他意思",

+ 4 - 4
dashboard/src/pages/studio/dict/index.tsx

@@ -134,17 +134,17 @@ const Widget = () => {
 			<Space size={24}>
 			<Space size={24}>
 			<span>
 			<span>
 				已选 {selectedRowKeys.length} 项
 				已选 {selectedRowKeys.length} 项
-				<a style={{ marginInlineStart: 8 }} onClick={onCleanSelected}>
+				<Button type="link" style={{ marginInlineStart: 8 }} onClick={onCleanSelected}>
 				取消选择
 				取消选择
-				</a>
+				</Button>
 			</span>
 			</span>
 			</Space>
 			</Space>
 		)}
 		)}
 		tableAlertOptionRender={() => {
 		tableAlertOptionRender={() => {
 			return (
 			return (
 			<Space size={16}>
 			<Space size={16}>
-				<a>批量删除</a>
-				<a>导出数据</a>
+				<Button type="link">批量删除</Button>
+				<Button type="link">导出数据</Button>
 			</Space>
 			</Space>
 			);
 			);
 		}}
 		}}

+ 6 - 13
dashboard/src/pages/studio/term/index.tsx

@@ -22,13 +22,6 @@ interface IItem {
   createdAt: number;
   createdAt: number;
 }
 }
 
 
-const valueEnum = {
-	0: 'n',
-	1: 'ti',
-	2: 'v',
-	3: 'ind',
-  };
-
 
 
 const Widget = () => {
 const Widget = () => {
   const intl = useIntl();
   const intl = useIntl();
@@ -67,9 +60,9 @@ const Widget = () => {
 			},
 			},
 			},
 			},
 			{
 			{
-				title: intl.formatMessage({ id: "term.fields.tag.label" }),
+				title: intl.formatMessage({ id: "term.fields.description.label" }),
 				dataIndex: "tag",
 				dataIndex: "tag",
-				key: "tag",
+				key: "description",
 				search: false,
 				search: false,
 			},
 			},
 			{
 			{
@@ -124,17 +117,17 @@ const Widget = () => {
 			<Space size={24}>
 			<Space size={24}>
 			<span>
 			<span>
 				已选 {selectedRowKeys.length} 项
 				已选 {selectedRowKeys.length} 项
-				<a style={{ marginInlineStart: 8 }} onClick={onCleanSelected}>
+				<Button type="link" style={{ marginInlineStart: 8 }} onClick={onCleanSelected}>
 				取消选择
 				取消选择
-				</a>
+				</Button>
 			</span>
 			</span>
 			</Space>
 			</Space>
 		)}
 		)}
 		tableAlertOptionRender={() => {
 		tableAlertOptionRender={() => {
 			return (
 			return (
 			<Space size={16}>
 			<Space size={16}>
-				<a>批量删除</a>
-				<a>导出数据</a>
+				<Button type="link">批量删除</Button>
+				<Button type="link">导出数据</Button>
 			</Space>
 			</Space>
 			);
 			);
 		}}
 		}}