no message
Former-commit-id: 3b81057c2e6ee2c377e48e4b12a0e0db13f9f393 [formerly 3b81057c2e6ee2c377e48e4b12a0e0db13f9f393 [formerly 3b81057c2e6ee2c377e48e4b12a0e0db13f9f393 [formerly 3b81057c2e6ee2c377e48e4b12a0e0db13f9f393 [formerly aeafc1a57a6a33ab2b89708361d5ba56dd86bc05 [formerly f0dde4e2af6a93ea33e1c5d6174c6b0ddbf8e11d]]]]] Former-commit-id: a6f21514f5845f6efc0f3838baa635900939fd79 Former-commit-id: 852787f7e4f2f19bfd484f6e9f6850fa4665ef24 Former-commit-id: 92ebe8951832816b7b0b23acfea23a158ca261c6 [formerly dd63ec2984a3c071b647412f72344bbc32c63ed3] Former-commit-id: c227e979c8cab412c09a3ff33d5959316cf40340 Former-commit-id: 5abda248deafc2ffe5d49f6dd1e592628ce554d9 Former-commit-id: 32e8ff61c19ed9bcba78363176655062a987312b Former-commit-id: 91a798632df70e3b7847579d14036057114a0fd4 Former-commit-id: 7d50160fe7a8b08e8be9f3a2a3606edf1c0b5b4d
This commit is contained in:
@@ -1 +1 @@
|
|||||||
d490236cefe994028877481378a746c127961b8a
|
35a1519553c12e452244d02c9010ff5200e2c0d0
|
||||||
@@ -1,88 +0,0 @@
|
|||||||
<template>
|
|
||||||
<d2-container>
|
|
||||||
<template slot="header">勾选</template>
|
|
||||||
<div class="wraper">
|
|
||||||
<bigdata-table
|
|
||||||
v-model="tableDataHandled"
|
|
||||||
:row-num="20"
|
|
||||||
:col-num="7"
|
|
||||||
show-index
|
|
||||||
fixed
|
|
||||||
stripe
|
|
||||||
:col-width="200"
|
|
||||||
:header-height="40"
|
|
||||||
:columns="columns"
|
|
||||||
:index-render="indexRender"
|
|
||||||
:fixed-col="1"
|
|
||||||
@on-click-tr="handleClickTr"/>
|
|
||||||
</div>
|
|
||||||
</d2-container>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
/* eslint-disable */
|
|
||||||
// 本页是由 https://github.com/lison16/vue-bigdata-table/blob/master/src/App.vue 修改而来
|
|
||||||
// 由于原页面有太多的地方不符合本项目的代码规范,本页面不做代码检查
|
|
||||||
export default {
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
tableData: [],
|
|
||||||
tableDataSelected: [],
|
|
||||||
columns: [],
|
|
||||||
tableDataHandled: [], // 带有数据的表格数据
|
|
||||||
emptyData: [], // 空的表格数据
|
|
||||||
canEdit: true,
|
|
||||||
editRow: 1,
|
|
||||||
editCol: 1,
|
|
||||||
defaultSort: {1: 'down'}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
indexRender (h, index) {
|
|
||||||
return h('input', {
|
|
||||||
domProps: {
|
|
||||||
type: 'checkbox',
|
|
||||||
checked: this.tableDataSelected[index]
|
|
||||||
}
|
|
||||||
}, '')
|
|
||||||
},
|
|
||||||
handleClickTr (index) {
|
|
||||||
this.$set(this.tableDataSelected, index, !this.tableDataSelected[index])
|
|
||||||
},
|
|
||||||
changeData (rowLen) {
|
|
||||||
let dataArr = []
|
|
||||||
for (let i = 0; i < rowLen; i++) {
|
|
||||||
let arr = [
|
|
||||||
i + '00',
|
|
||||||
'count' + i,
|
|
||||||
'23.4534534345',
|
|
||||||
'0023' + i,
|
|
||||||
'123.234534534534',
|
|
||||||
'namenasdfsdfsdfsdfssdfsdfsdsdfsdfsf' + i,
|
|
||||||
'2014年1月1日'
|
|
||||||
]
|
|
||||||
dataArr.push(arr)
|
|
||||||
}
|
|
||||||
this.tableDataHandled = dataArr
|
|
||||||
this.tableDataSelected = dataArr.map(e => false)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted () {
|
|
||||||
this.changeData(1000)
|
|
||||||
let columns = ['这是数字', '这是字符1列', '这是纬度', '这是数字', '这是经度', '这是字符2列', '这是时间'].map((title, col) => {
|
|
||||||
return {
|
|
||||||
title: title,
|
|
||||||
align: 'center'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.columns = columns
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.wraper{
|
|
||||||
height: 400px;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
@@ -1 +1 @@
|
|||||||
bb07b3ba57519000163de64466fa95e4ce348572
|
f07ff536632fcb4e7ee76075c5c0846e6a07b078
|
||||||
Reference in New Issue
Block a user