使用type="index"显示的是自增数字,
需要如下效果
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<script src="https://unpkg.com/vue@next"></script>
<!-- import CSS -->
<link rel="stylesheet" href="https://unpkg.com/element-plus/lib/theme-chalk/index.css" />
<!-- import JavaScript -->
<script src="https://unpkg.com/element-plus/lib/index.full.js"></script>
<title>Element Plus demo</title>
</head>
<body>
<div id="app">
<el-table
ref="singleTable"
:data="tableData"
highlight-current-row
style="width: 100%"
>
<el-table-column type="index" width="100" label="#">
<template #default="scope">
<span v-html="tableIndex(scope.$index) "> </span>
</template>
</el-table-column>
<el-table-column property="date" label="日期" width="120"> </el-table-column>
<el-table-column property="name" label="姓名" width="120"> </el-table-column>
<el-table-column property="address" label="地址"> </el-table-column>
</el-table>
</div>
<script>
const App = {
data() {
return {
tableData: [
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
},
{
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
},
{
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
},
{
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}
]
}
},
methods: {
tableIndex(e) {
return `&#${9312 + e};`
}
}
}
const app = Vue.createApp(App)
app.use(ElementPlus)
app.mount('#app')
</script>
</body>
</html>
html中写带圈的数字
表示数値文字参照表示数値文字参照
① ① ⑪ ⑪
② ② ⑫ ⑫
③ ③ ⑬ ⑬
④ ④ ⑭ ⑭
⑤ ⑤ ⑮ ⑮
⑥ ⑥ ⑯ ⑯
⑦ ⑦ ⑰ ⑰
⑧ ⑧ ⑱ ⑱
⑨ ⑨ ⑲ ⑲
⑩ ⑩ ⑳ ⑳
10 回答11.2k 阅读
5 回答4.9k 阅读✓ 已解决
4 回答3.2k 阅读✓ 已解决
2 回答2.8k 阅读✓ 已解决
3 回答5.2k 阅读✓ 已解决
2 回答4.8k 阅读✓ 已解决
4 回答4.4k 阅读✓ 已解决
效果图:
