vue2-client 1.12.38 → 1.12.39
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/jest.config.js +22 -22
- package/package.json +108 -108
- package/src/base-client/components/common/XCollapse/XCollapse.vue +154 -154
- package/src/base-client/components/common/XForm/XFormItem.vue +1314 -1256
- package/src/base-client/components/common/XForm/XTreeSelect.vue +263 -264
- package/src/base-client/components/common/XForm/demo.vue +105 -0
- package/src/router/async/router.map.js +1 -3
- package/src/router/index.js +27 -27
- package/test/request.test.js +17 -17
- package/src/base-client/components/common/XCollapse/XCollapseDemo.vue +0 -15
package/src/router/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { formatRoutes } from '@vue2-client/utils/routerUtil'
|
|
2
|
-
|
|
3
|
-
// 不需要登录拦截的路由配置
|
|
4
|
-
const loginIgnore = {
|
|
5
|
-
names: ['404', '403'], // 根据路由名称匹配
|
|
6
|
-
paths: ['/login', '/example', '/system/example', '/system/example/default', '/system/example/sub-example', '/submitTicket', '/submitTicket/', '/ServiceReview', '/DynamicStatistics', '/NewDynamicStatistics'], // 根据路由fullPath匹配
|
|
7
|
-
/**
|
|
8
|
-
* 判断路由是否包含在该配置中
|
|
9
|
-
* @param route vue-router 的 route 对象
|
|
10
|
-
* @returns {boolean}
|
|
11
|
-
*/
|
|
12
|
-
includes (route) {
|
|
13
|
-
return this.names.includes(route.name) || this.paths.includes(route.path)
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* 初始化路由实例
|
|
19
|
-
* @param isAsync 是否异步路由模式
|
|
20
|
-
* @returns {RouterOptions}
|
|
21
|
-
*/
|
|
22
|
-
function initRouter (isAsync) {
|
|
23
|
-
const options = require('./async/config.async').default
|
|
24
|
-
formatRoutes(options.routes)
|
|
25
|
-
return options
|
|
26
|
-
}
|
|
27
|
-
export { loginIgnore, initRouter }
|
|
1
|
+
import { formatRoutes } from '@vue2-client/utils/routerUtil'
|
|
2
|
+
|
|
3
|
+
// 不需要登录拦截的路由配置
|
|
4
|
+
const loginIgnore = {
|
|
5
|
+
names: ['404', '403'], // 根据路由名称匹配
|
|
6
|
+
paths: ['/login', '/example', '/system/example', '/system/example/default', '/system/example/sub-example', '/submitTicket', '/submitTicket/', '/ServiceReview', '/DynamicStatistics', '/NewDynamicStatistics'], // 根据路由fullPath匹配
|
|
7
|
+
/**
|
|
8
|
+
* 判断路由是否包含在该配置中
|
|
9
|
+
* @param route vue-router 的 route 对象
|
|
10
|
+
* @returns {boolean}
|
|
11
|
+
*/
|
|
12
|
+
includes (route) {
|
|
13
|
+
return this.names.includes(route.name) || this.paths.includes(route.path)
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 初始化路由实例
|
|
19
|
+
* @param isAsync 是否异步路由模式
|
|
20
|
+
* @returns {RouterOptions}
|
|
21
|
+
*/
|
|
22
|
+
function initRouter (isAsync) {
|
|
23
|
+
const options = require('./async/config.async').default
|
|
24
|
+
formatRoutes(options.routes)
|
|
25
|
+
return options
|
|
26
|
+
}
|
|
27
|
+
export { loginIgnore, initRouter }
|
package/test/request.test.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import EncryptUtil from '@vue2-client/utils/EncryptUtil'
|
|
2
|
-
import { test, describe } from '@jest/globals'
|
|
3
|
-
|
|
4
|
-
describe('请求加密模块', () => {
|
|
5
|
-
const VALID_KEY = 'a964287a2cef8781ed76bd63dcadd578'
|
|
6
|
-
const TEST_PAYLOAD = {
|
|
7
|
-
username: 'admin',
|
|
8
|
-
password: 'P@ssw0rd_测试',
|
|
9
|
-
timestamp: Date.now()
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// CBC加密测试
|
|
13
|
-
test('应生成有效的加密字符串', () => {
|
|
14
|
-
const encrypted = EncryptUtil.AESEncryptCBC(TEST_PAYLOAD, VALID_KEY)
|
|
15
|
-
console.log(encrypted)
|
|
16
|
-
})
|
|
17
|
-
})
|
|
1
|
+
import EncryptUtil from '@vue2-client/utils/EncryptUtil'
|
|
2
|
+
import { test, describe } from '@jest/globals'
|
|
3
|
+
|
|
4
|
+
describe('请求加密模块', () => {
|
|
5
|
+
const VALID_KEY = 'a964287a2cef8781ed76bd63dcadd578'
|
|
6
|
+
const TEST_PAYLOAD = {
|
|
7
|
+
username: 'admin',
|
|
8
|
+
password: 'P@ssw0rd_测试',
|
|
9
|
+
timestamp: Date.now()
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// CBC加密测试
|
|
13
|
+
test('应生成有效的加密字符串', () => {
|
|
14
|
+
const encrypted = EncryptUtil.AESEncryptCBC(TEST_PAYLOAD, VALID_KEY)
|
|
15
|
+
console.log(encrypted)
|
|
16
|
+
})
|
|
17
|
+
})
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<x-collapse :query-params-name="openPrescriptionConfig" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import XCollapse from '@vue2-client/base-client/components/common/XCollapse/XCollapse.vue'
|
|
7
|
-
export default {
|
|
8
|
-
name: 'Demo',
|
|
9
|
-
components: { XCollapse }
|
|
10
|
-
}
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<style scoped>
|
|
14
|
-
|
|
15
|
-
</style>
|