This commit is contained in:
lcw
2026-01-23 15:43:22 +08:00
parent 47a7081963
commit 5b62d707ff
76 changed files with 3333 additions and 880 deletions

View File

@ -8,9 +8,8 @@
:stripe="getConfiger.stripe" :height="tableHeight" v-loading="tableConfiger.loading" :lazy="getConfiger.lazy"
:load="load" :tree-props="treePros" style="width: 100%" :header-cell-class-name="() => 'HeadBgColor'"
:highlight-current-row="getConfiger.showSelectType === 'radio'"
@row-click="handleRowClick"
@cell-click="handleCellClick"
:row-style="(row, index) => getRowStyle(row, index)"
:row-class-name="(row, index) => getRowClassName(row, index)">
@ -98,7 +97,7 @@ const props = defineProps({
}
});
// 可选的时候选择的数据
const emit = defineEmits(["chooseData","handleRowClick"]);
const emit = defineEmits(["chooseData","handleRowClick","handleCellClick"]);
const multipleTableRef = ref();
const currentRow = ref();
let getConfiger = reactive({
@ -160,7 +159,6 @@ const load = (date, treeNode, resolve) => {
const getRowStyle = (row, index) => {
// 基础行高样式
const baseStyle = { height: getConfiger.rowHeight === 'auto' ? getConfiger.rowHeight : getConfiger.rowHeight + 'px' };
// 如果有自定义行样式函数,合并样式
if (props.rowStyle) {
const customStyle = props.rowStyle(row, index);
@ -200,6 +198,9 @@ function setDefaultChoose() {
const handleRowClick = (row) => {
emit("handleRowClick", row);
}
const handleCellClick = (row,column,event,cell) => {
emit("handleCellClick", {row,column,event,cell});
}
</script>
<style lang="scss"></style>

View File

@ -1,11 +1,11 @@
<template>
<div class="pageTitle" :style="`margin-bottom: ${marginBottom}px;background-color: ${backgroundColor}`">
<div class="pageTitle" :style="`margin-bottom: ${marginBottom}px;margin-top: ${marginTop}px;background-color: ${backgroundColor};height: ${height}px;`">
<div class="title">
<ul class="flex" v-if="Array.isArray(title)">
<li :class=" idx == active ? 'hedBtn':''" @click="handleBtn(it,idx)" class="pointer ml10 mr10" v-for="(it,idx) in title" :key="it">{{ it }}</li>
</ul>
<div class="font" v-else>{{ title }}</div>
<div class="ml30">
<div :style="`margin-left: ${ malginLeft==0?30:malginLeft}px`">
<slot name="left"></slot>
</div>
</div>
@ -28,15 +28,28 @@ defineProps({
marginBottom: {
type: Number,
default: 0
},
malginLeft: {
type: Number,
default: 0
},
active: {
type: Number,
default: 0
},
marginTop: {
type: Number,
default: 0
},
backgroundColor: {
type: String,
default: "rgb(255, 255, 255, 0)"
},
height: {
type: Number,
default: 52
}
});
const emit = defineEmits(["update:active","change"]);
@ -47,7 +60,7 @@ const handleBtn = (it, idx) => {
};
</script>
<style lang = "scss" scoped>
.pageTitle {
width: 100%;
@ -55,7 +68,7 @@ const handleBtn = (it, idx) => {
display: flex;
justify-content: space-between;
align-items: center;
min-height: 52px;
min-height: 30px;
.title {
display: flex;
margin: auto 0;
@ -71,4 +84,4 @@ const handleBtn = (it, idx) => {
color: #0072ff;
}
}
</style>
</style>

View File

@ -169,7 +169,7 @@ const props = defineProps({
},
marginBottom: {
type: Number,
default: 15
default: 0
},
backgroundColor: {
type: String,