vue2-client 1.22.22 → 1.22.23
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/.idea/.name +1 -0
- package/.idea/MarsCodeWorkspaceAppSettings.xml +8 -0
- package/.idea/gradle.xml +7 -0
- package/.idea/inspectionProfiles/Project_Default.xml +0 -5
- package/.idea/libraries/contour_plot.xml +9 -0
- package/.idea/material_theme_project_new.xml +18 -0
- package/.idea/misc.xml +84 -2
- package/package.json +1 -1
- package/src/utils/module-loader/VueSfcModuleCache.js +99 -99
- package/src/utils/module-loader/index.js +5 -5
package/.idea/.name
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
af-vue2-client
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
|
|
4
|
+
<option name="chatAppRouterInfo" value="chat" />
|
|
5
|
+
<option name="ckgOperationStatus" value="SUCCESS" />
|
|
6
|
+
<option name="progress" value="1.0" />
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/gradle.xml
ADDED
|
@@ -2,10 +2,5 @@
|
|
|
2
2
|
<profile version="1.0">
|
|
3
3
|
<option name="myName" value="Project Default" />
|
|
4
4
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
5
|
-
<inspection_tool class="ImplicitTypeConversion" enabled="true" level="WARNING" enabled_by_default="true">
|
|
6
|
-
<option name="BITS" value="1720" />
|
|
7
|
-
<option name="FLAG_EXPLICIT_CONVERSION" value="true" />
|
|
8
|
-
<option name="IGNORE_NODESET_TO_BOOLEAN_VIA_STRING" value="true" />
|
|
9
|
-
</inspection_tool>
|
|
10
5
|
</profile>
|
|
11
6
|
</component>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="MaterialThemeProjectNewConfig">
|
|
4
|
+
<option name="metadata">
|
|
5
|
+
<MTProjectMetadataState>
|
|
6
|
+
<option name="migrated" value="true" />
|
|
7
|
+
<option name="pristineConfig" value="false" />
|
|
8
|
+
<option name="userId" value="-1f970a2c:17cde818e34:-8000" />
|
|
9
|
+
<option name="version" value="8.6.4" />
|
|
10
|
+
</MTProjectMetadataState>
|
|
11
|
+
</option>
|
|
12
|
+
<option name="titleBarState">
|
|
13
|
+
<MTProjectTitleBarConfigState>
|
|
14
|
+
<option name="overrideColor" value="false" />
|
|
15
|
+
</MTProjectTitleBarConfigState>
|
|
16
|
+
</option>
|
|
17
|
+
</component>
|
|
18
|
+
</project>
|
package/.idea/misc.xml
CHANGED
|
@@ -1,6 +1,88 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
1
|
<project version="4">
|
|
3
|
-
<component name="
|
|
2
|
+
<component name="ProjectInspectionProfilesVisibleTreeState">
|
|
3
|
+
<entry key="Project Default">
|
|
4
|
+
<profile-state>
|
|
5
|
+
<expanded-state>
|
|
6
|
+
<State>
|
|
7
|
+
<id>EditorConfig</id>
|
|
8
|
+
</State>
|
|
9
|
+
<State>
|
|
10
|
+
<id>Gradle</id>
|
|
11
|
+
</State>
|
|
12
|
+
<State>
|
|
13
|
+
<id>Java</id>
|
|
14
|
+
</State>
|
|
15
|
+
<State>
|
|
16
|
+
<id>Java 21Java 语言级别迁移帮助Java</id>
|
|
17
|
+
</State>
|
|
18
|
+
<State>
|
|
19
|
+
<id>Java 5Java 语言级别迁移帮助Java</id>
|
|
20
|
+
</State>
|
|
21
|
+
<State>
|
|
22
|
+
<id>Java 语言级别迁移帮助Java</id>
|
|
23
|
+
</State>
|
|
24
|
+
<State>
|
|
25
|
+
<id>JavaScript 和 TypeScript</id>
|
|
26
|
+
</State>
|
|
27
|
+
<State>
|
|
28
|
+
<id>PostCSS</id>
|
|
29
|
+
</State>
|
|
30
|
+
<State>
|
|
31
|
+
<id>代码样式问题Java</id>
|
|
32
|
+
</State>
|
|
33
|
+
<State>
|
|
34
|
+
<id>代码样式问题JavaScript 和 TypeScript</id>
|
|
35
|
+
</State>
|
|
36
|
+
<State>
|
|
37
|
+
<id>可能的 bugGradle</id>
|
|
38
|
+
</State>
|
|
39
|
+
<State>
|
|
40
|
+
<id>可能的 bugJava</id>
|
|
41
|
+
</State>
|
|
42
|
+
<State>
|
|
43
|
+
<id>声明冗余Java</id>
|
|
44
|
+
</State>
|
|
45
|
+
<State>
|
|
46
|
+
<id>安全性</id>
|
|
47
|
+
</State>
|
|
48
|
+
<State>
|
|
49
|
+
<id>安全性Java</id>
|
|
50
|
+
</State>
|
|
51
|
+
<State>
|
|
52
|
+
<id>性能Java</id>
|
|
53
|
+
</State>
|
|
54
|
+
<State>
|
|
55
|
+
<id>抽象问题Java</id>
|
|
56
|
+
</State>
|
|
57
|
+
<State>
|
|
58
|
+
<id>控制流问题Java</id>
|
|
59
|
+
</State>
|
|
60
|
+
<State>
|
|
61
|
+
<id>最佳做法Gradle</id>
|
|
62
|
+
</State>
|
|
63
|
+
<State>
|
|
64
|
+
<id>有效性问题Gradle</id>
|
|
65
|
+
</State>
|
|
66
|
+
<State>
|
|
67
|
+
<id>样式Gradle</id>
|
|
68
|
+
</State>
|
|
69
|
+
<State>
|
|
70
|
+
<id>测试框架Java</id>
|
|
71
|
+
</State>
|
|
72
|
+
<State>
|
|
73
|
+
<id>线程问题Java</id>
|
|
74
|
+
</State>
|
|
75
|
+
<State>
|
|
76
|
+
<id>详细或冗余的代码结构Java</id>
|
|
77
|
+
</State>
|
|
78
|
+
<State>
|
|
79
|
+
<id>资源管理Java</id>
|
|
80
|
+
</State>
|
|
81
|
+
</expanded-state>
|
|
82
|
+
</profile-state>
|
|
83
|
+
</entry>
|
|
84
|
+
</component>
|
|
85
|
+
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
|
4
86
|
<output url="file://$PROJECT_DIR$/out" />
|
|
5
87
|
</component>
|
|
6
88
|
</project>
|
package/package.json
CHANGED
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Vue SFC Module Cache 单例
|
|
3
|
-
* 为 vue3-sfc-loader 提供统一的 moduleCache
|
|
4
|
-
*/
|
|
5
|
-
import Vue from 'vue'
|
|
6
|
-
import Vuex from 'vuex'
|
|
7
|
-
import CloudVueSfcComponent from '@vue2-client/base-client/components/VueSfcComponent/CloudVueSfcComponent.vue'
|
|
8
|
-
import Vue2ClientLoader from '@vue2-client/utils/module-loader/Vue2ClientModuleLoader'
|
|
9
|
-
|
|
10
|
-
class VueSfcModuleCache {
|
|
11
|
-
constructor() {
|
|
12
|
-
if (VueSfcModuleCache.instance) {
|
|
13
|
-
return VueSfcModuleCache.instance
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
this._cache = new Map()
|
|
17
|
-
this._cachedObject = null
|
|
18
|
-
this._initCache()
|
|
19
|
-
|
|
20
|
-
VueSfcModuleCache.instance = this
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* 初始化 moduleCache
|
|
25
|
-
*/
|
|
26
|
-
_initCache() {
|
|
27
|
-
this._cache.set('vue', Vue)
|
|
28
|
-
this._cache.set('vuex', Vuex)
|
|
29
|
-
this._cache.set('VueSfcModuleCache', this)
|
|
30
|
-
this._cache.set('CloudVueSfcComponent', CloudVueSfcComponent)
|
|
31
|
-
|
|
32
|
-
// 注入所有已缓存的 @vue2-client 组件
|
|
33
|
-
const vue2ClientComponents = Vue2ClientLoader.getAllComponents()
|
|
34
|
-
vue2ClientComponents.forEach((component, path) => {
|
|
35
|
-
this._cache.set(path, component)
|
|
36
|
-
})
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 获取缓存的模块
|
|
41
|
-
* @param {string} key - 模块路径或名称
|
|
42
|
-
* @returns {*}
|
|
43
|
-
*/
|
|
44
|
-
get(key) {
|
|
45
|
-
return this._cache.get(key)
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* 设置缓存的模块
|
|
50
|
-
* @param {string} key - 模块路径或名称
|
|
51
|
-
* @param {*} value - 模块值
|
|
52
|
-
*/
|
|
53
|
-
set(key, value) {
|
|
54
|
-
this._cache.set(key, value)
|
|
55
|
-
this._cachedObject = null
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* 检查模块是否已缓存
|
|
60
|
-
* @param {string} key - 模块路径或名称
|
|
61
|
-
* @returns {boolean}
|
|
62
|
-
*/
|
|
63
|
-
has(key) {
|
|
64
|
-
return this._cache.has(key)
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* 获取所有已缓存的模块(Map 格式)
|
|
69
|
-
* @returns {Map}
|
|
70
|
-
*/
|
|
71
|
-
getAll() {
|
|
72
|
-
return new Map(this._cache)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 获取所有已缓存的模块(普通对象格式,供 vue3-sfc-loader 使用)
|
|
77
|
-
* @returns {Object}
|
|
78
|
-
*/
|
|
79
|
-
toObject() {
|
|
80
|
-
if (!this._cachedObject) {
|
|
81
|
-
this._cachedObject = Object.fromEntries(this._cache)
|
|
82
|
-
}
|
|
83
|
-
return this._cachedObject
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* 重置缓存
|
|
88
|
-
*/
|
|
89
|
-
reset() {
|
|
90
|
-
this._cache.clear()
|
|
91
|
-
this._cachedObject = null
|
|
92
|
-
this._initCache()
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
// 创建单例
|
|
97
|
-
const vueSfcModuleCache = new VueSfcModuleCache()
|
|
98
|
-
|
|
99
|
-
export default vueSfcModuleCache
|
|
1
|
+
/**
|
|
2
|
+
* Vue SFC Module Cache 单例
|
|
3
|
+
* 为 vue3-sfc-loader 提供统一的 moduleCache
|
|
4
|
+
*/
|
|
5
|
+
import Vue from 'vue'
|
|
6
|
+
import Vuex from 'vuex'
|
|
7
|
+
import CloudVueSfcComponent from '@vue2-client/base-client/components/VueSfcComponent/CloudVueSfcComponent.vue'
|
|
8
|
+
import Vue2ClientLoader from '@vue2-client/utils/module-loader/Vue2ClientModuleLoader'
|
|
9
|
+
|
|
10
|
+
class VueSfcModuleCache {
|
|
11
|
+
constructor() {
|
|
12
|
+
if (VueSfcModuleCache.instance) {
|
|
13
|
+
return VueSfcModuleCache.instance
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
this._cache = new Map()
|
|
17
|
+
this._cachedObject = null
|
|
18
|
+
this._initCache()
|
|
19
|
+
|
|
20
|
+
VueSfcModuleCache.instance = this
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 初始化 moduleCache
|
|
25
|
+
*/
|
|
26
|
+
_initCache() {
|
|
27
|
+
this._cache.set('vue', Vue)
|
|
28
|
+
this._cache.set('vuex', Vuex)
|
|
29
|
+
this._cache.set('VueSfcModuleCache', this)
|
|
30
|
+
this._cache.set('CloudVueSfcComponent', CloudVueSfcComponent)
|
|
31
|
+
|
|
32
|
+
// 注入所有已缓存的 @vue2-client 组件
|
|
33
|
+
const vue2ClientComponents = Vue2ClientLoader.getAllComponents()
|
|
34
|
+
vue2ClientComponents.forEach((component, path) => {
|
|
35
|
+
this._cache.set(path, component)
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 获取缓存的模块
|
|
41
|
+
* @param {string} key - 模块路径或名称
|
|
42
|
+
* @returns {*}
|
|
43
|
+
*/
|
|
44
|
+
get(key) {
|
|
45
|
+
return this._cache.get(key)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 设置缓存的模块
|
|
50
|
+
* @param {string} key - 模块路径或名称
|
|
51
|
+
* @param {*} value - 模块值
|
|
52
|
+
*/
|
|
53
|
+
set(key, value) {
|
|
54
|
+
this._cache.set(key, value)
|
|
55
|
+
this._cachedObject = null
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* 检查模块是否已缓存
|
|
60
|
+
* @param {string} key - 模块路径或名称
|
|
61
|
+
* @returns {boolean}
|
|
62
|
+
*/
|
|
63
|
+
has(key) {
|
|
64
|
+
return this._cache.has(key)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* 获取所有已缓存的模块(Map 格式)
|
|
69
|
+
* @returns {Map}
|
|
70
|
+
*/
|
|
71
|
+
getAll() {
|
|
72
|
+
return new Map(this._cache)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* 获取所有已缓存的模块(普通对象格式,供 vue3-sfc-loader 使用)
|
|
77
|
+
* @returns {Object}
|
|
78
|
+
*/
|
|
79
|
+
toObject() {
|
|
80
|
+
if (!this._cachedObject) {
|
|
81
|
+
this._cachedObject = Object.fromEntries(this._cache)
|
|
82
|
+
}
|
|
83
|
+
return this._cachedObject
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 重置缓存
|
|
88
|
+
*/
|
|
89
|
+
reset() {
|
|
90
|
+
this._cache.clear()
|
|
91
|
+
this._cachedObject = null
|
|
92
|
+
this._initCache()
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// 创建单例
|
|
97
|
+
const vueSfcModuleCache = new VueSfcModuleCache()
|
|
98
|
+
|
|
99
|
+
export default vueSfcModuleCache
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* module-loader 模块统一导出
|
|
3
|
-
*/
|
|
4
|
-
export { default as Vue2ClientLoader } from './Vue2ClientModuleLoader'
|
|
5
|
-
export { default as VueSfcModuleCache } from './VueSfcModuleCache'
|
|
1
|
+
/**
|
|
2
|
+
* module-loader 模块统一导出
|
|
3
|
+
*/
|
|
4
|
+
export { default as Vue2ClientLoader } from './Vue2ClientModuleLoader'
|
|
5
|
+
export { default as VueSfcModuleCache } from './VueSfcModuleCache'
|