Commit 3f7cad02d4f825c21204f0c6bf46c80ddaa29828
1 parent
d9700411
perf: add tooltip for remark column
Showing
4 changed files
with
20 additions
and
4 deletions
| @@ -16,6 +16,11 @@ | @@ -16,6 +16,11 @@ | ||
| 16 | </Popconfirm> | 16 | </Popconfirm> |
| 17 | </Authority> | 17 | </Authority> |
| 18 | </template> | 18 | </template> |
| 19 | + <template #remark="{ record }"> | ||
| 20 | + <Tooltip :title="record.remark"> | ||
| 21 | + <div class="truncate w-full">{{ record.remark }}</div> | ||
| 22 | + </Tooltip> | ||
| 23 | + </template> | ||
| 19 | <template #action="{ record }"> | 24 | <template #action="{ record }"> |
| 20 | <TableAction | 25 | <TableAction |
| 21 | :actions="[ | 26 | :actions="[ |
| @@ -51,11 +56,11 @@ | @@ -51,11 +56,11 @@ | ||
| 51 | import EmailDetail from './EmailDetail.vue'; | 56 | import EmailDetail from './EmailDetail.vue'; |
| 52 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; | 57 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; |
| 53 | import { Authority } from '/@/components/Authority'; | 58 | import { Authority } from '/@/components/Authority'; |
| 54 | - import { Popconfirm } from 'ant-design-vue'; | 59 | + import { Popconfirm, Tooltip } from 'ant-design-vue'; |
| 55 | 60 | ||
| 56 | export default defineComponent({ | 61 | export default defineComponent({ |
| 57 | name: 'EmailLog', | 62 | name: 'EmailLog', |
| 58 | - components: { EmailDetail, BasicTable, TableAction, Authority, Popconfirm }, | 63 | + components: { EmailDetail, BasicTable, TableAction, Authority, Popconfirm, Tooltip }, |
| 59 | setup() { | 64 | setup() { |
| 60 | const [registerModal, { openModal }] = useModal(); | 65 | const [registerModal, { openModal }] = useModal(); |
| 61 | const [registerTable, { reload, setProps }] = useTable({ | 66 | const [registerTable, { reload, setProps }] = useTable({ |
| @@ -16,6 +16,11 @@ | @@ -16,6 +16,11 @@ | ||
| 16 | </Popconfirm> | 16 | </Popconfirm> |
| 17 | </Authority> | 17 | </Authority> |
| 18 | </template> | 18 | </template> |
| 19 | + <template #remark="{ record }"> | ||
| 20 | + <Tooltip :title="record.remark"> | ||
| 21 | + <div class="truncate w-full">{{ record.remark }}</div> | ||
| 22 | + </Tooltip> | ||
| 23 | + </template> | ||
| 19 | <template #action="{ record }"> | 24 | <template #action="{ record }"> |
| 20 | <TableAction | 25 | <TableAction |
| 21 | :actions="[ | 26 | :actions="[ |
| @@ -45,7 +50,7 @@ | @@ -45,7 +50,7 @@ | ||
| 45 | import { defineComponent, h, nextTick } from 'vue'; | 50 | import { defineComponent, h, nextTick } from 'vue'; |
| 46 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; | 51 | import { BasicTable, useTable, TableAction } from '/@/components/Table'; |
| 47 | import { columns, searchFormSchema } from './sms.data'; | 52 | import { columns, searchFormSchema } from './sms.data'; |
| 48 | - import { Modal, Popconfirm } from 'ant-design-vue'; | 53 | + import { Modal, Popconfirm, Tooltip } from 'ant-design-vue'; |
| 49 | import { smsLogPage, deleteSmsLog } from '/@/api/message/records'; | 54 | import { smsLogPage, deleteSmsLog } from '/@/api/message/records'; |
| 50 | import { JsonPreview } from '/@/components/CodeEditor'; | 55 | import { JsonPreview } from '/@/components/CodeEditor'; |
| 51 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; | 56 | import { useBatchDelete } from '/@/hooks/web/useBatchDelete'; |
| @@ -53,7 +58,7 @@ | @@ -53,7 +58,7 @@ | ||
| 53 | 58 | ||
| 54 | export default defineComponent({ | 59 | export default defineComponent({ |
| 55 | name: 'SmsLog', | 60 | name: 'SmsLog', |
| 56 | - components: { BasicTable, TableAction, Authority, Popconfirm }, | 61 | + components: { BasicTable, TableAction, Authority, Popconfirm, Tooltip }, |
| 57 | setup() { | 62 | setup() { |
| 58 | const [registerTable, { reload, setProps }] = useTable({ | 63 | const [registerTable, { reload, setProps }] = useTable({ |
| 59 | title: '短信发送列表', | 64 | title: '短信发送列表', |
| @@ -39,6 +39,9 @@ export const columns: BasicColumn[] = [ | @@ -39,6 +39,9 @@ export const columns: BasicColumn[] = [ | ||
| 39 | title: '备注', | 39 | title: '备注', |
| 40 | dataIndex: 'remark', | 40 | dataIndex: 'remark', |
| 41 | width: 120, | 41 | width: 120, |
| 42 | + slots: { | ||
| 43 | + customRender: 'remark', | ||
| 44 | + }, | ||
| 42 | }, | 45 | }, |
| 43 | { | 46 | { |
| 44 | title: '发送时间', | 47 | title: '发送时间', |
| @@ -39,6 +39,9 @@ export const columns: BasicColumn[] = [ | @@ -39,6 +39,9 @@ export const columns: BasicColumn[] = [ | ||
| 39 | title: '备注', | 39 | title: '备注', |
| 40 | dataIndex: 'remark', | 40 | dataIndex: 'remark', |
| 41 | width: 120, | 41 | width: 120, |
| 42 | + slots: { | ||
| 43 | + customRender: 'remark', | ||
| 44 | + }, | ||
| 42 | }, | 45 | }, |
| 43 | { | 46 | { |
| 44 | title: '发送时间', | 47 | title: '发送时间', |