项目初始化

This commit is contained in:
2026-03-23 10:09:41 +08:00
parent 8815ede10b
commit 1c8bdb6ce0
3 changed files with 77 additions and 56 deletions

View File

@@ -21,7 +21,8 @@
const { columns, actionColumn, dataSource } = props; const { columns, actionColumn, dataSource } = props;
const columnList = [...columns, actionColumn]; const columnList = [...columns, actionColumn];
return ( return (
<table class="file-table" ref={tableRef}> <div class="file-table-wrap" ref={tableRef}>
<table class="file-table">
<colgroup> <colgroup>
{columnList.map((item) => { {columnList.map((item) => {
const { width = 0, dataIndex } = item; const { width = 0, dataIndex } = item;
@@ -75,22 +76,27 @@
)} )}
</tbody> </tbody>
</table> </table>
</div>
); );
}; };
}, },
}); });
</script> </script>
<style lang="less"> <style lang="less">
.file-table-wrap {
max-height: 360px;
overflow-y: auto;
overflow-x: hidden;
border: 1px solid @border-color-base;
border-radius: 8px;
}
.file-table { .file-table {
width: 100%; width: 100%;
border-top: 1px solid @border-color-base; border-collapse: collapse;
border-right: 1px solid @border-color-base;
border-collapse: separate;
border-spacing: 0;
&-th, &-th,
&-td { &-td {
border-left: 1px solid @border-color-base;
border-bottom: 1px solid @border-color-base; border-bottom: 1px solid @border-color-base;
padding: 12px 8px; padding: 12px 8px;
overflow-wrap: break-word; overflow-wrap: break-word;
@@ -101,6 +107,21 @@
thead { thead {
background-color: @background-color-light; background-color: @background-color-light;
.file-table-th {
position: sticky;
top: 0;
z-index: 1;
background-color: @background-color-light;
}
}
tbody {
.file-table-tr:last-child {
.file-table-td {
border-bottom: 0;
}
}
} }
.center { .center {

View File

@@ -1,6 +1,6 @@
<template> <template>
<BasicModal <BasicModal
width="80%" width="60%"
:title="t('component.upload.upload')" :title="t('component.upload.upload')"
:okText="t('component.upload.save')" :okText="t('component.upload.save')"
v-bind="$attrs" v-bind="$attrs"

View File

@@ -1,7 +1,7 @@
<template> <template>
<BasicModal <BasicModal
v-if="!props.showPreviewList" v-if="!props.showPreviewList"
width="80%" width="60%"
:title="t('component.upload.view')" :title="t('component.upload.view')"
:cancelText="t('component.modal.okText')" :cancelText="t('component.modal.okText')"
wrapClassName="upload-preview-modal" wrapClassName="upload-preview-modal"