vue2-excel-grid 1.1.19 → 1.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -233,7 +233,7 @@
|
|
|
233
233
|
</template>
|
|
234
234
|
<template v-else>
|
|
235
235
|
<slot :name="'cell-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" :isEditing="false" :done="null" :cancel="null">
|
|
236
|
-
{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}
|
|
236
|
+
<slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</template><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" />
|
|
237
237
|
</slot>
|
|
238
238
|
</template>
|
|
239
239
|
</div>
|
|
@@ -294,7 +294,7 @@
|
|
|
294
294
|
</template>
|
|
295
295
|
<template v-else>
|
|
296
296
|
<slot :name="'cell-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" :isEditing="false" :done="null" :cancel="null">
|
|
297
|
-
{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}
|
|
297
|
+
<slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(ci, getCellValue(ri, ci)) : getCellValue(ri, ci) }}</template><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, ci)" />
|
|
298
298
|
</slot>
|
|
299
299
|
</template>
|
|
300
300
|
</div>
|
|
@@ -341,7 +341,7 @@
|
|
|
341
341
|
</template>
|
|
342
342
|
<template v-else>
|
|
343
343
|
<slot :name="'cell-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" :isEditing="false" :done="null" :cancel="null">
|
|
344
|
-
{{ isSelectLikeCol(col) ? getSelectLabel(col._flatIndex, getCellValue(ri, col._flatIndex)) : getCellValue(ri, col._flatIndex) }}
|
|
344
|
+
<slot v-if="hasPrefixSlot(col)" :name="'prefix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" /><span v-if="hasPrefixSlot(col) || hasSuffixSlot(col)" class="eg-cell-value">{{ isSelectLikeCol(col) ? getSelectLabel(col._flatIndex, getCellValue(ri, col._flatIndex)) : getCellValue(ri, col._flatIndex) }}</span><template v-else>{{ isSelectLikeCol(col) ? getSelectLabel(col._flatIndex, getCellValue(ri, col._flatIndex)) : getCellValue(ri, col._flatIndex) }}</template><slot v-if="hasSuffixSlot(col)" :name="'suffix-' + col.key" :row="_dataRaw[ri]" :rowIndex="ri" :column="col" :value="getCellValue(ri, col._flatIndex)" />
|
|
345
345
|
</slot>
|
|
346
346
|
</template>
|
|
347
347
|
</div>
|
|
@@ -2186,6 +2186,12 @@ export default {
|
|
|
2186
2186
|
hasLegacyEditSlot(col) {
|
|
2187
2187
|
return !!(col && col.key && this.$scopedSlots && this.$scopedSlots['edit-' + col.key])
|
|
2188
2188
|
},
|
|
2189
|
+
hasPrefixSlot(col) {
|
|
2190
|
+
return !!(col && col.key && this.$scopedSlots && this.$scopedSlots['prefix-' + col.key])
|
|
2191
|
+
},
|
|
2192
|
+
hasSuffixSlot(col) {
|
|
2193
|
+
return !!(col && col.key && this.$scopedSlots && this.$scopedSlots['suffix-' + col.key])
|
|
2194
|
+
},
|
|
2189
2195
|
_hasCustomEdit(col) {
|
|
2190
2196
|
// For select/treeSelect: cell-{key} slot only customizes display; dropdown still opens normally
|
|
2191
2197
|
if (col.type === 'select' || col.type === 'treeSelect') {
|
|
@@ -3491,6 +3497,13 @@ export default {
|
|
|
3491
3497
|
align-items: center;
|
|
3492
3498
|
}
|
|
3493
3499
|
|
|
3500
|
+
.eg-cell-value {
|
|
3501
|
+
flex: 1;
|
|
3502
|
+
overflow: hidden;
|
|
3503
|
+
text-overflow: ellipsis;
|
|
3504
|
+
white-space: nowrap;
|
|
3505
|
+
min-width: 0;
|
|
3506
|
+
}
|
|
3494
3507
|
.eg-cell-active {
|
|
3495
3508
|
outline: 2px solid #1a73e8 !important;
|
|
3496
3509
|
outline-offset: -2px;
|