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