Browse Source

fix(nc-gui): runtime directive warnings in Table.vue

pull/6954/head
աɨռɢӄաօռɢ 1 year ago
parent
commit
2a1b458381
  1. 78
      packages/nc-gui/components/smartsheet/grid/Table.vue

78
packages/nc-gui/components/smartsheet/grid/Table.vue

@ -1652,19 +1652,21 @@ onKeyStroke('ArrowDown', onDown)
<template #overlay>
<NcMenu class="!rounded !py-0" @click="contextMenu = false">
<NcMenuItem
<div
v-if="isEeUI && !contextMenuClosing && !contextMenuTarget && data.some((r) => r.rowMeta.selected)"
v-e="['a:row:update-bulk']"
@click="emits('bulkUpdateDlg')"
>
<NcMenuItem @click="emits('bulkUpdateDlg')">
<component :is="iconMap.edit" />
{{ $t('title.updateSelectedRows') }}
</NcMenuItem>
</div>
<NcMenuItem
<div
v-if="!contextMenuClosing && !contextMenuTarget && data.some((r) => r.rowMeta.selected)"
v-e="['a:row:delete-bulk']"
>
<NcMenuItem
class="nc-base-menu-item !text-red-600 !hover:bg-red-50"
data-testid="nc-delete-row"
@click="deleteSelectedRows"
@ -1673,32 +1675,25 @@ onKeyStroke('ArrowDown', onDown)
<!-- Delete Selected Rows -->
{{ $t('activity.deleteSelectedRow') }}
</NcMenuItem>
</div>
<!-- <NcMenuItem -->
<!-- v-if="contextMenuTarget && selectedRange.isSingleCell()" -->
<!-- v-e="['a:row:insert']" -->
<!-- class="nc-base-menu-item" -->
<!-- @click="addEmptyRow(contextMenuTarget.row + 1)" -->
<!-- > -->
<!-- <GeneralIcon icon="plus" /> -->
<!-- Insert New Row -->
<!-- {{ $t('activity.insertRow') }} -->
<!-- </NcMenuItem> -->
<div v-if="contextMenuTarget && selectedRange.isSingleCell()" v-e="['a:row:insert']">
<NcMenuItem class="nc-base-menu-item" @click="addEmptyRow(contextMenuTarget.row + 1)">
<GeneralIcon icon="plus" />
Insert New Row
{{ $t('activity.insertRow') }}
</NcMenuItem>
</div>
<NcMenuItem
v-if="contextMenuTarget"
v-e="['a:row:copy']"
class="nc-base-menu-item"
data-testid="context-menu-item-copy"
@click="copyValue(contextMenuTarget)"
>
<div v-if="contextMenuTarget" v-e="['a:row:copy']">
<NcMenuItem class="nc-base-menu-item" data-testid="context-menu-item-copy" @click="copyValue(contextMenuTarget)">
<GeneralIcon icon="copy" />
<!-- Copy -->
{{ $t('general.copy') }}
</NcMenuItem>
</div>
<!-- Clear cell -->
<NcMenuItem
<div
v-if="
contextMenuTarget &&
hasEditPermission &&
@ -1706,39 +1701,41 @@ onKeyStroke('ArrowDown', onDown)
(isLinksOrLTAR(fields[contextMenuTarget.col]) || !isVirtualCol(fields[contextMenuTarget.col]))
"
v-e="['a:row:clear']"
class="nc-base-menu-item"
@click="clearCell(contextMenuTarget)"
>
<!-- Clear cell -->
<NcMenuItem class="nc-base-menu-item" @click="clearCell(contextMenuTarget)">
<GeneralIcon icon="close" />
{{ $t('general.clear') }}
</NcMenuItem>
</div>
<div v-else-if="contextMenuTarget && hasEditPermission" v-e="['a:row:clear-range']">
<!-- Clear cell -->
<NcMenuItem
v-else-if="contextMenuTarget && hasEditPermission"
v-e="['a:row:clear-range']"
class="nc-base-menu-item"
@click="clearSelectedRangeOfCells()"
>
<NcMenuItem class="nc-base-menu-item" @click="clearSelectedRangeOfCells()">
<GeneralIcon icon="closeBox" class="text-gray-500" />
{{ $t('general.clear') }}
</NcMenuItem>
<template
</div>
<div
v-if="contextMenuTarget && !isLocked && selectedRange.isSingleCell() && isUIAllowed('commentEdit') && !isMobileMode"
v-e="['a:row:comment']"
>
<NcDivider />
<NcMenuItem v-e="['a:row:comment']" class="nc-base-menu-item" @click="commentRow(contextMenuTarget.row)">
<NcMenuItem class="nc-base-menu-item" @click="commentRow(contextMenuTarget.row)">
<MdiMessageOutline class="h-4 w-4" />
{{ $t('general.comment') }}
</NcMenuItem>
</template>
</div>
<template v-if="hasEditPermission">
<NcDivider v-if="!(!contextMenuClosing && !contextMenuTarget && data.some((r) => r.rowMeta.selected))" />
<NcMenuItem
<div
v-if="contextMenuTarget && (selectedRange.isSingleCell() || selectedRange.isSingleRow())"
v-e="['a:row:delete']"
>
<NcMenuItem
class="nc-base-menu-item !text-red-600 !hover:bg-red-50"
@click="confirmDeleteRow(contextMenuTarget.row)"
>
@ -1746,12 +1743,9 @@ onKeyStroke('ArrowDown', onDown)
<!-- Delete Row -->
{{ $t('activity.deleteRow') }}
</NcMenuItem>
<div v-else-if="contextMenuTarget && deleteRangeOfRows">
<NcMenuItem
v-e="['a:row:delete']"
class="nc-base-menu-item !text-red-600 !hover:bg-red-50"
@click="deleteSelectedRangeOfRows"
>
</div>
<div v-else-if="contextMenuTarget && deleteRangeOfRows" v-e="['a:row:delete']">
<NcMenuItem class="nc-base-menu-item !text-red-600 !hover:bg-red-50" @click="deleteSelectedRangeOfRows">
<GeneralIcon icon="delete" class="text-gray-500 text-red-600" />
<!-- Delete Rows -->
{{ $t('activity.deleteRows') }}

Loading…
Cancel
Save