vue2-client 1.11.6 → 1.12.2
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/.babelrc +3 -0
- package/babel.config.js +18 -21
- package/jest.config.js +22 -21
- package/package.json +5 -4
- package/src/base-client/components/common/XDescriptions/XDescriptionsGroup.vue +314 -314
- package/src/base-client/components/common/XDescriptions/demo.vue +51 -51
- package/src/base-client/components/common/XFormGroup/demo.vue +39 -39
- package/src/expression/ExpressionRunner.js +26 -0
- package/src/expression/TestExpression.js +509 -0
- package/src/expression/core/Delegate.js +115 -0
- package/src/expression/core/Expression.js +1358 -0
- package/src/expression/core/Program.js +932 -0
- package/src/expression/core/Token.js +27 -0
- package/src/expression/enums/ExpressionType.js +81 -0
- package/src/expression/enums/TokenType.js +11 -0
- package/src/expression/exception/ExpressionException.js +28 -0
- package/src/expression/exception/ReturnWayException.js +14 -0
- package/src/expression/exception/ServiceException.js +22 -0
- package/src/expression/instances/LogicConsole.js +44 -0
- package/src/expression/{core → ts/core}/Expression.ts +17 -3
- package/src/expression/ts/exception/BreakWayException.ts +2 -0
- package/src/expression/ts/exception/ContinueWayException.ts +2 -0
- package/src/layouts/BlankView.vue +4 -2
- package/src/logic/LogicRunner.js +62 -0
- package/src/logic/TestLogic.js +13 -0
- package/src/logic/plugins/common/DateTools.js +32 -0
- package/src/logic/plugins/index.js +5 -0
- package/src/logic/ts/LogicRunner.ts +67 -0
- package/src/logic/ts/TestLogic.ts +13 -0
- package/src/pages/LogicCallExample/index.vue +36 -0
- package/src/router/async/router.map.js +1 -0
- package/src/services/apiService.js +2 -1
- package/src/services/user.js +92 -90
- package/src/store/mutation-types.js +1 -0
- package/src/utils/EncryptUtil.js +23 -0
- package/src/utils/request.js +381 -362
- package/test/Amis.spec.js +1 -0
- package/test/Tree.spec.js +1 -0
- package/test/myDialog.spec.js +1 -0
- package/test/request.test.js +17 -0
- package/test/util.test.js +1 -0
- package/test/v3Api.test.js +2 -1
- package/tests/unit/ReportTable.spec.js +1 -0
- /package/src/expression/exception/{BreakWayException.ts → BreakWayException.js} +0 -0
- /package/src/expression/exception/{ContinueWayException.ts → ContinueWayException.js} +0 -0
- /package/src/expression/{ExpressionRunner.ts → ts/ExpressionRunner.ts} +0 -0
- /package/src/expression/{TestExpression.ts → ts/TestExpression.ts} +0 -0
- /package/src/expression/{core → ts/core}/Delegate.ts +0 -0
- /package/src/expression/{core → ts/core}/Program.ts +0 -0
- /package/src/expression/{core → ts/core}/Token.ts +0 -0
- /package/src/expression/{enums → ts/enums}/ExpressionType.ts +0 -0
- /package/src/expression/{enums → ts/enums}/TokenType.ts +0 -0
- /package/src/expression/{exception → ts/exception}/ExpressionException.ts +0 -0
- /package/src/expression/{exception → ts/exception}/ReturnWayException.ts +0 -0
- /package/src/expression/{exception → ts/exception}/ServiceException.ts +0 -0
- /package/src/expression/{instances → ts/instances}/JSONArray.ts +0 -0
- /package/src/expression/{instances → ts/instances}/JSONObject.ts +0 -0
- /package/src/expression/{instances → ts/instances}/LogicConsole.ts +0 -0
package/test/Amis.spec.js
CHANGED
package/test/Tree.spec.js
CHANGED
|
@@ -3,6 +3,7 @@ import { shallowMount, mount } from '@vue/test-utils'
|
|
|
3
3
|
|
|
4
4
|
import TreeComponent from '@vue2-client/base-client/components/common/Tree'
|
|
5
5
|
import * as CommonApi from '@vue2-client/services/api/common'
|
|
6
|
+
import { afterEach, beforeEach, describe, expect, it, jest } from '@jest/globals'
|
|
6
7
|
|
|
7
8
|
function handleLogic (logicName, parameters) {
|
|
8
9
|
// 使用 switch 语句来处理多种业务逻辑
|
package/test/myDialog.spec.js
CHANGED
|
@@ -2,6 +2,7 @@ import { createLocalVue, mount } from '@vue/test-utils'
|
|
|
2
2
|
import MyConfirm from '@vue2-client/base-client/components/common/XBadge'
|
|
3
3
|
import Plugins from '@vue2-client/base-client/plugins'
|
|
4
4
|
import Antd from 'ant-design-vue'
|
|
5
|
+
import { it, describe, expect, beforeAll, jest } from '@jest/globals'
|
|
5
6
|
|
|
6
7
|
const localVue = createLocalVue()
|
|
7
8
|
|
|
@@ -0,0 +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
|
+
})
|
package/test/util.test.js
CHANGED
package/test/v3Api.test.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* eslint-env jest */
|
|
2
2
|
import { searchToListOption } from '@vue2-client/services/v3Api'
|
|
3
|
-
import mockjs from 'mockjs'
|
|
3
|
+
import mockjs from 'mockjs'
|
|
4
|
+
import { describe, it, jest } from '@jest/globals' // Correct way to import mockjs
|
|
4
5
|
|
|
5
6
|
jest.mock('@vue2-client/utils/request', () => ({
|
|
6
7
|
request: jest.fn(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { mount } from '@vue/test-utils'
|
|
2
2
|
import ReportTable from '@vue2-client/pages/report/ReportTable'
|
|
3
3
|
import { reportData } from '@vue2-client/mock/common/reportData'
|
|
4
|
+
import { describe, expect, it } from '@jest/globals'
|
|
4
5
|
|
|
5
6
|
// 报表组件测试域
|
|
6
7
|
describe('ReportTable', () => {
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|