提交 3ac5a242 编写于 作者: View Design's avatar View Design

Table

上级 62c1262b
<template>
<div>
<UTable :rows="data" />
</div>
<UTable :rows="data" :ui="config" />
</template>
<script setup>
defineProps({
const props = defineProps({
data: {
type: Array,
default: () => []
}
})
const config = {
base: 'table-auto'
}
</script>
\ No newline at end of file
......@@ -12,4 +12,23 @@ const lineChart = `
const tableChart = `
::ProseGridTable{:data='[{"repo_id":"806709826","repo_name":"2noise/ChatTTS","primary_language":"Jupyter Notebook","description":"ChatTTS is a generative speech model for daily dialogue.","stars":"1451","forks":"167","pull_requests":"3","pushes":"","total_score":"6000.5405","contributor_logins":"zhouhao27,Huixxi,Thinking80s,bank010,lphkxd","collection_names":""}]'}
`
const table = `
| repo_id | repo_name | primary_language | description | stars | forks | pull_requests | pushes | total_score | contributor_logins | collection_names |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 806709826 | 2noise/ChatTTS | Jupyter Notebook | ChatTTS is a generative speech model for daily dialogue | 1451 | 167 | 3 | | 6000.5405 | zhouhao27,Huixxi,Thinking80s,bank010,lphkxd | |
`
const table2 = `
| 列1 | 列2 | 列3 | 列4 | 列5 | 列6 | 列7 | 列8 | 列9 | 列10 |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 行1数据A | 数据B | 数据C | 数据D | 数据E | 数据F | 数据G | 数据H | 数据I | 数据J |
| 行2数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行3数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行4数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行5数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行6数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行7数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行8数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行9数据A | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 行10数据A | 数据B | 数据C | 数据D | 数据E | 数据F | 数据G | 数据H | 数据I | 数据J |
`
</script>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册