dev
This commit is contained in:
parent
e899aaa2d3
commit
ce371abd82
|
|
@ -69,7 +69,6 @@ const generateCalendarData = (
|
|||
|
||||
// 使用示例
|
||||
const calendarData = generateCalendarData(currentYear, currentMonth);
|
||||
console.log(calendarData);
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,46 @@
|
|||
<template>
|
||||
<el-popover placement="bottom-start" :visible="isVisible" :width="props.width" ref="popoverRef"
|
||||
@before-enter="beforeShow" @hide="afterShow">
|
||||
@before-enter="beforeShow" @hide="afterShow" popper-class="type-popper">
|
||||
<template #reference>
|
||||
<el-input v-model="keyword" style="width: 100%;height: 100%" @input="changeInput" :disabled="disabled" @click="changeInput"
|
||||
placeholder="诊断选择" ref="inputRef" @focus="focus" @blur="handleBlur"></el-input>
|
||||
</template>
|
||||
<div class="container">
|
||||
<el-table :data="searchList" style="width: 100%" @row-click="clickRow" :show-header="props.showHeader"
|
||||
size="small"
|
||||
max-height="250px">
|
||||
<el-table-column v-for="item in showConfig" :prop="item.prop" :label="item.label"
|
||||
show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<div class="container" style="height: 300px">
|
||||
<el-scrollbar style="height: 300px">
|
||||
<table class="table" style="width: 100%; border-collapse: collapse;max-height: 50px">
|
||||
<!-- 表头 -->
|
||||
<thead>
|
||||
<tr class="table-title">
|
||||
<th
|
||||
v-for="item in showConfig"
|
||||
:key="item.prop"
|
||||
style="background-color: #f5f7fa; padding: 8px;"
|
||||
>
|
||||
{{ item.label }}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<!-- 表体 -->
|
||||
<tbody>
|
||||
<tr class="table-body"
|
||||
v-for="(item, index) in searchList"
|
||||
:key="index"
|
||||
@click="clickRow(item)"
|
||||
style="cursor: pointer; transition: background-color 0.2s;"
|
||||
>
|
||||
<td
|
||||
v-for="showItem in showConfig"
|
||||
:key="showItem.prop"
|
||||
style="vertical-align: middle; padding: 8px;"
|
||||
>
|
||||
{{ item[showItem.prop] }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</el-scrollbar>
|
||||
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
|
@ -132,4 +161,55 @@ defineExpose({init,clear})
|
|||
:deep(.el-table--small .el-table__cell) {
|
||||
padding: 0;
|
||||
}
|
||||
.table {
|
||||
th {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.table-title {
|
||||
height: 52px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
|
||||
th {
|
||||
text-align: left;
|
||||
&:nth-child(1) {
|
||||
text-align: left;
|
||||
border-radius: 8px 8px 0 0;
|
||||
padding-left: 24px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table-body {
|
||||
height: 52px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
font-style: normal;
|
||||
td {
|
||||
&:nth-child(1) {
|
||||
|
||||
text-align: left;
|
||||
padding-left: 30px !important;
|
||||
white-space: nowrap; /* 防止文本换行 */
|
||||
overflow: hidden; /* 隐藏溢出的文本 */
|
||||
text-overflow: ellipsis; /* 显示省略号 */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
&:last-child {
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: #4D6DE4;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -82,7 +82,7 @@ const getInfoFor1101 = (params: any) => {
|
|||
duration: 1000,
|
||||
});
|
||||
emit('socialCardUpdate', socialCard.value)
|
||||
}).catch(() => {
|
||||
}).catch((err:any) => {
|
||||
isReading.value = false;
|
||||
emit('changeLoading', false)
|
||||
ElMessage({
|
||||
|
|
@ -104,7 +104,7 @@ onUnmounted(() => {
|
|||
|
||||
})
|
||||
const close = () => {
|
||||
socialCard.value = null
|
||||
socialCard.value = {}
|
||||
}
|
||||
defineExpose({close})
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -359,7 +359,6 @@ const deleteCard = () => {
|
|||
nextTick(() => {
|
||||
cardDefaultRef.value?.close()
|
||||
height.value = 470
|
||||
console.log(socialCard.value,'socialCard')
|
||||
})
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue