From 4496dd8e7fff99a450bc3366078739d0cf67ddb8 Mon Sep 17 00:00:00 2001
From: Tyh2001 <1469442737@qq.com>
Date: Sun, 17 Dec 2023 17:53:00 +0800
Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E8=A1=A8=E6=A0=BC?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
packages/fighting-design/table/src/props.ts | 2 +
.../fighting-design/table/src/table copy.vue | 153 ------------------
packages/fighting-design/table/src/table.vue | 16 +-
packages/fighting-theme/src/table.scss | 6 +-
start/src/App.vue | 25 ++-
5 files changed, 34 insertions(+), 168 deletions(-)
delete mode 100644 packages/fighting-design/table/src/table copy.vue
diff --git a/packages/fighting-design/table/src/props.ts b/packages/fighting-design/table/src/props.ts
index b9f2b4d003..1cea0411ae 100644
--- a/packages/fighting-design/table/src/props.ts
+++ b/packages/fighting-design/table/src/props.ts
@@ -31,6 +31,8 @@ export const Props = {
zebraColor: setStringProp(),
/** 自定义表格高度 */
height: setStringNumberProp(),
+ /** 自定义表格宽度 */
+ width: setStringNumberProp(),
/** 自定义背景颜色 */
bgColor: setStringProp(),
/** 自定义头部背景颜色 */
diff --git a/packages/fighting-design/table/src/table copy.vue b/packages/fighting-design/table/src/table copy.vue
deleted file mode 100644
index 2c18fbc049..0000000000
--- a/packages/fighting-design/table/src/table copy.vue
+++ /dev/null
@@ -1,153 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 序号 |
-
-
-
-
-
-
-
-
- {{ column.title }}
-
- |
-
-
-
-
-
-
-
- {{ m + 1 }} |
-
-
-
-
-
-
-
-
-
-
-
- {{ item[column.key] }}
-
-
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/packages/fighting-design/table/src/table.vue b/packages/fighting-design/table/src/table.vue
index 6db3dcff3f..812ff2d5c2 100644
--- a/packages/fighting-design/table/src/table.vue
+++ b/packages/fighting-design/table/src/table.vue
@@ -71,16 +71,18 @@
https://developer.mozilla.org/zh-CN/docs/Web/HTML/Element/colgroup
-->
+
- 序号 |
+ # |
@@ -100,19 +102,21 @@
-
+
+
- 序号 |
+ # |
@@ -128,7 +132,7 @@
|
-
+
{{ m + 1 }} |
diff --git a/packages/fighting-theme/src/table.scss b/packages/fighting-theme/src/table.scss
index e3a4e18b6e..482f85d82b 100644
--- a/packages/fighting-theme/src/table.scss
+++ b/packages/fighting-theme/src/table.scss
@@ -1,7 +1,6 @@
.f-table {
display: block;
position: relative;
- width: 100%;
// 主容器
&__container {
@@ -9,7 +8,6 @@
box-sizing: border-box;
overflow: hidden;
background-color: var(--table-bg-color, #fff);
- width: 100%;
// 身体
.f-table__body {
@@ -19,7 +17,6 @@
// table 公共样式
table {
- width: 100%;
border-spacing: 0;
border-collapse: collapse;
table-layout: fixed;
@@ -29,7 +26,7 @@
// 头部
thead {
background-color: var(--table-head-bg-color, #f7f7f7);
- font-size: 16px;
+ font-size: 15px;
color: #4e4e4e;
height: 45px;
position: relative;
@@ -46,6 +43,7 @@
font-size: 15px;
color: #4f4f4f;
word-wrap: break-word;
+ font-weight: 600;
}
}
}
diff --git a/start/src/App.vue b/start/src/App.vue
index 03ef64ebd8..b324991df1 100644
--- a/start/src/App.vue
+++ b/start/src/App.vue
@@ -10,27 +10,40 @@
{
title: '姓名',
key: 'name'
+ // width: 300
+ },
+ {
+ title: '姓名',
+ key: 'name'
+ // width: 300
+ },
+ {
+ title: '姓名',
+ key: 'name'
+ // width: 300
},
{
// title: '年龄',
title: h => {
return h('div', { class: 'table-wrapper' }, [
- h(FButton, { type: 'info' }, { default: () => '按钮1' })
+ h(FButton, { type: 'info' }, { default: () => '年龄' })
])
},
key: 'age'
+ // width: 500
},
{
title: '介绍',
key: 'introduce'
+ // width: 500
},
// RenderReturn
{
title: '操作',
render: (h, a, v, cc) => {
- console.log(h, a, v, cc)
+ // console.log(h, a, v, cc)
return h('div', { class: 'table-wrapper' }, [
- h(FButton, { type: 'info' }, { default: () => '按钮1' }),
+ h(FButton, { type: 'info', round: true }, { default: () => '按钮1' }),
h(FButton, { type: 'info' }, { default: () => '按钮2' })
])
}
@@ -41,7 +54,8 @@
{
name: '卡莉斯塔',
age: '22',
- introduce: 'dhasjhdjahdjasdhjadhasjhdasjhdasjhdjdj'
+ introduce:
+ '大环境的还是决定大数据等哈就和大家安徽的就撒欢的讲话大声讲话打击很大今后的骄傲和打击很大机会大家'
},
{
name: '艾希',
@@ -62,7 +76,8 @@
-
+
+
|