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
| import { ElCol } from "element-plus";
| import { h, defineComponent } from "vue";
|
| // 封装element-plus的el-col组件
| export default defineComponent({
| name: "ReCol",
| props: {
| value: {
| type: Number,
| default: 24
| }
| },
| render() {
| const attrs = this.$attrs;
| const val = this.value;
| return h(
| ElCol,
| {
| xs: val,
| sm: val,
| md: val,
| lg: val,
| xl: val,
| ...attrs
| },
| { default: () => this.$slots.default() }
| );
| }
| });
|
|