no message
Former-commit-id: 87839e7fb304d805a0c0276093e7b26f6ae9789f Former-commit-id: ef37b8f5be3ec13042dcff318c55c759ef61dfab Former-commit-id: 40e397e70832bad2b6c9e23e451e72d563987a24
This commit is contained in:
@@ -5,22 +5,30 @@
|
||||
title="基本示例"
|
||||
url="https://github.com/mholt/PapaParse">
|
||||
</PageHeader>
|
||||
<el-upload
|
||||
:before-upload="handleUpload"
|
||||
action="default">
|
||||
<el-button>选择一个CSV文件</el-button>
|
||||
</el-upload>
|
||||
<br>
|
||||
<el-table
|
||||
v-bind="table"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
v-for="(item, index) in table.columns"
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="4">
|
||||
<div class="mb">
|
||||
<el-button @click="download">下载演示CSV</el-button>
|
||||
</div>
|
||||
<el-upload
|
||||
:before-upload="handleUpload"
|
||||
action="default">
|
||||
<el-button type="success">选择本地CSV文件</el-button>
|
||||
</el-upload>
|
||||
</el-col>
|
||||
<el-col :span="20">
|
||||
<el-table
|
||||
v-bind="table"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
v-for="(item, index) in table.columns"
|
||||
:key="index"
|
||||
:prop="item.prop"
|
||||
:label="item.label">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
@@ -52,6 +60,9 @@ export default {
|
||||
}
|
||||
})
|
||||
return false
|
||||
},
|
||||
download () {
|
||||
window.location.href='http://fairyever.qiniudn.com/d2admin-vue-demo.csv'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user