1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| import { defineComponent } from "vue";
| import { useConfig, useCore } from "../../hooks";
|
| export default defineComponent({
| name: "cl-add-btn",
|
| setup(_, { slots }) {
| const { crud } = useCore();
| const { style } = useConfig();
|
| return () => {
| return (
| crud.getPermission("add") && (
| <el-button type="primary" size={style.size} onClick={crud.rowAdd}>
| {slots.default?.() || crud.dict.label.add}
| </el-button>
| )
| );
| };
| }
| });
|
|