byt-ui 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "byt-ui",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "private": false,
5
5
  "description": "byt组件库",
6
6
  "author": {
@@ -2,12 +2,18 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-09-19 10:17:14
5
- * @LastEditTime: 2022-10-08 09:32:55
5
+ * @LastEditTime: 2022-10-08 10:50:57
6
6
  * @LastEditors: 王国火
7
7
  */
8
- import * as store from "./store"
9
- import * as validate from "./validate"
10
- export default{
11
- store,
12
- validate
13
- }
8
+ // 动态引入
9
+ let conmmon = {};
10
+ const requireContext = require.context('./modules', true, /.*\.js/)
11
+ requireContext.keys().map(key => {
12
+ const reg=/\w+/
13
+ const k=key.match(reg)[0]
14
+ conmmon[k]=requireContext(key).default||requireContext(key)
15
+ })
16
+
17
+ console.log(conmmon)
18
+
19
+ export default conmmon
@@ -1,7 +1,7 @@
1
1
  import { validatenull } from './validate'
2
-
2
+ import website from './website'
3
3
  //存储前缀 避免与同域的其它项目冲突
4
- const keyName = 'bonyear'
4
+ const keyName = website.key
5
5
  /**
6
6
  * 存储localStorage
7
7
  */
@@ -0,0 +1,13 @@
1
+ /*
2
+ * @Description:
3
+ * @Author: 王国火
4
+ * @Date: 2022-07-13 12:31:34
5
+ * @LastEditTime: 2022-10-08 10:51:37
6
+ * @LastEditors: 王国火
7
+ */
8
+ export default{
9
+ key: 'bonyear', // 配置主键,目前用于存储
10
+ formLoginClient: 'pig:pig', // 用户名密码登录的 client 信息
11
+ smsLoginClient: 'app:app', // 验证码登录的 client 信息
12
+ socialLoginClient: 'social:social', // 社交登录的 client 信息
13
+ }
package/packages/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-09-15 17:02:55
5
- * @LastEditTime: 2022-10-08 09:41:46
5
+ * @LastEditTime: 2022-10-08 10:52:11
6
6
  * @LastEditors: 王国火
7
7
  */
8
8
  import Vue from 'vue'
@@ -39,4 +39,5 @@ export default{
39
39
 
40
40
  export const store=Common.store
41
41
  export const validate=Common.validate
42
+ export const website=Common.website
42
43