Skip to content

Commit

Permalink
fix: 修复 f-table 组件对于英文字母的文字不换行样式的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Dec 15, 2023
1 parent 3330d9d commit dae079c
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md)

- 修复 `f-table` 组件对于英文字母的文字不换行样式的问题

## 0.65.0 (2023-12-12)

- 更新 `f-menu` 组件 `on-menu-item-click``on-submenu-click` 方法参数接收顺序
Expand Down
2 changes: 2 additions & 0 deletions packages/fighting-theme/src/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
box-sizing: border-box;
font-size: 15px;
color: #4f4f4f;
word-wrap: break-word;
}
}
}
Expand All @@ -68,6 +69,7 @@
font-size: 15px;
box-sizing: border-box;
color: #333;
word-wrap: break-word;
}
}
}
Expand Down
63 changes: 61 additions & 2 deletions start/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,62 @@
<script lang="ts" setup></script>
<script lang="ts" setup>
import { ref } from 'vue'
import { FButton } from 'fighting-design'
<template></template>
const columns = ref([
{
title: '姓名',
key: 'name'
},
{
title: '年龄',
key: 'age'
},
{
title: '介绍',
key: 'introduce'
},
{
name: '操作',
render: h => {
return h('div', { class: 'table-wrapper' }, [
h(FButton, { type: 'info' }, { default: () => '按钮1' }),
h(FButton, { type: 'info' }, { default: () => '按钮2' })
])
}
}
])
const data = ref([
{
name: '卡莉斯塔',
age: '22',
introduce: 'dhasjhdjahdjasdhjadhasjhdasjhdasjhdjdj'
},
{
name: '艾希',
age: '16',
introduce: '拥有强大减速和控制能力的远程射手'
},
{
name: '李青',
age: '34',
introduce: '非常优秀的打野英雄'
},
{
name: '贾克斯',
age: '109',
introduce: '取得优势的武器可以输出成吨的伤害'
}
])
</script>

<template>
<f-table :data="data" :columns="columns" />
</template>

<style>
.table-wrapper {
display: flex;
column-gap: 20px;
}
</style>

0 comments on commit dae079c

Please sign in to comment.