tableCommon.vue
1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<template>
<!--
调用: {
tableData, // 表格内容数据 array object
headData, // 表格表头数据 array object
tabHeight, // 是否固定头部 string: no | number: yes
}
-->
<el-table
class="asis-table"
:data="tableData"
:show-summary="isSummary"
:summary-method="summaryCallback"
header-row-class-name="asis-table-head"
:height="typeof tabHeight === 'number' ? tabHeight : null"
style="width: 100%"
>
<el-table-column
:prop="item.prop"
:label="item.label"
align="center"
v-for="item in headData"
:key="item.prop"
></el-table-column>
</el-table>
</template>
<script>
// import func from "../../../vue-temp/vue-editor-bridge";
export default {
props: {
tableData: {
type: Array,
default: () => []
},
headData: {
type: Array,
default: () => []
},
tabHeight: {
type: [Number, String],
default: ""
},
isSummary: {
type: Boolean,
default: false
},
summaryCallback: {
type: Function,
default: () => null
}
},
data() {
return {
//
};
},
methods: {
i18nFomatter(title) {
let langeuageTitle = "echartsTitle." + title;
return this.$t(langeuageTitle);
}
}
};
</script>