wangzhibo
2026-07-16 b57020623cf0c946706573bf102e548c3a544423
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
import { useConfig, useCore } from "../../hooks";
import { defineComponent } from "vue";
import { Search } from "@element-plus/icons-vue";
 
export default defineComponent({
    name: "cl-adv-btn",
 
    components: {
        Search
    },
 
    setup(_, { slots }) {
        const { crud, mitt } = useCore();
        const { style } = useConfig();
 
        function open() {
            mitt.emit("crud.openAdvSearch");
        }
 
        return () => {
            return (
                <el-button size={style.size} onClick={open} class="cl-adv-btn">
                    <el-icon>
                        <Search />
                    </el-icon>
                    {slots.default?.() || crud.dict.label.advSearch}
                </el-button>
            );
        };
    }
});