3.0.3 • Published 4 years ago

@ctsy/vuex v3.0.3

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

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
3.0.3

4 years ago

3.0.2

4 years ago

3.0.1

4 years ago

3.0.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.0.18

5 years ago

1.0.17

5 years ago

1.0.16

5 years ago

1.0.15

5 years ago

1.0.14

5 years ago

1.0.13

5 years ago

1.0.12

5 years ago

1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago