|
|
@@ -1,11 +1,11 @@
|
|
|
<template>
|
|
|
<tr v-if="showTabGridTitleFields" height="40px" :style="{ 'background-color': warningColor }" :class="{ 'warning': isSelected }">
|
|
|
- <td rowspan="2">{{ serialNumber }}</td>
|
|
|
- <td rowspan="2" class="text-center">
|
|
|
+ <td rowspan="2" class="sticky-col">{{ serialNumber }}</td>
|
|
|
+ <td rowspan="2" class="text-center sticky-col" style="left:50px">
|
|
|
<input v-model="isSelected" autocomplete="off" type="checkbox" @click="clickModelData(modelData)" />
|
|
|
</td>
|
|
|
|
|
|
- <td v-if="isShowEdit == undefined || isShowEdit" rowspan="2">
|
|
|
+ <td v-if="isShowEdit == undefined || isShowEdit" rowspan="2" class="sticky-col" style="left:80px">
|
|
|
<template v-if="showEditButton">
|
|
|
<span class="operation-delete" aria-hidden="true" @click="editRecord">
|
|
|
<i class="fa" :class="{ 'fa-pencil': !modelData.editMode, 'fa-check': modelData.editMode }" />
|
|
|
@@ -29,7 +29,7 @@
|
|
|
<CellItem
|
|
|
v-else :ref="'cellItem' + index" :scroll-object="scrollObject" :field-item="tabGridTitleField"
|
|
|
:model-data="modelData" :parent-model-data="parentModelData" :class-name="className" :window-no="windowNo"
|
|
|
- :tab-index="tabIndex" style="display: inline-block;"
|
|
|
+ :tab-index="tabIndex" style="display: inline-block; min-width: 200px;"
|
|
|
:class="{ 'table-cell-searchwidget': fieldUtil.isSearchType(tabGridTitleField) }"
|
|
|
@value-changed="valueChanged($event, tabGridTitleField)"
|
|
|
@execute-callout="executeCallout(tabGridTitleField)"
|
|
|
@@ -41,12 +41,12 @@
|
|
|
</tr>
|
|
|
<tr :style="{ 'background-color': warningColor }" :class="{ 'warning': isSelected }" height="40px">
|
|
|
<template v-if="!showTabGridTitleFields">
|
|
|
- <td>{{ serialNumber }}</td>
|
|
|
- <td class="text-center">
|
|
|
+ <td class="sticky-col">{{ serialNumber }}</td>
|
|
|
+ <td class="text-center sticky-col" style="left:50px">
|
|
|
<input v-model="isSelected" autocomplete="off" type="checkbox" @click="clickModelData(modelData)" />
|
|
|
</td>
|
|
|
|
|
|
- <td v-if="isShowEdit == undefined || isShowEdit">
|
|
|
+ <td v-if="isShowEdit == undefined || isShowEdit" class="sticky-col" style="left:80px">
|
|
|
<template v-if="showEditButton">
|
|
|
<span class="operation-delete" aria-hidden="true" @click="editRecord">
|
|
|
<i class="fa" :class="{ 'fa-pencil': !modelData.editMode, 'fa-check': modelData.editMode }" />
|
|
|
@@ -431,4 +431,14 @@ export default {
|
|
|
margin-left: 5px;
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+/* 固定列 */
|
|
|
+.sticky-col {
|
|
|
+ position: -webkit-sticky; /* Safari */
|
|
|
+ position: sticky;
|
|
|
+ left: 0;
|
|
|
+ background: #fafafa;
|
|
|
+ z-index: 1; /* 确保固定列在其他内容之上 */
|
|
|
+}
|
|
|
</style>
|