mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1113 lines
30 KiB
1113 lines
30 KiB
4 years ago
|
<template>
|
||
3 years ago
|
<div
|
||
|
@dragover.prevent="dragOver = true"
|
||
|
@dragenter.prevent="dragOver = true"
|
||
|
@dragexit="dragOver = false"
|
||
|
@dragleave="dragOver = false"
|
||
|
@dragend="dragOver = false"
|
||
|
@drop.prevent.stop="onFileDrop"
|
||
|
>
|
||
2 years ago
|
<table v-if="data" class="xc-row-table nc-grid backgroundColorDefault" style="">
|
||
4 years ago
|
<thead>
|
||
3 years ago
|
<tr class="text-left nc-grid-header-row">
|
||
3 years ago
|
<th
|
||
|
class="grey-border caption"
|
||
3 years ago
|
:class="
|
||
3 years ago
|
$store.state.settings.darkTheme
|
||
3 years ago
|
? 'grey darken-3 grey--text text--lighten-1'
|
||
|
: 'grey lighten-4 grey--text text--darken-2'
|
||
|
"
|
||
3 years ago
|
style="width: 65px"
|
||
|
>
|
||
3 years ago
|
<div class="d-flex align-center">
|
||
|
<span v-if="!selectAll" class="row-no">#</span>
|
||
|
<template v-if="!isPublicView">
|
||
|
<v-checkbox
|
||
|
v-model="selectAll"
|
||
|
class="row-checkbox pt-0 align-self-center my-auto"
|
||
3 years ago
|
:class="{ active: selectAll }"
|
||
3 years ago
|
dense
|
||
|
/>
|
||
|
</template>
|
||
|
<div class="d-flex align-center" />
|
||
|
</div>
|
||
3 years ago
|
</th>
|
||
|
<th
|
||
3 years ago
|
v-for="col in availableColumns"
|
||
3 years ago
|
v-show="showFields[col.title]"
|
||
|
:key="col.title"
|
||
3 years ago
|
v-xc-ver-resize
|
||
3 years ago
|
class="grey-border caption font-wight-regular nc-grid-header-cell"
|
||
|
:class="
|
||
3 years ago
|
$store.state.settings.darkTheme
|
||
3 years ago
|
? 'grey darken-3 grey--text text--lighten-1'
|
||
|
: 'grey lighten-4 grey--text text--darken-2'
|
||
|
"
|
||
3 years ago
|
:data-col="col.title"
|
||
3 years ago
|
@xcresize="onresize(col.id, $event), log('xcresize')"
|
||
|
@xcresizing="onXcResizing(col.title, $event)"
|
||
3 years ago
|
@xcresized="resizingCol = null"
|
||
|
>
|
||
3 years ago
|
<!-- :style="columnsWidth[col.title] ? `min-width:${columnsWidth[col.title]}; max-width:${columnsWidth[col.title]}` : ''"
|
||
3 years ago
|
-->
|
||
4 years ago
|
|
||
3 years ago
|
<virtual-header-cell
|
||
3 years ago
|
v-if="isVirtualCol(col)"
|
||
3 years ago
|
:column="col"
|
||
4 years ago
|
:nodes="nodes"
|
||
3 years ago
|
:meta="meta"
|
||
3 years ago
|
:sql-ui="sqlUi"
|
||
3 years ago
|
:is-public-view="isPublicView"
|
||
3 years ago
|
:is-locked="isLocked"
|
||
3 years ago
|
:is-virtual="isVirtual"
|
||
4 years ago
|
@saved="onNewColCreation"
|
||
3 years ago
|
/>
|
||
4 years ago
|
|
||
3 years ago
|
<header-cell
|
||
|
v-else
|
||
|
:is-public-view="isPublicView"
|
||
|
:nodes="nodes"
|
||
3 years ago
|
:value="col.title"
|
||
3 years ago
|
:sql-ui="sqlUi"
|
||
|
:meta="meta"
|
||
|
:column-index="meta && meta.columns && meta.columns.indexOf(col)"
|
||
|
:column="col"
|
||
|
:is-virtual="isVirtual"
|
||
3 years ago
|
:is-locked="isLocked"
|
||
3 years ago
|
@onRelationDelete="$emit('onRelationDelete')"
|
||
3 years ago
|
@colDelete="$emit('colDelete')"
|
||
3 years ago
|
@saved="onNewColCreation"
|
||
|
/>
|
||
|
</th>
|
||
|
|
||
|
<th
|
||
2 years ago
|
v-if="!isLocked && !isVirtual && !isPublicView && _isUIAllowed('add-column')"
|
||
3 years ago
|
v-t="['c:column:add']"
|
||
|
:class="
|
||
3 years ago
|
$store.state.settings.darkTheme
|
||
3 years ago
|
? 'grey darken-3 grey--text text--lighten-1'
|
||
|
: 'grey lighten-4 grey--text text--darken-2'
|
||
|
"
|
||
|
class="grey-border new-column-header pointer nc-grid-header-cell"
|
||
3 years ago
|
@click="addNewColMenu = true"
|
||
|
>
|
||
2 years ago
|
<v-icon small @click="addNewColMenu = true"> mdi-plus </v-icon>
|
||
3 years ago
|
<v-menu v-model="addNewColMenu" offset-y content-class="" left>
|
||
|
<template #activator="{ on }">
|
||
3 years ago
|
<span v-on="on" />
|
||
3 years ago
|
</template>
|
||
|
<edit-column
|
||
|
v-if="addNewColMenu"
|
||
|
:meta="meta"
|
||
|
:nodes="nodes"
|
||
|
:sql-ui="sqlUi"
|
||
|
@close="addNewColMenu = false"
|
||
|
@saved="onNewColCreation"
|
||
|
/>
|
||
|
</v-menu>
|
||
|
</th>
|
||
|
</tr>
|
||
4 years ago
|
</thead>
|
||
4 years ago
|
<tbody v-click-outside="onClickOutside">
|
||
3 years ago
|
<tr
|
||
3 years ago
|
v-for="({ row: rowObj, rowMeta, saving }, row) in data"
|
||
3 years ago
|
:key="row"
|
||
3 years ago
|
class="nc-grid-row"
|
||
3 years ago
|
:class="{
|
||
3 years ago
|
'nc-new-row': rowMeta.new,
|
||
|
'nc-saved-row': !rowMeta.new,
|
||
3 years ago
|
}"
|
||
3 years ago
|
>
|
||
|
<td
|
||
|
style="width: 65px"
|
||
3 years ago
|
class="caption nc-grid-cell"
|
||
3 years ago
|
@contextmenu="showRowContextMenu($event, rowObj, rowMeta, row)"
|
||
3 years ago
|
>
|
||
|
<div class="d-flex align-center">
|
||
|
<span
|
||
|
v-show="!rowMeta || !rowMeta.selected"
|
||
|
class="ml-2 grey--text"
|
||
3 years ago
|
:class="{ 'row-no': !isPublicView }"
|
||
2 years ago
|
>{{ row + 1 }}</span
|
||
|
>
|
||
3 years ago
|
|
||
3 years ago
|
<template v-if="!isPublicView">
|
||
|
<v-checkbox
|
||
|
v-if="rowMeta"
|
||
|
v-model="rowMeta.selected"
|
||
|
class="row-checkbox pt-0 align-self-center my-auto"
|
||
3 years ago
|
:class="{ active: rowMeta.selected }"
|
||
3 years ago
|
dense
|
||
|
/>
|
||
|
<v-spacer />
|
||
|
<v-icon
|
||
3 years ago
|
v-if="!groupedAggCount[ids[row]] && !isLocked && !saving"
|
||
3 years ago
|
color="pink"
|
||
|
small
|
||
3 years ago
|
class="row-expand-icon nc-row-expand-icon mr-1 pointer"
|
||
|
@click="expandRow(row, rowMeta)"
|
||
3 years ago
|
>
|
||
|
mdi-arrow-expand
|
||
|
</v-icon>
|
||
|
</template>
|
||
|
<v-chip
|
||
3 years ago
|
v-if="groupedAggCount[ids[row]] && !saving"
|
||
3 years ago
|
x-small
|
||
3 years ago
|
:color="colors[groupedAggCount[ids[row]] % colors.length]"
|
||
|
@click="expandRow(row, rowMeta)"
|
||
3 years ago
|
>
|
||
|
{{ groupedAggCount[ids[row]] }}
|
||
|
</v-chip>
|
||
3 years ago
|
|
||
|
<template v-if="saving">
|
||
|
<v-spacer />
|
||
2 years ago
|
<v-icon small> mdi-spin mdi-loading </v-icon>
|
||
3 years ago
|
</template>
|
||
3 years ago
|
</div>
|
||
|
</td>
|
||
|
<td
|
||
3 years ago
|
v-for="(columnObj, col) in availableColumns"
|
||
3 years ago
|
v-show="showFields[columnObj.title]"
|
||
|
:key="row + columnObj.title"
|
||
3 years ago
|
class="cell pointer nc-grid-cell"
|
||
3 years ago
|
:class="{
|
||
2 years ago
|
active: !isPublicView && selected.col === col && selected.row === row && isEditable,
|
||
3 years ago
|
'primary-column': primaryValueColumn === columnObj.title,
|
||
4 years ago
|
'text-center': isCentrallyAligned(columnObj),
|
||
3 years ago
|
required: isRequired(columnObj, rowObj),
|
||
4 years ago
|
}"
|
||
3 years ago
|
:data-col="columnObj.title"
|
||
3 years ago
|
@dblclick="makeEditable(col, row, columnObj.ai, rowMeta)"
|
||
|
@click="makeSelected(col, row)"
|
||
2 years ago
|
@contextmenu="showRowContextMenu($event, rowObj, rowMeta, row, col, columnObj)"
|
||
3 years ago
|
>
|
||
|
<virtual-cell
|
||
3 years ago
|
v-if="isVirtualCol(columnObj)"
|
||
3 years ago
|
:password="password"
|
||
3 years ago
|
:is-public="isPublicView"
|
||
|
:metas="metas"
|
||
3 years ago
|
:is-locked="isLocked"
|
||
3 years ago
|
:column="columnObj"
|
||
|
:row="rowObj"
|
||
|
:nodes="nodes"
|
||
|
:meta="meta"
|
||
|
:api="api"
|
||
|
:active="selected.col === col && selected.row === row"
|
||
|
:sql-ui="sqlUi"
|
||
|
:is-new="rowMeta.new"
|
||
|
v-on="$listeners"
|
||
3 years ago
|
@updateCol="
|
||
|
(...args) =>
|
||
|
updateCol(
|
||
|
...args,
|
||
2 years ago
|
columnObj.bt && meta.columns.find(c => c.column_name === columnObj.bt.column_name),
|
||
3 years ago
|
col,
|
||
|
row
|
||
|
)
|
||
|
"
|
||
3 years ago
|
@saveRow="onCellValueChange(col, row, columnObj, true)"
|
||
3 years ago
|
/>
|
||
|
|
||
|
<editable-cell
|
||
|
v-else-if="
|
||
3 years ago
|
((isPkAvail || rowMeta.new) &&
|
||
3 years ago
|
!isView &&
|
||
3 years ago
|
!isLocked &&
|
||
|
!isPublicView &&
|
||
|
editEnabled.col === col &&
|
||
|
editEnabled.row === row) ||
|
||
2 years ago
|
enableEditable(columnObj)
|
||
3 years ago
|
"
|
||
3 years ago
|
v-model="rowObj[columnObj.title]"
|
||
3 years ago
|
:column="columnObj"
|
||
|
:meta="meta"
|
||
|
:active="selected.col === col && selected.row === row"
|
||
|
:sql-ui="sqlUi"
|
||
|
:db-alias="nodes.dbAlias"
|
||
3 years ago
|
:is-locked="isLocked"
|
||
3 years ago
|
:is-public="isPublicView"
|
||
3 years ago
|
:view-id="viewId"
|
||
2 years ago
|
@save="
|
||
|
editEnabled = {};
|
||
|
onCellValueChange(col, row, columnObj, true);
|
||
|
"
|
||
3 years ago
|
@cancel="editEnabled = {}"
|
||
3 years ago
|
@update="onCellValueChange(col, row, columnObj, false)"
|
||
|
@blur="onCellValueChange(col, row, columnObj, true)"
|
||
3 years ago
|
@input="unsaved = true"
|
||
3 years ago
|
@navigateToNext="navigateToNext"
|
||
3 years ago
|
@navigateToPrev="navigateToPrev"
|
||
3 years ago
|
/>
|
||
|
|
||
|
<table-cell
|
||
|
v-else
|
||
3 years ago
|
:class="{
|
||
|
'primary--text': primaryValueColumn === columnObj.title,
|
||
|
}"
|
||
3 years ago
|
:selected="selected.col === col && selected.row === row"
|
||
|
:is-locked="isLocked"
|
||
|
:column="columnObj"
|
||
|
:meta="meta"
|
||
|
:db-alias="nodes.dbAlias"
|
||
3 years ago
|
:value="rowObj[columnObj.title]"
|
||
3 years ago
|
:sql-ui="sqlUi"
|
||
3 years ago
|
@enableedit="
|
||
|
makeSelected(col, row);
|
||
|
makeEditable(col, row, columnObj.ai, rowMeta);
|
||
|
"
|
||
3 years ago
|
/>
|
||
|
</td>
|
||
|
</tr>
|
||
2 years ago
|
<tr v-if="!isView && !isLocked && !isPublicView && isEditable && relationType !== 'bt'">
|
||
3 years ago
|
<td
|
||
|
v-t="['c:row:add:grid-bottom']"
|
||
|
:colspan="visibleColLength + 1"
|
||
|
class="text-left pointer nc-grid-add-new-cell"
|
||
|
@click="insertNewRow(true)"
|
||
|
>
|
||
3 years ago
|
<v-tooltip top>
|
||
3 years ago
|
<template #activator="{ on }">
|
||
2 years ago
|
<v-icon small color="pink" v-on="on"> mdi-plus </v-icon>
|
||
3 years ago
|
<span class="ml-1 caption grey--text">
|
||
2 years ago
|
{{ $t('activity.addRow') }}
|
||
3 years ago
|
</span>
|
||
3 years ago
|
</template>
|
||
|
<span class="caption"> Add new row</span>
|
||
|
</v-tooltip>
|
||
|
</td>
|
||
|
</tr>
|
||
4 years ago
|
</tbody>
|
||
|
</table>
|
||
|
|
||
3 years ago
|
<div is="style" v-html="style" />
|
||
3 years ago
|
<!-- <div is="style" v-html="resizeColStyle" />-->
|
||
|
<dynamic-style>
|
||
|
<template v-if="resizingCol">
|
||
2 years ago
|
[data-col="{{ resizingCol }}"]{min-width:{{ resizingColWidth }};max-width:{{ resizingColWidth }};width:{{
|
||
3 years ago
|
resizingColWidth
|
||
2 years ago
|
}};}
|
||
3 years ago
|
</template>
|
||
|
</dynamic-style>
|
||
4 years ago
|
</div>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
2 years ago
|
import { isVirtualCol } from 'nocodb-sdk';
|
||
|
import HeaderCell from '../components/HeaderCell';
|
||
|
import EditableCell from '../components/EditableCell';
|
||
|
import EditColumn from '../components/EditColumn';
|
||
3 years ago
|
// import columnStyling from '../helpers/columnStyling'
|
||
2 years ago
|
import VirtualCell from '../components/VirtualCell';
|
||
|
import VirtualHeaderCell from '../components/VirtualHeaderCell';
|
||
|
import colors from '@/mixins/colors';
|
||
|
import TableCell from '~/components/project/spreadsheet/components/Cell';
|
||
|
import DynamicStyle from '~/components/DynamicStyle';
|
||
|
import { UITypes } from '~/components/project/spreadsheet/helpers/uiTypes';
|
||
|
import { copyTextToClipboard } from '~/helpers/xutils';
|
||
4 years ago
|
|
||
|
export default {
|
||
3 years ago
|
name: 'XcGridView',
|
||
4 years ago
|
components: {
|
||
3 years ago
|
DynamicStyle,
|
||
4 years ago
|
VirtualHeaderCell,
|
||
3 years ago
|
VirtualCell,
|
||
|
TableCell,
|
||
|
EditColumn,
|
||
|
EditableCell,
|
||
2 years ago
|
HeaderCell,
|
||
4 years ago
|
},
|
||
4 years ago
|
mixins: [colors],
|
||
|
props: {
|
||
3 years ago
|
loading: Boolean,
|
||
3 years ago
|
droppable: Boolean,
|
||
3 years ago
|
isView: Boolean,
|
||
3 years ago
|
metas: Object,
|
||
4 years ago
|
relationType: String,
|
||
|
availableColumns: [Object, Array],
|
||
|
showFields: Object,
|
||
|
sqlUi: [Object, Function],
|
||
4 years ago
|
api: [Object, Function],
|
||
4 years ago
|
isEditable: Boolean,
|
||
|
nodes: Object,
|
||
|
primaryValueColumn: String,
|
||
3 years ago
|
// belongsTo: [Object, Array],
|
||
|
// hasMany: [Object, Array],
|
||
4 years ago
|
data: [Array, Object],
|
||
|
meta: Object,
|
||
|
visibleColLength: [Number, String],
|
||
|
isPublicView: Boolean,
|
||
|
table: String,
|
||
|
isVirtual: Boolean,
|
||
|
isLocked: Boolean,
|
||
3 years ago
|
// columnsWidth: { type: Object },
|
||
3 years ago
|
isPkAvail: Boolean,
|
||
3 years ago
|
password: String,
|
||
2 years ago
|
viewId: String,
|
||
4 years ago
|
},
|
||
3 years ago
|
data: () => ({
|
||
|
resizingCol: null,
|
||
3 years ago
|
isVirtualCol,
|
||
3 years ago
|
resizingColWidth: null,
|
||
|
selectedExpandRowIndex: null,
|
||
|
selectedExpandRowMeta: null,
|
||
|
addNewColMenu: false,
|
||
|
selected: {
|
||
|
row: null,
|
||
2 years ago
|
col: null,
|
||
3 years ago
|
},
|
||
|
editEnabled: {
|
||
|
row: null,
|
||
2 years ago
|
col: null,
|
||
3 years ago
|
},
|
||
3 years ago
|
aggCount: [],
|
||
3 years ago
|
dragOver: false,
|
||
3 years ago
|
gridViewCols: {},
|
||
3 years ago
|
unsaved: false,
|
||
2 years ago
|
rightToLeftLanguages: ['fa'],
|
||
3 years ago
|
}),
|
||
|
computed: {
|
||
3 years ago
|
selectAll: {
|
||
|
get() {
|
||
2 years ago
|
return !!(this.data.length && this.data.every(d => d.rowMeta && d.rowMeta.selected));
|
||
3 years ago
|
},
|
||
|
set(v) {
|
||
|
for (const d of this.data) {
|
||
2 years ago
|
this.$set(d.rowMeta, 'selected', v);
|
||
3 years ago
|
}
|
||
2 years ago
|
},
|
||
3 years ago
|
},
|
||
3 years ago
|
ids() {
|
||
3 years ago
|
return (
|
||
|
(this.meta &&
|
||
|
this.meta.columns &&
|
||
|
this.data &&
|
||
|
this.data.map(({ oldRow }) =>
|
||
|
this.meta.columns
|
||
3 years ago
|
.filter(c => c.pk)
|
||
|
.map(c => oldRow[c.title])
|
||
|
.join('___')
|
||
3 years ago
|
)) ||
|
||
|
[]
|
||
2 years ago
|
);
|
||
3 years ago
|
},
|
||
3 years ago
|
haveHasManyrelation() {
|
||
2 years ago
|
return !!Object.keys(this.hasMany).length;
|
||
3 years ago
|
},
|
||
3 years ago
|
colLength() {
|
||
2 years ago
|
return (this.availableColumns && this.availableColumns.length) || 0;
|
||
3 years ago
|
},
|
||
3 years ago
|
rowLength() {
|
||
2 years ago
|
return (this.data && this.data.length) || 0;
|
||
3 years ago
|
},
|
||
3 years ago
|
availColNames() {
|
||
2 years ago
|
return (this.availableColumns && this.availableColumns.map(c => c.title)) || [];
|
||
3 years ago
|
},
|
||
3 years ago
|
groupedAggCount() {
|
||
3 years ago
|
// eslint-disable-next-line camelcase
|
||
3 years ago
|
return this.aggCount
|
||
3 years ago
|
? this.aggCount.reduce(
|
||
2 years ago
|
(o, { row_id, count }) => ({
|
||
|
...o,
|
||
|
[row_id]: count,
|
||
|
}),
|
||
|
{}
|
||
|
)
|
||
|
: {};
|
||
3 years ago
|
},
|
||
3 years ago
|
style() {
|
||
2 years ago
|
let style = '';
|
||
3 years ago
|
for (const c of this.availableColumns) {
|
||
2 years ago
|
const val = (this.gridViewCols && this.gridViewCols[c.id] && this.gridViewCols[c.id].width) || '200px';
|
||
3 years ago
|
|
||
3 years ago
|
if (val && c.key !== this.resizingCol) {
|
||
2 years ago
|
style += `[data-col="${c.title}"]{min-width:${val};max-width:${val};width: ${val};}`;
|
||
3 years ago
|
}
|
||
|
}
|
||
|
|
||
2 years ago
|
return style;
|
||
|
},
|
||
3 years ago
|
// resizeColStyle() {
|
||
|
// return this.resizingCol ? ` [data-col="${this.resizingCol}"]{min-width:${this.resizingColWidth};max-width:${this.resizingColWidth};width:${this.resizingColWidth};}` : ''
|
||
|
// }
|
||
3 years ago
|
},
|
||
|
watch: {
|
||
3 years ago
|
data() {
|
||
2 years ago
|
this.xcAuditModelCommentsCount();
|
||
3 years ago
|
},
|
||
|
viewId(v, o) {
|
||
|
if (v !== o) {
|
||
2 years ago
|
this.loadGridViewCols();
|
||
3 years ago
|
}
|
||
2 years ago
|
},
|
||
3 years ago
|
},
|
||
3 years ago
|
mounted() {
|
||
3 years ago
|
// this.calculateColumnWidth()
|
||
3 years ago
|
},
|
||
3 years ago
|
created() {
|
||
2 years ago
|
document.addEventListener('keydown', this.onKeyDown);
|
||
|
this.loadGridViewCols();
|
||
|
this.xcAuditModelCommentsCount();
|
||
|
const self = this;
|
||
|
window.addEventListener('beforeunload', function () {
|
||
3 years ago
|
if (self.unsaved) {
|
||
|
if (self.editEnabled.row != null && self.editEnabled.row != null) {
|
||
2 years ago
|
const columnObj = self.availableColumns[self.editEnabled.col];
|
||
|
self.onCellValueChange(self.editEnabled.col, self.editEnabled.row, columnObj, true);
|
||
3 years ago
|
}
|
||
|
}
|
||
2 years ago
|
});
|
||
3 years ago
|
},
|
||
3 years ago
|
beforeDestroy() {
|
||
2 years ago
|
document.removeEventListener('keydown', this.onKeyDown);
|
||
4 years ago
|
},
|
||
|
methods: {
|
||
3 years ago
|
async loadGridViewCols() {
|
||
|
if (!this.viewId) {
|
||
2 years ago
|
return;
|
||
3 years ago
|
}
|
||
2 years ago
|
const colsData = await this.$api.dbView.gridColumnsList(this.viewId);
|
||
3 years ago
|
this.gridViewCols = colsData.reduce(
|
||
|
(o, col) => ({
|
||
|
...o,
|
||
2 years ago
|
[col.fk_column_id]: col,
|
||
3 years ago
|
}),
|
||
|
{}
|
||
2 years ago
|
);
|
||
3 years ago
|
},
|
||
3 years ago
|
onFileDrop(event) {
|
||
2 years ago
|
this.$emit('drop', event);
|
||
3 years ago
|
},
|
||
3 years ago
|
isRequired(_columnObj, rowObj, ignoreCurrentValue = false) {
|
||
3 years ago
|
if (this.isPublicView || this.loading) {
|
||
2 years ago
|
return false;
|
||
3 years ago
|
}
|
||
3 years ago
|
|
||
2 years ago
|
let columnObj = _columnObj;
|
||
4 years ago
|
if (columnObj.bt) {
|
||
2 years ago
|
columnObj = this.meta.columns.find(c => c.column_name === columnObj.bt.column_name);
|
||
4 years ago
|
}
|
||
|
|
||
3 years ago
|
return (
|
||
|
columnObj &&
|
||
|
columnObj.rqd &&
|
||
2 years ago
|
(ignoreCurrentValue || rowObj[columnObj.title] === undefined || rowObj[columnObj.title] === null) &&
|
||
3 years ago
|
!columnObj.default
|
||
2 years ago
|
);
|
||
4 years ago
|
},
|
||
3 years ago
|
updateCol(row, column, value, columnObj, colIndex, rowIndex) {
|
||
2 years ago
|
this.$set(row, column, value);
|
||
|
this.onCellValueChange(colIndex, rowIndex, columnObj, true);
|
||
4 years ago
|
},
|
||
3 years ago
|
calculateColumnWidth() {
|
||
3 years ago
|
// setTimeout(() => {
|
||
|
// const obj = {}
|
||
|
// this.meta && this.meta.columns && this.meta.columns.forEach((c) => {
|
||
3 years ago
|
// obj[c.title] = (columnStyling[c.uidt] && columnStyling[c.uidt].w) || undefined
|
||
3 years ago
|
// })
|
||
|
// this.meta && this.meta.v && this.meta.v.forEach((v) => {
|
||
3 years ago
|
// obj[v.title] = v.bt ? '100px' : '200px'
|
||
3 years ago
|
// })
|
||
|
// Array.from(this.$el.querySelectorAll('th')).forEach((el) => {
|
||
|
// const width = el.getBoundingClientRect().width
|
||
|
// obj[el.dataset.col] = obj[el.dataset.col] || ((width < 100 ? 100 : width) + 'px')
|
||
|
// })
|
||
|
// this.$emit('update:columnsWidth', { ...obj, ...(this.columnWidth || {}) })
|
||
|
// }, 2000)
|
||
4 years ago
|
},
|
||
3 years ago
|
isCentrallyAligned(col) {
|
||
3 years ago
|
return ![
|
||
3 years ago
|
'SingleLineText',
|
||
|
'LongText',
|
||
|
'Attachment',
|
||
|
'Date',
|
||
|
'Time',
|
||
|
'Email',
|
||
|
'URL',
|
||
|
'DateTime',
|
||
|
'CreateTime',
|
||
3 years ago
|
'LastModifiedTime',
|
||
2 years ago
|
'Currency',
|
||
|
].includes(col.uidt);
|
||
4 years ago
|
},
|
||
3 years ago
|
async xcAuditModelCommentsCount() {
|
||
3 years ago
|
if (this.isPublicView || !this.data || !this.data.length) {
|
||
2 years ago
|
return;
|
||
3 years ago
|
}
|
||
3 years ago
|
// const aggCount = await this.$store.dispatch('sqlMgr/ActSqlOp', [{
|
||
|
// dbAlias: this.nodes.dbAlias
|
||
|
// }, 'xcAuditModelCommentsCount', {
|
||
|
// model_name: this.meta.title,
|
||
|
// ids: this.data.map(({ row: r }) => {
|
||
|
// return this.meta.columns.filter(c => c.pk).map(c => r[c.title]).join('___')
|
||
|
// })
|
||
|
// }])
|
||
|
//
|
||
4 years ago
|
|
||
3 years ago
|
this.aggCount = await this.$api.utils.commentCount({
|
||
3 years ago
|
ids: this.data.map(({ row: r }) => {
|
||
3 years ago
|
return this.meta.columns
|
||
3 years ago
|
.filter(c => c.pk)
|
||
|
.map(c => r[c.title])
|
||
2 years ago
|
.join('___');
|
||
3 years ago
|
}),
|
||
2 years ago
|
fk_model_id: this.meta.id,
|
||
|
});
|
||
4 years ago
|
},
|
||
|
|
||
3 years ago
|
async onKeyDown(e) {
|
||
2 years ago
|
if (this.selected.col === null || this.selected.row === null || this.isLocked) {
|
||
|
return;
|
||
3 years ago
|
}
|
||
3 years ago
|
|
||
4 years ago
|
switch (e.keyCode) {
|
||
3 years ago
|
// tab
|
||
3 years ago
|
case 9:
|
||
2 years ago
|
e.preventDefault();
|
||
3 years ago
|
this.editEnabled = {
|
||
|
col: null,
|
||
2 years ago
|
row: null,
|
||
|
};
|
||
3 years ago
|
if (e.shiftKey) {
|
||
|
if (this.selected.col > 0) {
|
||
2 years ago
|
this.selected.col--;
|
||
3 years ago
|
} else if (this.selected.row > 0) {
|
||
2 years ago
|
this.selected.row--;
|
||
|
this.selected.col = this.colLength - 1;
|
||
3 years ago
|
}
|
||
|
} else if (this.selected.col < this.colLength - 1) {
|
||
2 years ago
|
this.selected.col++;
|
||
3 years ago
|
} else if (this.selected.row < this.rowLength - 1) {
|
||
2 years ago
|
this.selected.row++;
|
||
|
this.selected.col = 0;
|
||
3 years ago
|
}
|
||
3 years ago
|
|
||
2 years ago
|
break;
|
||
3 years ago
|
// delete
|
||
2 years ago
|
case 46:
|
||
|
{
|
||
|
if (this.editEnabled.col != null && this.editEnabled.row != null) {
|
||
|
return;
|
||
|
}
|
||
3 years ago
|
|
||
2 years ago
|
const rowObj = this.data[this.selected.row].row;
|
||
|
const columnObj = this.availableColumns[this.selected.col];
|
||
3 years ago
|
|
||
2 years ago
|
if (
|
||
|
// this.isRequired(columnObj, rowObj, true) ||
|
||
|
columnObj.virtual
|
||
|
) {
|
||
|
return;
|
||
|
}
|
||
3 years ago
|
|
||
2 years ago
|
this.$set(rowObj, columnObj.title, null);
|
||
|
// update/save cell value
|
||
|
this.onCellValueChange(this.selected.col, this.selected.row, columnObj, true);
|
||
|
}
|
||
|
break;
|
||
4 years ago
|
// left
|
||
|
case 37:
|
||
3 years ago
|
if (this.rightToLeftLanguages.includes(this.$store.state.settings.language)) {
|
||
|
if (this.selected.col < this.colLength - 1) {
|
||
2 years ago
|
this.selected.col++;
|
||
3 years ago
|
}
|
||
|
} else if (this.selected.col > 0) {
|
||
2 years ago
|
this.selected.col--;
|
||
3 years ago
|
}
|
||
2 years ago
|
break;
|
||
4 years ago
|
// right
|
||
|
case 39:
|
||
3 years ago
|
if (this.rightToLeftLanguages.includes(this.$store.state.settings.language)) {
|
||
|
if (this.selected.col > 0) {
|
||
2 years ago
|
this.selected.col--;
|
||
3 years ago
|
}
|
||
|
} else if (this.selected.col < this.colLength - 1) {
|
||
2 years ago
|
this.selected.col++;
|
||
3 years ago
|
}
|
||
2 years ago
|
break;
|
||
4 years ago
|
// up
|
||
|
case 38:
|
||
3 years ago
|
if (this.selected.row > 0) {
|
||
2 years ago
|
this.selected.row--;
|
||
3 years ago
|
}
|
||
2 years ago
|
break;
|
||
4 years ago
|
// down
|
||
|
case 40:
|
||
3 years ago
|
if (this.selected.row < this.rowLength - 1) {
|
||
2 years ago
|
this.selected.row++;
|
||
3 years ago
|
}
|
||
2 years ago
|
break;
|
||
4 years ago
|
// enter
|
||
|
case 13:
|
||
2 years ago
|
this.makeEditable(this.selected.col, this.selected.row);
|
||
|
break;
|
||
4 years ago
|
default: {
|
||
|
if (this.editEnabled.col != null && this.editEnabled.row != null) {
|
||
2 years ago
|
return;
|
||
4 years ago
|
}
|
||
3 years ago
|
|
||
2 years ago
|
const rowObj = this.data[this.selected.row].row;
|
||
|
const columnObj = this.availableColumns[this.selected.col];
|
||
3 years ago
|
|
||
|
if (e.metaKey || e.ctrlKey) {
|
||
|
switch (e.keyCode) {
|
||
|
// copy - ctrl/cmd +c
|
||
|
case 67:
|
||
2 years ago
|
copyTextToClipboard(rowObj[columnObj.title] || '');
|
||
|
break;
|
||
3 years ago
|
// // paste ctrl/cmd + v
|
||
|
// case 86: {
|
||
|
// const text = await navigator.clipboard.readText()
|
||
|
// this.$set(rowObj, columnObj.title, text)
|
||
|
// }
|
||
|
// break
|
||
3 years ago
|
}
|
||
|
}
|
||
|
|
||
3 years ago
|
if (e.ctrlKey || e.altKey || e.metaKey) {
|
||
2 years ago
|
return;
|
||
3 years ago
|
}
|
||
3 years ago
|
|
||
4 years ago
|
if (e.key && e.key.length === 1) {
|
||
3 years ago
|
if (!this.isPkAvail && !this.data[this.selected.row].rowMeta.new) {
|
||
2 years ago
|
return this.$toast.info("Update not allowed for table which doesn't have primary Key").goAway(3000);
|
||
3 years ago
|
}
|
||
|
|
||
2 years ago
|
this.$set(this.data[this.selected.row].row, this.availableColumns[this.selected.col].title, '');
|
||
|
this.editEnabled = { ...this.selected };
|
||
4 years ago
|
}
|
||
4 years ago
|
}
|
||
4 years ago
|
}
|
||
|
},
|
||
3 years ago
|
onClickOutside() {
|
||
4 years ago
|
if (
|
||
2 years ago
|
(this.meta.columns && this.meta.columns[this.selected.col] && this.meta.columns[this.selected.col].virtual) ||
|
||
3 years ago
|
(this.availableColumns &&
|
||
3 years ago
|
this.availableColumns[this.editEnabled.col] &&
|
||
|
this.availableColumns[this.editEnabled.col].uidt === 'JSON')
|
||
3 years ago
|
) {
|
||
2 years ago
|
return;
|
||
3 years ago
|
}
|
||
2 years ago
|
this.selected.col = null;
|
||
|
this.selected.row = null;
|
||
|
this.editEnabled.col = null;
|
||
|
this.editEnabled.row = null;
|
||
4 years ago
|
},
|
||
3 years ago
|
onNewColCreation(col, oldCol) {
|
||
2 years ago
|
this.addNewColMenu = false;
|
||
|
this.addNewColModal = false;
|
||
|
this.$emit('onNewColCreation', col, oldCol);
|
||
4 years ago
|
},
|
||
3 years ago
|
expandRow(...args) {
|
||
2 years ago
|
this.$emit('expandRow', ...args);
|
||
|
this.$e('c:row-expand');
|
||
4 years ago
|
},
|
||
3 years ago
|
showRowContextMenu($event, rowObj, rowMeta, row, ...rest) {
|
||
2 years ago
|
this.$emit('showRowContextMenu', $event, rowObj, rowMeta, row, ...rest);
|
||
4 years ago
|
},
|
||
3 years ago
|
onCellValueChange(col, row, column, saved) {
|
||
2 years ago
|
this.$emit('onCellValueChange', col, row, column, saved);
|
||
3 years ago
|
if (saved) {
|
||
2 years ago
|
this.unsaved = false;
|
||
3 years ago
|
}
|
||
4 years ago
|
},
|
||
3 years ago
|
navigateToNext() {
|
||
|
if (this.selected.row < this.rowLength - 1) {
|
||
2 years ago
|
this.selected.row++;
|
||
3 years ago
|
}
|
||
|
},
|
||
3 years ago
|
navigateToPrev() {
|
||
|
if (this.selected.row > 0) {
|
||
2 years ago
|
this.selected.row--;
|
||
3 years ago
|
}
|
||
3 years ago
|
},
|
||
3 years ago
|
makeSelected(col, row) {
|
||
4 years ago
|
if (this.selected.col !== col || this.selected.row !== row) {
|
||
3 years ago
|
this.selected = {
|
||
|
col,
|
||
2 years ago
|
row,
|
||
|
};
|
||
|
this.editEnabled = {};
|
||
4 years ago
|
}
|
||
|
},
|
||
3 years ago
|
makeEditable(col, row, _, rowMeta) {
|
||
3 years ago
|
if (this.isPublicView || !this.isEditable || this.isView) {
|
||
2 years ago
|
return;
|
||
3 years ago
|
}
|
||
3 years ago
|
|
||
|
if (!this.isPkAvail && !rowMeta.new) {
|
||
2 years ago
|
return this.$toast.info("Update not allowed for table which doesn't have primary Key").goAway(3000);
|
||
3 years ago
|
}
|
||
4 years ago
|
if (this.availableColumns[col].ai) {
|
||
2 years ago
|
return this.$toast.info('Auto Increment field is not editable').goAway(3000);
|
||
4 years ago
|
}
|
||
|
if (this.availableColumns[col].pk && !this.data[row].rowMeta.new) {
|
||
2 years ago
|
return this.$toast.info('Editing primary key not supported').goAway(3000);
|
||
4 years ago
|
}
|
||
|
if (this.editEnabled.col !== col || this.editEnabled.row !== row) {
|
||
3 years ago
|
this.editEnabled = {
|
||
|
col,
|
||
2 years ago
|
row,
|
||
|
};
|
||
4 years ago
|
}
|
||
|
},
|
||
3 years ago
|
enableEditable(column) {
|
||
3 years ago
|
return (
|
||
|
(column && column.uidt === UITypes.Attachment) ||
|
||
3 years ago
|
(column && column.uidt === UITypes.SingleSelect) ||
|
||
|
(column && column.uidt === UITypes.MultiSelect) ||
|
||
|
(column && column.uidt === UITypes.DateTime) ||
|
||
|
(column && column.uidt === UITypes.Date) ||
|
||
|
(column && column.uidt === UITypes.Time) ||
|
||
3 years ago
|
(column && column.uidt === UITypes.Rating) ||
|
||
2 years ago
|
(this.sqlUi && column.dt && this.sqlUi.getAbstractType(column) === 'boolean')
|
||
|
);
|
||
4 years ago
|
},
|
||
3 years ago
|
insertNewRow(atEnd = false, expand = false) {
|
||
2 years ago
|
this.$emit('insertNewRow', atEnd, expand);
|
||
4 years ago
|
},
|
||
3 years ago
|
async onresize(colId, size) {
|
||
2 years ago
|
const gridColId = this.gridViewCols && this.gridViewCols[colId] && this.gridViewCols[colId].id;
|
||
3 years ago
|
if (!gridColId) {
|
||
2 years ago
|
return;
|
||
3 years ago
|
}
|
||
2 years ago
|
this.$set(this.gridViewCols[colId], 'width', size);
|
||
3 years ago
|
if (this._isUIAllowed('gridColUpdate')) {
|
||
3 years ago
|
await this.$api.dbView.gridColumnUpdate(gridColId, {
|
||
2 years ago
|
width: size,
|
||
|
});
|
||
3 years ago
|
}
|
||
|
// this.$emit('update:columnsWidth', { ...this.columnsWidth, [col]: size })
|
||
4 years ago
|
},
|
||
3 years ago
|
onXcResizing(_cn, width) {
|
||
2 years ago
|
this.resizingCol = _cn;
|
||
|
this.resizingColWidth = width;
|
||
3 years ago
|
},
|
||
|
log(e, s) {
|
||
2 years ago
|
console.log(e.target, s);
|
||
|
},
|
||
|
},
|
||
|
};
|
||
4 years ago
|
</script>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
|
::v-deep {
|
||
3 years ago
|
.resizer:hover,
|
||
|
.resizer:active,
|
||
|
.resizer:focus {
|
||
4 years ago
|
background: var(--v-primary-base);
|
||
|
cursor: col-resize;
|
||
|
}
|
||
|
|
||
3 years ago
|
.v-list-item--dense .v-list-item__icon,
|
||
|
.v-list--dense .v-list-item .v-list-item__icon {
|
||
4 years ago
|
margin-top: 4px;
|
||
|
margin-bottom: 4px;
|
||
|
}
|
||
|
|
||
3 years ago
|
.v-list-item--dense,
|
||
|
.v-list--dense .v-list-item {
|
||
4 years ago
|
min-height: 32px;
|
||
|
}
|
||
|
|
||
|
.v-input__control .v-input__slot .v-input--selection-controls__input {
|
||
3 years ago
|
transform: scale(0.85);
|
||
4 years ago
|
margin-right: 0;
|
||
|
}
|
||
|
|
||
3 years ago
|
.xc-toolbar .v-input__slot,
|
||
|
.navigation .v-input__slot {
|
||
4 years ago
|
box-shadow: none !important;
|
||
|
}
|
||
|
|
||
|
.navigation .v-input__slot input::placeholder {
|
||
3 years ago
|
font-size: 0.8rem;
|
||
4 years ago
|
}
|
||
|
|
||
|
.v-btn {
|
||
|
text-transform: capitalize;
|
||
|
}
|
||
|
|
||
|
.row-checkbox .v-input__control {
|
||
|
height: 24px !important;
|
||
|
}
|
||
|
|
||
|
tr:hover .xc-bt-chip {
|
||
|
margin-right: 0;
|
||
|
padding-right: 0 !important;
|
||
|
}
|
||
|
|
||
|
.xc-bt-chip {
|
||
|
margin-right: 24px;
|
||
3 years ago
|
transition: 0.4s margin-right, 0.4s padding-right;
|
||
4 years ago
|
}
|
||
|
|
||
|
.theme--light tbody tr:hover {
|
||
|
background: #eeeeee22;
|
||
|
}
|
||
|
|
||
|
.theme--dark tbody tr:hover {
|
||
|
background: #33333322;
|
||
|
}
|
||
|
|
||
|
.xc-border.search-box {
|
||
|
overflow: visible;
|
||
|
border-radius: 4px;
|
||
|
}
|
||
|
|
||
|
.xc-border.search-box .v-input {
|
||
3 years ago
|
transition: 0.4s border-color;
|
||
4 years ago
|
}
|
||
|
|
||
|
.xc-border.search-box .v-input--is-focused {
|
||
|
border: 1px solid var(--v-primary-base) !important;
|
||
|
margin: -1px;
|
||
|
}
|
||
|
|
||
2 years ago
|
.search-field.v-text-field.v-text-field--solo.v-input--dense > .v-input__control {
|
||
4 years ago
|
min-height: auto;
|
||
|
}
|
||
|
|
||
|
.view .view-icon {
|
||
|
display: none;
|
||
3 years ago
|
transition: 0.3s display;
|
||
4 years ago
|
}
|
||
|
|
||
|
.view:hover .view-icon {
|
||
|
display: inline-block;
|
||
|
}
|
||
|
|
||
|
.view:hover .check-icon {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
|
.v-input__control label {
|
||
|
font-size: inherit;
|
||
|
}
|
||
|
}
|
||
|
|
||
3 years ago
|
table,
|
||
|
td,
|
||
|
th.grey-border,
|
||
|
th.grey.darken-3,
|
||
|
th.grey.lighten-4 {
|
||
4 years ago
|
border-right: 1px solid #7f828b33 !important;
|
||
|
border-left: 1px solid #7f828b33 !important;
|
||
|
border-bottom: 2px solid #7f828b33 !important;
|
||
|
border-top: 2px solid #7f828b33 !important;
|
||
|
border-collapse: collapse;
|
||
|
}
|
||
|
|
||
3 years ago
|
td,
|
||
|
th {
|
||
4 years ago
|
position: relative;
|
||
|
padding: 0 5px !important;
|
||
|
}
|
||
|
|
||
3 years ago
|
td.active::after,
|
||
|
td.active::before {
|
||
2 years ago
|
content: '';
|
||
4 years ago
|
position: absolute;
|
||
|
z-index: 3;
|
||
|
height: calc(100% + 2px);
|
||
|
width: calc(100% + 2px);
|
||
|
left: -1px;
|
||
|
top: -1px;
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
|
||
|
td.active::after {
|
||
|
border: 2px solid var(--v-primary-lighten1);
|
||
|
}
|
||
|
|
||
|
td.active::before {
|
||
|
background: var(--v-primary-base);
|
||
3 years ago
|
opacity: 0.1;
|
||
4 years ago
|
}
|
||
|
|
||
|
.xc-row-table thead tr {
|
||
|
background: transparent;
|
||
|
}
|
||
|
|
||
|
.xc-row-table thead th {
|
||
|
/*background: ;*/
|
||
|
position: sticky;
|
||
|
top: 0;
|
||
|
//left: 0;
|
||
|
z-index: 6;
|
||
|
}
|
||
|
|
||
3 years ago
|
.row-expand-icon,
|
||
|
.row-checkbox {
|
||
4 years ago
|
opacity: 0;
|
||
|
}
|
||
|
|
||
3 years ago
|
tr:hover .row-expand-icon,
|
||
|
tr:hover .row-checkbox,
|
||
|
tr .row-checkbox.active {
|
||
4 years ago
|
opacity: 1;
|
||
|
}
|
||
|
|
||
|
tr:hover .row-no {
|
||
|
display: none;
|
||
|
}
|
||
|
|
||
3 years ago
|
td,
|
||
|
tr {
|
||
4 years ago
|
min-height: 31px !important;
|
||
|
/*height: 31px !important;*/
|
||
|
/*max-height: 31px !important;*/
|
||
|
}
|
||
|
|
||
3 years ago
|
.cell-height-medium td,
|
||
|
.cell-height-medium tr {
|
||
4 years ago
|
min-height: 35px !important;
|
||
|
/*height: 35px !important;*/
|
||
|
/*max-height: 35px !important;*/
|
||
|
}
|
||
|
|
||
3 years ago
|
.cell-height-large td,
|
||
|
.cell-height-large tr {
|
||
4 years ago
|
min-height: 40px !important;
|
||
|
/*height: 40px !important;*/
|
||
|
/*max-height: 40px !important;*/
|
||
|
}
|
||
|
|
||
3 years ago
|
.cell-height-xlarge td,
|
||
|
.cell-height-xlarge tr {
|
||
4 years ago
|
min-height: 50px !important;
|
||
|
/*height: 50px !important;*/
|
||
|
/*max-height: 50px !important;*/
|
||
|
}
|
||
|
|
||
|
.belongsto-col {
|
||
|
text-decoration: underline;
|
||
|
}
|
||
|
|
||
|
.belongsto-col:hover {
|
||
|
color: var(--v-primary-base);
|
||
|
}
|
||
|
|
||
|
.hasmany-col-menu-icon {
|
||
|
opacity: 0;
|
||
3 years ago
|
transition: 0.4s opacity, 0.4s max-width;
|
||
4 years ago
|
}
|
||
|
|
||
|
.hasmany-col-menu-icon.pv {
|
||
|
/*display: none ;*/
|
||
|
max-width: 0;
|
||
|
overflow: hidden;
|
||
|
}
|
||
|
|
||
|
tr:hover .hasmany-col-menu-icon {
|
||
|
opacity: 1;
|
||
|
/*display: inline-block;*/
|
||
|
max-width: 24px;
|
||
|
}
|
||
|
|
||
|
tbody tr:nth-of-type(odd) {
|
||
|
background-color: transparent;
|
||
|
}
|
||
|
|
||
|
tbody tr:hover {
|
||
|
background-color: #dddddd33 !important;
|
||
|
}
|
||
|
|
||
|
.views-navigation-drawer {
|
||
3 years ago
|
transition: 0.4s max-width, 0.4s min-width;
|
||
4 years ago
|
}
|
||
|
|
||
|
.cell {
|
||
|
font-size: 13px;
|
||
4 years ago
|
|
||
|
&.required {
|
||
|
box-shadow: inset 0 0 0 1px red;
|
||
|
}
|
||
4 years ago
|
}
|
||
|
|
||
|
th::before {
|
||
2 years ago
|
content: '';
|
||
4 years ago
|
position: absolute;
|
||
|
width: 100%;
|
||
|
background: inherit;
|
||
|
top: -2px;
|
||
|
height: 3px;
|
||
|
left: 0;
|
||
|
}
|
||
|
|
||
|
td.primary-column {
|
||
|
border-right-width: 2px !important;
|
||
|
}
|
||
|
|
||
|
.share-link-box {
|
||
|
position: relative;
|
||
|
z-index: 2;
|
||
|
}
|
||
|
|
||
|
.share-link-box::before {
|
||
|
position: absolute;
|
||
|
top: 0;
|
||
|
left: 0;
|
||
|
bottom: 0;
|
||
|
right: 0;
|
||
|
background: var(--v-primary-base);
|
||
3 years ago
|
opacity: 0.2;
|
||
2 years ago
|
content: '';
|
||
4 years ago
|
z-index: 1;
|
||
|
pointer-events: none;
|
||
|
}
|
||
|
|
||
|
.new-column-header:hover {
|
||
|
background: linear-gradient(#ffffff33, #ffffff33);
|
||
|
}
|
||
|
|
||
|
.new-column-header {
|
||
|
text-align: center;
|
||
|
min-width: 70px;
|
||
|
}
|
||
|
|
||
|
.advance-menu-divider {
|
||
|
width: calc(100% - 26px);
|
||
|
margin-left: 13px;
|
||
|
border-style: dashed;
|
||
|
margin-top: 5px;
|
||
|
margin-bottom: 5px;
|
||
|
}
|
||
|
|
||
|
.sort-grid {
|
||
|
display: grid;
|
||
3 years ago
|
grid-template-columns: 22px auto 100px;
|
||
4 years ago
|
column-gap: 6px;
|
||
|
row-gap: 6px;
|
||
|
}
|
||
|
|
||
|
.xc-row-table {
|
||
3 years ago
|
table-layout: fixed;
|
||
4 years ago
|
}
|
||
|
|
||
|
td {
|
||
|
overflow: hidden;
|
||
|
}
|
||
|
|
||
3 years ago
|
th:first-child,
|
||
|
td:first-child {
|
||
4 years ago
|
min-width: 100px;
|
||
|
}
|
||
|
|
||
|
.has-many-icon {
|
||
|
transform: rotate(90deg);
|
||
|
}
|
||
3 years ago
|
|
||
|
::v-deep {
|
||
|
tr {
|
||
|
.nc-cell-hover-show {
|
||
|
opacity: 0;
|
||
2 years ago
|
transition: 0.3s opacity;
|
||
3 years ago
|
}
|
||
|
|
||
|
&:hover .nc-cell-hover-show {
|
||
2 years ago
|
opacity: 0.7;
|
||
3 years ago
|
}
|
||
|
}
|
||
|
}
|
||
4 years ago
|
</style>
|