This commit is contained in:
ahjung
2024-06-29 17:35:10 +08:00
parent 489f791caa
commit 19df8d5f09
7 changed files with 6240 additions and 5027 deletions

View File

@@ -156,7 +156,7 @@
const tableElRef = ref<ComponentRef>(null);
const wrapRef = ref<Nullable<HTMLDivElement>>(null);
let paginationEl: HTMLElement | null;
const isStriped = ref(false);
const isStriped = ref(props.striped || false);
const tableData = ref<Recordable[]>([]);
const innerPropsRef = ref<Partial<BasicTableProps>>();

View File

@@ -1,12 +1,6 @@
<template>
<div class="editable-cell">
<div v-show="!isEdit" class="editable-cell-content" @click="handleEdit">
{{ getValues }}
<n-icon class="edit-icon" v-if="!column.editRow">
<FormOutlined />
</n-icon>
</div>
<div class="flex editable-cell-content" v-show="isEdit" v-click-outside="onClickOutside">
<div class="flex editable-cell-content" v-if="isEdit" v-click-outside="onClickOutside">
<div class="editable-cell-content-comp">
<CellComponent
v-bind="getComponentProps"
@@ -29,6 +23,12 @@
</n-icon>
</div>
</div>
<div v-else class="flex items-center editable-cell-content" @click="handleEdit">
{{ getValues }}
<n-icon class="ml-1 edit-icon" v-if="!column.editRow">
<FormOutlined />
</n-icon>
</div>
</div>
</template>
<script lang="ts">

View File

@@ -56,4 +56,5 @@ export const basicProps = {
},
canResize: propTypes.bool.def(true),
resizeHeightOffset: propTypes.number.def(0),
striped: propTypes.bool.def(false),
};

View File

@@ -14,6 +14,7 @@
:actionColumn="actionColumn"
@update:checked-row-keys="onCheckedRow"
:scroll-x="1090"
:striped="true"
>
<template #tableTitle>
<n-button type="primary" @click="addTable">