@truenewx/tnxvue3 3.0.11 → 3.0.12
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/index.html
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>tnxvue3</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="app"></div>
|
|
10
|
+
<script type="module" src="./sample/main.js"></script>
|
|
11
|
+
</body>
|
|
12
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truenewx/tnxvue3",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.12",
|
|
4
4
|
"description": "互联网技术解决方案:Vue3扩展支持",
|
|
5
5
|
"private": false,
|
|
6
|
-
"
|
|
7
|
-
"access": "public"
|
|
8
|
-
},
|
|
6
|
+
"type": "module",
|
|
9
7
|
"main": "src/tnxvue.js",
|
|
10
8
|
"keywords": [
|
|
11
9
|
"truenewx",
|
|
@@ -15,8 +13,9 @@
|
|
|
15
13
|
"author": "truenewx",
|
|
16
14
|
"license": "Apache-2.0",
|
|
17
15
|
"scripts": {
|
|
18
|
-
"
|
|
19
|
-
"build": "
|
|
16
|
+
"dev": "vite",
|
|
17
|
+
"build": "vite build",
|
|
18
|
+
"preview": "vite preview"
|
|
20
19
|
},
|
|
21
20
|
"peerDependencies": {
|
|
22
21
|
"element-plus": "~2.8.0",
|
|
@@ -25,22 +24,16 @@
|
|
|
25
24
|
"vue-router": "~4.4.0"
|
|
26
25
|
},
|
|
27
26
|
"dependencies": {
|
|
28
|
-
"@truenewx/tnxcore": "3.0.
|
|
27
|
+
"@truenewx/tnxcore": "3.0.10",
|
|
29
28
|
"@element-plus/icons-vue": "2.3.1",
|
|
30
29
|
"async-validator": "4.2.5",
|
|
31
30
|
"mitt": "3.0.1"
|
|
32
31
|
},
|
|
33
32
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"@babel/preset-env": "7.22.5",
|
|
37
|
-
"@vue/cli-plugin-babel": "5.0.8",
|
|
38
|
-
"@vue/cli-plugin-eslint": "5.0.8",
|
|
39
|
-
"@vue/cli-service": "5.0.8",
|
|
33
|
+
"@vitejs/plugin-vue": "5.2.1",
|
|
34
|
+
"vite": "6.2.0",
|
|
40
35
|
"eslint": "7.32.0",
|
|
41
|
-
"eslint-plugin-vue": "8.7.1"
|
|
42
|
-
"copy-webpack-plugin": "11.0.0",
|
|
43
|
-
"terser-webpack-plugin": "5.3.7"
|
|
36
|
+
"eslint-plugin-vue": "8.7.1"
|
|
44
37
|
},
|
|
45
38
|
"eslintConfig": {
|
|
46
39
|
"root": true,
|
|
@@ -51,9 +44,6 @@
|
|
|
51
44
|
"plugin:vue/vue3-essential",
|
|
52
45
|
"eslint:recommended"
|
|
53
46
|
],
|
|
54
|
-
"parserOptions": {
|
|
55
|
-
"parser": "@babel/eslint-parser"
|
|
56
|
-
},
|
|
57
47
|
"rules": {
|
|
58
48
|
"eqeqeq": "warn",
|
|
59
49
|
"no-unused-vars": [
|
|
@@ -103,7 +103,7 @@ export default {
|
|
|
103
103
|
return height;
|
|
104
104
|
},
|
|
105
105
|
downloadUrl() {
|
|
106
|
-
let baseUrl =
|
|
106
|
+
let baseUrl = window.tnx.app.rpc.getDefaultBaseUrl();
|
|
107
107
|
if (this.app) {
|
|
108
108
|
baseUrl = window.tnx.app.rpc.getBaseUrl(this.app);
|
|
109
109
|
}
|
package/src/tnxvue-cli.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// tnxvue-cli.js
|
|
2
|
-
const TerserPlugin = require('terser-webpack-plugin');
|
|
3
|
-
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
4
|
-
|
|
5
|
-
module.exports = {
|
|
6
|
-
uglify(config, options) {
|
|
7
|
-
Object.assign(config, {
|
|
8
|
-
optimization: {
|
|
9
|
-
minimizer: [new TerserPlugin({
|
|
10
|
-
terserOptions: Object.assign({
|
|
11
|
-
compress: {
|
|
12
|
-
warnings: false,
|
|
13
|
-
drop_console: false,
|
|
14
|
-
drop_debugger: true,
|
|
15
|
-
}
|
|
16
|
-
}, options)
|
|
17
|
-
})]
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
},
|
|
21
|
-
copy(config, dependencies, libs, patterns) {
|
|
22
|
-
let pluginPatterns = [];
|
|
23
|
-
for (let lib of libs) {
|
|
24
|
-
let from = lib.path;
|
|
25
|
-
let to = 'libs/js/' + lib.name;
|
|
26
|
-
if (config.mode === 'production') {
|
|
27
|
-
let version = dependencies[lib.name];
|
|
28
|
-
if (version) {
|
|
29
|
-
to += '-' + version;
|
|
30
|
-
}
|
|
31
|
-
from += lib.prod;
|
|
32
|
-
to += lib.prod;
|
|
33
|
-
}
|
|
34
|
-
if (!from.endsWith('/')) {
|
|
35
|
-
from += '.js';
|
|
36
|
-
}
|
|
37
|
-
if (!to.endsWith('/')) {
|
|
38
|
-
to += '.js';
|
|
39
|
-
}
|
|
40
|
-
pluginPatterns.push({
|
|
41
|
-
from: './node_modules/' + from,
|
|
42
|
-
to: './' + to,
|
|
43
|
-
});
|
|
44
|
-
let globalVarName = config.externals[lib.name];
|
|
45
|
-
if (globalVarName) {
|
|
46
|
-
let baseUrl = process.env.VUE_APP_VIEW_BASE_URL;
|
|
47
|
-
if (!baseUrl.endsWith('/')) {
|
|
48
|
-
baseUrl += '/';
|
|
49
|
-
}
|
|
50
|
-
process.env['VUE_APP_LIBS_' + globalVarName] = baseUrl + to;
|
|
51
|
-
}
|
|
52
|
-
if (lib.map) {
|
|
53
|
-
pluginPatterns.push({
|
|
54
|
-
from: './node_modules/' + lib.path + lib.map,
|
|
55
|
-
to: './libs/js/',
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (patterns && patterns.length) {
|
|
60
|
-
pluginPatterns = pluginPatterns.concat(patterns);
|
|
61
|
-
}
|
|
62
|
-
config.plugins.push(new CopyWebpackPlugin({patterns: pluginPatterns}));
|
|
63
|
-
},
|
|
64
|
-
}
|