表格示例错乱bug
Former-commit-id: 55509c807e43c9c9173906d9f6859ce7cd16a4dd [formerly 55509c807e43c9c9173906d9f6859ce7cd16a4dd [formerly 55509c807e43c9c9173906d9f6859ce7cd16a4dd [formerly 55509c807e43c9c9173906d9f6859ce7cd16a4dd [formerly bf3ccb939de81df011acbfd7416748259cd1583c [formerly ae7370ed3f65db3257495a8bd5f052eb9e095513]]]]] Former-commit-id: 2a9bf374333363740328b54efb2425954f4d3235 Former-commit-id: f81df7d26b3ffcaf6a2c70af0c824ec5b884b811 Former-commit-id: f4f8ff4cb317a23e2c08b638dc9aca59f20429e8 [formerly cbbda628e9b1bed507046f926f4a6ce78492bd60] Former-commit-id: 4b68663d61558131642ea27489ee12b3da3b6ded Former-commit-id: 562364039d7156c5d96d61b85ec42bf25fef7db7 Former-commit-id: b9d640cba58769028f78b591095855b8cf6bb767 Former-commit-id: 72ede8b88b42b913d1d8453fdb546954561056f5 Former-commit-id: 6c87b7b7aa205f9adb6fd5825624b7195c6954aa
This commit is contained in:
@@ -26,6 +26,7 @@
|
|||||||
"highlight.js": "^9.12.0",
|
"highlight.js": "^9.12.0",
|
||||||
"js-cookie": "^2.2.0",
|
"js-cookie": "^2.2.0",
|
||||||
"lodash.clonedeep": "^4.5.0",
|
"lodash.clonedeep": "^4.5.0",
|
||||||
|
"lodash.sortby": "^4.7.0",
|
||||||
"lodash.uniqueid": "^4.0.1",
|
"lodash.uniqueid": "^4.0.1",
|
||||||
"lowdb": "^1.0.0",
|
"lowdb": "^1.0.0",
|
||||||
"marked": "^0.3.9",
|
"marked": "^0.3.9",
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '基础表格',
|
title: '基础表格',
|
||||||
|
index: 1,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [
|
tableData: [
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '单选',
|
title: '单选',
|
||||||
|
index: 10,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [{
|
tableData: [{
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '多选',
|
title: '多选',
|
||||||
|
index: 11,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData3: [{
|
tableData3: [{
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '排序',
|
title: '排序',
|
||||||
|
index: 12,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [{
|
tableData: [{
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '筛选',
|
title: '筛选',
|
||||||
|
index: 13,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [{
|
tableData: [{
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '自定义列模板',
|
title: '自定义列模板',
|
||||||
|
index: 14,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [{
|
tableData: [{
|
||||||
|
|||||||
@@ -47,6 +47,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '展开行',
|
title: '展开行',
|
||||||
|
index: 15,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData5: [{
|
tableData5: [{
|
||||||
|
|||||||
@@ -65,6 +65,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '表尾合计行',
|
title: '表尾合计行',
|
||||||
|
index: 16,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData6: [{
|
tableData6: [{
|
||||||
|
|||||||
@@ -64,6 +64,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '合并行或列',
|
title: '合并行或列',
|
||||||
|
index: 17,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData6: [{
|
tableData6: [{
|
||||||
|
|||||||
@@ -26,6 +26,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '自定义索引',
|
title: '自定义索引',
|
||||||
|
index: 18,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [{
|
tableData: [{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '带斑马纹表格',
|
title: '带斑马纹表格',
|
||||||
|
index: 2,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [{
|
tableData: [{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '带边框表格',
|
title: '带边框表格',
|
||||||
|
index: 3,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData: [{
|
tableData: [{
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '带状态表格',
|
title: '带状态表格',
|
||||||
|
index: 4,
|
||||||
methods: {
|
methods: {
|
||||||
tableRowClassName ({row, rowIndex}) {
|
tableRowClassName ({row, rowIndex}) {
|
||||||
if (rowIndex === 1) {
|
if (rowIndex === 1) {
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '固定表头',
|
title: '固定表头',
|
||||||
|
index: 5,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData3: [{
|
tableData3: [{
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '固定列',
|
title: '固定列',
|
||||||
|
index: 6,
|
||||||
methods: {
|
methods: {
|
||||||
handleClick (row) {
|
handleClick (row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '固定列和表头',
|
title: '固定列和表头',
|
||||||
|
index: 7,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData3: [{
|
tableData3: [{
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '流体高度',
|
title: '流体高度',
|
||||||
|
index: 8,
|
||||||
methods: {
|
methods: {
|
||||||
deleteRow (index, rows) {
|
deleteRow (index, rows) {
|
||||||
rows.splice(index, 1)
|
rows.splice(index, 1)
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
title: '多级表头',
|
title: '多级表头',
|
||||||
|
index: 9,
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
tableData3: [{
|
tableData3: [{
|
||||||
|
|||||||
@@ -15,14 +15,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import sortby from 'lodash.sortby'
|
||||||
const req = context => context.keys().map(context)
|
const req = context => context.keys().map(context)
|
||||||
const tables = req(require.context('./components', true, /\.vue$/))
|
const tables = req(require.context('./components', true, /\.vue$/))
|
||||||
const components = {}
|
const components = {}
|
||||||
const tableList = []
|
const tableList = []
|
||||||
tables.forEach((table, index) => {
|
sortby(tables.map(e => ({
|
||||||
components[`d2-demo-el-table-${index + 1}`] = table.default
|
component: e.default,
|
||||||
|
index: e.default.index
|
||||||
|
})), ['index']).forEach((table, index) => {
|
||||||
|
components[`d2-demo-el-table-${index + 1}`] = table.component
|
||||||
tableList.push({
|
tableList.push({
|
||||||
title: table.default.title,
|
title: table.component.title,
|
||||||
component: `d2-demo-el-table-${index + 1}`
|
component: `d2-demo-el-table-${index + 1}`
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user