@ctsy/vuex
Vuex 辅助类
提供 Vuex 常用辅助方法等
1. 安装
yarn add @ctsy/vuex
2. 使用
// 初始化 vuex
// src/store/index.ts
import { store as Store } from "@ctsy/vuex";
import Auth from "./modules/Auth";
const store = Store({
Auth,
});
declare let window: any;
window.Store = store;
export default store;
// src/store/modules/class.ts
import CollectionTypeApi from "@/api//CollectionType";
import Vuex, { VuexStore } from "@ctsy/vuex";
@Vuex({
Request: CollectionTypeApi,
})
export default class CollectionType extends VuexStore {
ClassName: string = "CollectionType";
}
自定义正则
1.引用 import PublicReg from 'src/RegExp'
2.初始化 let reg = new PublicReg.Regs()
3.使用 reg.Name('张三') //true
//自定义正则
注意:
> 当自定义正则后,基于自定义正则校验将会同时改变
1.初始化 let custom = new PublicReg.CustomReg()
2.使用 custom.Name =/\d{6,10}/
3.调用 let reg = new PublicReg.Regs()
4.使用 reg.Name('张三') //false
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 3.0.3 | ^2.6 | ISC | |
| 3.0.2 | ^2.6 | ISC | |
| 3.0.1 | ^2.6 | ISC | |
| 3.0.0 | ^2.6 | ISC | |
| 2.0.1 | ^2.6.11 | ISC | |
| 2.0.0 | ^2.6.11 | ISC | |
| 1.0.18 | ^2.6 | ISC | |
| 1.0.17 | ^2.6 | ISC | |
| 1.0.16 | ^2.6 | ISC | |
| 1.0.15 | ^2.6 | ISC | |
| 1.0.14 | ^2.6 | ISC | |
| 1.0.13 | ^2.6 | ISC | |
| 1.0.12 | ^2.6 | ISC | |
| 1.0.11 | ^2.6 | ISC | |
| 1.0.10 | ^2.6 | ISC | |
| 1.0.9 | ^2.6 | ISC | |
| 1.0.8 | ^2.6 | ISC | |
| 1.0.7 | ^2.6 | ISC | |
| 1.0.6 | ^2.6 | ISC | |
| 1.0.5 | ^2.6.10 | ISC | |
| 1.0.4 | ^2.6.10 | ISC | |
| 1.0.3 | ^2.6.10 | ISC | |
| 1.0.2 | ^2.6.10 | ISC | |
| 1.0.1 | ^2.6.10 | ISC | |
| 1.0.0 | ^2.6.10 | ISC |