mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-15 04:42:23 +08:00
chore: solve merge conflict
This commit is contained in:
commit
c0ece862f5
0
.vscode/settings.json
vendored
Normal file
0
.vscode/settings.json
vendored
Normal file
@ -98,7 +98,8 @@ export default {
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px" // maxheight will fix header
|
||||
@ -205,7 +206,8 @@ export default {
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
@ -306,7 +308,8 @@ export default {
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
@ -403,11 +406,12 @@ export default {
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
:on-change="onChange"
|
||||
:pagination="{total:data.length,limit:10}"
|
||||
:pagination="{ total: data.length, limit: 10 }"
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
@ -507,11 +511,12 @@ export default {
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
:on-change="onChange"
|
||||
:pagination="{total:data.length,limit:10,custom:true}"
|
||||
:pagination="{ total: data.length, limit: 10, custom: true }"
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
@ -563,11 +568,12 @@ export default {
|
||||
max-height="300px"
|
||||
:on-change="onChange"
|
||||
:search="search"
|
||||
:pagination="{total:data.length,limit:10}"
|
||||
:pagination="{ total: data.length, limit: 10 }"
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
@ -621,11 +627,12 @@ export default {
|
||||
max-height="300px"
|
||||
:on-change="onChange"
|
||||
:search="search1"
|
||||
:pagination="{total:data.length,limit:10}"
|
||||
:pagination="{ total: data.length, limit: 10 }"
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
@ -677,11 +684,12 @@ export default {
|
||||
max-height="300px"
|
||||
:on-change="onChange1"
|
||||
:search="search"
|
||||
:pagination="{total:data.length,limit:10}"
|
||||
:pagination="{ total: data.length, limit: 10 }"
|
||||
/>
|
||||
</div>
|
||||
<div class="n-doc-section__source">
|
||||
<textarea><n-advance-table
|
||||
<textarea>
|
||||
<n-advance-table
|
||||
:columns="columns"
|
||||
:data="data"
|
||||
max-height="300px"
|
||||
|
@ -1,17 +1,13 @@
|
||||
<template>
|
||||
<div
|
||||
ref="tableWrapper"
|
||||
class="n-advance-tabel__wrapper"
|
||||
>
|
||||
<div ref="tableWrapper"
|
||||
class="n-advance-tabel__wrapper">
|
||||
<div class="n-advance-table__operation">
|
||||
<section class="n-advance-table__operation__bacth" />
|
||||
<div class="n-advance-table__operation__custom">
|
||||
<slot name="table-operation" />
|
||||
</div>
|
||||
<div
|
||||
v-if="search"
|
||||
class="n-advance-table__operation__search"
|
||||
>
|
||||
<div v-if="search"
|
||||
class="n-advance-table__operation__search">
|
||||
<searchInput
|
||||
ref="search"
|
||||
style=" margin-bottom: 18px;"
|
||||
@ -31,21 +27,17 @@
|
||||
:key="i"
|
||||
:style="computeCustomWidthStl(column)"
|
||||
>
|
||||
<col
|
||||
v-if="scrollBarWidth"
|
||||
:width="scrollBarWidth"
|
||||
>
|
||||
<col v-if="scrollBarWidth"
|
||||
:width="scrollBarWidth" >
|
||||
</colgroup>
|
||||
<n-thead>
|
||||
<n-tr>
|
||||
<n-th
|
||||
v-for="(column, i) in columns"
|
||||
:key="column.key"
|
||||
>
|
||||
<n-th v-for="(column, i) in columns"
|
||||
:key="column.key">
|
||||
{{ column.title }}
|
||||
<SortIcon
|
||||
v-if="column.sortable"
|
||||
v-model="sortIndexs[(column.key || i) ]"
|
||||
v-model="sortIndexs[column.key || i]"
|
||||
@onSortTypeChange="
|
||||
type =>
|
||||
onSortTypeChange({
|
||||
@ -68,7 +60,9 @@
|
||||
:filter-key="column.key || i"
|
||||
:filter-items="column.filterItems"
|
||||
:filter-multiple="column.filterMultiple || false"
|
||||
@on-filter="({value,key,filterFn}) => onFilter(value,key, filterFn)"
|
||||
@on-filter="
|
||||
({ value, key, filterFn }) => onFilter(value, key, filterFn)
|
||||
"
|
||||
/>
|
||||
</n-th>
|
||||
<span
|
||||
@ -95,14 +89,10 @@
|
||||
>
|
||||
</colgroup>
|
||||
<n-tbody>
|
||||
<n-tr
|
||||
v-for="(rowData, i) in showingData"
|
||||
:key="i"
|
||||
>
|
||||
<n-td
|
||||
v-for="column in columns"
|
||||
:key="column.key"
|
||||
>
|
||||
<n-tr v-for="(rowData, i) in showingData"
|
||||
:key="i">
|
||||
<n-td v-for="column in columns"
|
||||
:key="column.key">
|
||||
<row
|
||||
:index="i"
|
||||
:row="rowData"
|
||||
@ -111,10 +101,8 @@
|
||||
/>
|
||||
</n-td>
|
||||
</n-tr>
|
||||
<div
|
||||
v-if="showingData.length === 0"
|
||||
class="n-no-data-tip"
|
||||
>
|
||||
<div v-if="showingData.length === 0"
|
||||
class="n-no-data-tip">
|
||||
No data
|
||||
</div>
|
||||
</n-tbody>
|
||||
@ -124,10 +112,8 @@
|
||||
v-if="pagination !== false && showingData.length"
|
||||
class="n-advanced-table__pagination"
|
||||
>
|
||||
<n-pagination
|
||||
v-model="currentPage"
|
||||
:page-count="pageCount"
|
||||
/>
|
||||
<n-pagination v-model="currentPage"
|
||||
:page-count="pageCount" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -180,6 +166,10 @@ export default {
|
||||
type: Function,
|
||||
default: null
|
||||
},
|
||||
minHeight: {
|
||||
type: [Number, String],
|
||||
default: 'unset'
|
||||
},
|
||||
maxHeight: {
|
||||
type: [Number, String],
|
||||
default: 'auto'
|
||||
@ -275,6 +265,12 @@ export default {
|
||||
? this.maxWidth + 'px'
|
||||
: this.maxWidth
|
||||
}
|
||||
if (this.minHeight !== 'unset') {
|
||||
stl.minHeight =
|
||||
typeof this.minHeight === 'number'
|
||||
? this.minHeight + 'px'
|
||||
: this.minHeight
|
||||
}
|
||||
return stl
|
||||
},
|
||||
colGroup () {
|
||||
@ -474,7 +470,7 @@ export default {
|
||||
let { sortable, key, type, column } = this.currentSortColumn
|
||||
// use remote sort
|
||||
if (sortable === true) {
|
||||
if (!this.searchDataNoSort) {
|
||||
if (!this.searchDataNoSort && this.data.length !== 0) {
|
||||
this.searchDataNoSort = data.slice(0)
|
||||
}
|
||||
if (type === 0) {
|
||||
|
@ -19,14 +19,17 @@
|
||||
background: transparent;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
background: rgba(255,255,255,0.2);
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
border-radius: 2.5px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(255,255,255,0.3);
|
||||
background: rgba(255, 255, 255, 0.3);
|
||||
}
|
||||
&::-webkit-scrollbar-corner{
|
||||
background: transparent
|
||||
&::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
&::-webkit-scrollbar:horizontal {
|
||||
height: 5px;
|
||||
}
|
||||
table thead tr th:last-of-type {
|
||||
padding-left: 32px;
|
||||
@ -37,14 +40,14 @@
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.n-advance-table__operation{
|
||||
.n-advance-table__operation {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.n-no-data-tip{
|
||||
.n-no-data-tip {
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
display: table-cell;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user