index.vue 741 字节
Newer Older
W
antd  
wuyb@phxg.cn 已提交
1 2
<template>
    <div>antd封装</div>
W
modal  
wuyb@phxg.cn 已提交
3
    <modal v-model:isShow="isShow" title="新增" @modalOk="modalOk">
W
antd  
wuyb@phxg.cn 已提交
4 5
        <div>1232</div>
    </modal>
W
modal  
wuyb@phxg.cn 已提交
6
    <a-button @click="onModalShow">modal</a-button>
W
antd  
wuyb@phxg.cn 已提交
7 8 9 10 11 12 13 14 15 16 17 18 19
</template>

<script>
    import {ref} from 'vue'
    import modal from './modal/index.vue'
    import {useModal} from "@/hook/useModal";

    export default {
        name: "index",
        components: {
            modal
        },
        setup() {
W
modal  
wuyb@phxg.cn 已提交
20 21 22 23 24 25 26
            const resModal = useModal()
            // const resModal = {
            //     onModalShow, isShow, modalOk, modalCancel
            // }

            const defaultObj = {}
            return Object.assign(defaultObj, resModal)
W
antd  
wuyb@phxg.cn 已提交
27 28 29 30 31 32 33
        }
    }
</script>

<style scoped>

</style>