0.0.25 • Published 1 year ago

cj-toolkit-x v0.0.25

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

js:

import {
    appStore,
    installer
} from "cj-toolkit-x/dist";

const hook = {
    /**
     * 所有工作之前调用
     * @param appConfig
     * @param appStore
     */
    compiled(appConfig, appStore) {
        console.log(appConfig);
    },
    /**
     * 准备好的换进之前调用
     * @param appStore
     */
    beforeReady(appStore) {

    },
    /**
     * 准备好的换进之后调用
     * @param appStore
     */
    afterReady(appStore) {


    }
}
// 安装当前插件
installer(hook)
// 日期工具类
export const dateUtils = appStore.getPlugin("dateUtils");
// 对象工具类
export const objectUtils = appStore.getPlugin("objectUtils");
// 数组工具类
export const arrayUtils = appStore.getPlugin("arrayUtils");
// 数据编解码插件
export const dataContract = appStore.getPlugin("dataContract");
// 对象拷贝工具
export const dataCopier = appStore.getPlugin("dataCopier");
// 缓存管理器
export const cacheManager = appStore.getPlugin("cacheManager");

ts:

import {
    AppConfig,
    AppStore,
    appStore,
    ArrayUtils,
    CacheManager,
    DataContract,
    DataCopier,
    DateUtils,
    installer,
    ObjectUtils
} from "cj-toolkit-x/dist";

const hook: AppRunHook = {

    /**
     * 所有工作之前调用
     * @param appConfig
     * @param appStore
     */
    compiled(appConfig: AppConfig, appStore: AppStore) {

    },

    /**
     * 准备好的环境之前调用
     * @param appStore
     */
    beforeReady(appStore: AppStore) {

    },
    /**
     * 准备好的环境之后调用
     * @param appStore
     */
    afterReady(appStore: AppStore) {

    }
}
// 安装插件
installer(hook)
// 日期工具类
export const dateUtils = appStore.getPlugin("dateUtils") as DateUtils;
// 对象工具类
export const objectUtils = appStore.getPlugin("objectUtils") as ObjectUtils;
// 数组工具类
export const arrayUtils = appStore.getPlugin("arrayUtils") as ArrayUtils;
// 数据编解码插件
export const dataContract = appStore.getPlugin("dataContract") as DataContract;
// 对象拷贝工具
export const dataCopier = appStore.getPlugin("dataCopier") as DataCopier;
// 缓存管理器
export const cacheManager = appStore.getPlugin("cacheManager") as CacheManager;
0.0.22

1 year ago

0.0.23

1 year ago

0.0.24

1 year ago

0.0.25

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.15

1 year ago

0.0.16

1 year ago

0.0.17

1 year ago

0.0.18

1 year ago

0.0.19

1 year ago

0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

1 year ago

0.0.14

1 year ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago