index.d.ts 1.5 KB
Newer Older
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
import { ElMessage } from 'element-ui/types/message';
import { FooterItemsService, TopItemsService, UIStateService } from 'ibiz-vue';
declare global {
    interface Window {
       
    }
}

declare module "vue/types/vue" {
    interface Vue {
        $http:any,
        $throw:any,
        $success: Function,
        $warning: Function,
        $tl: Function,
        $info: Function,
        $util:any,
        $verify:any,
        $viewTool:any,
        $uiActionTool:any,
        $message:ElMessage,
        $appmodal:any,
        $appdrawer:any,
        $apppopover:any,
        $footerRenderService:FooterItemsService,
        $topRenderService:TopItemsService,
        $uiState:UIStateService,
    }
}
declare global {
    interface Object {
        /**
         * 清除所有属性,不改变内存地址
         *
         * @memberof Object
         */
        clearAll(): void;
    }

    /**
     * 判断对象是否存在,判断是否为undefined或null,避免数值型0误判
     *
     * @param {*} obj
     * @returns {boolean}
     */
    function isExist(obj: any): boolean;

    /**
     * 判断字符串是否为空
     *
     * @param {string | undefined | null} str
     * @returns {boolean}
     */
    function isEmpty(str: string | undefined | null): boolean;

    /**
     * 判断字符串,存在并且不为空
     *
     * @param {string | undefined | null} str
     * @returns {boolean}
     */
    function isExistAndNotEmpty(str: string | undefined | null): boolean;
}