emacroh5lib 1.0.1 → 1.0.4
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/README.md +3 -2
- package/package.json +13 -5
- package/src/components/HelloWorld.vue +3 -3
- package/src/components/MessageBox.jsx +1 -0
- package/src/components/MessageBoxTest.tsx +11 -0
- package/src/index.ts +34 -12
- package/src/main.ts +3 -1
- package/src/router/index.ts +8 -3
- package/src/shims-vue.d.ts +2 -2
- package/src/utilities/File.ts +6 -2
- package/src/views/DragResizeView/index.vue +3 -0
- package/src/views/DragResizeView/vue-drag-resize.css +46 -0
- package/src/views/DragResizeView/vue-drag-resize.html +17 -0
- package/src/views/DragResizeView/vue-drag-resize.js +868 -0
- package/src/views/{File → ExcelExporter}/index.less +1 -0
- package/src/views/{File → ExcelExporter}/index.vue +24 -24
- package/src/views/FileViewer/index.less +16 -0
- package/src/views/FileViewer/index.vue +78 -0
- package/src/views/HomeView.vue +2 -0
- package/src/views/ImageViewer/index.vue +505 -0
- package/src/views/ImageViewer/style/css/index.css +186 -0
- package/src/views/ImageViewer/style/css/index.less +212 -0
- package/src/views/ImageViewer/style/images/icons.png +0 -0
- package/src/views/TestView/Export2Excel.ts +496 -0
- package/src/views/TestView/index.less +25 -0
- package/src/views/TestView/index.vue +231 -0
- package/src/views/TestView/list.json +12007 -0
- package/src/vue-prototype.d.ts +7 -0
- package/tsconfig.json +3 -2
- package/typings.d.ts +1 -1
- package/webpack.config.js +28 -2
package/tsconfig.json
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
"declarationDir": "./dist/types/", // 声明文件打包的位置
|
11
11
|
"declarationMap": false, // 是否生成声明文件map文件(便于调试)
|
12
12
|
"moduleResolution": "node",
|
13
|
-
"module": "
|
13
|
+
"module": "commonjs",
|
14
14
|
"target": "es5", // 转化成的目标语言
|
15
15
|
"baseUrl": "./",
|
16
16
|
"strict": true,
|
@@ -33,6 +33,7 @@
|
|
33
33
|
]
|
34
34
|
},
|
35
35
|
"typeRoots": [
|
36
|
+
"/@types",
|
36
37
|
"./node_modules/@types"
|
37
38
|
],
|
38
39
|
"lib": [
|
@@ -51,7 +52,7 @@
|
|
51
52
|
"src/**/*.vue",
|
52
53
|
"tests/**/*.ts",
|
53
54
|
"tests/**/*.tsx"
|
54
|
-
], // 要打包的文件
|
55
|
+
, "src/components/MessageBox.tsx" ], // 要打包的文件
|
55
56
|
"exclude": [
|
56
57
|
"node_modules",
|
57
58
|
"*.test.ts"
|
package/typings.d.ts
CHANGED
package/webpack.config.js
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
const path = require("path");
|
4
4
|
// const HtmlWebpackPlugin = require("html-webpack-plugin");
|
5
5
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
6
|
+
const VueLoaderPlugin = require('vue-loader/lib/plugin')
|
7
|
+
|
6
8
|
const webpack = require('webpack');
|
7
9
|
|
8
10
|
const isProduction = process.env.NODE_ENV == "production";
|
@@ -22,6 +24,7 @@ const config = {
|
|
22
24
|
},
|
23
25
|
output: {
|
24
26
|
filename: 'emacroh5lib.min.js',
|
27
|
+
// publicPath: process.env.NODE_ENV === "development" ? "/" : "/emacroh5lib/",
|
25
28
|
path: path.resolve(__dirname, "dist"),
|
26
29
|
library: {
|
27
30
|
// do not specify a `name` here
|
@@ -32,6 +35,9 @@ const config = {
|
|
32
35
|
open: true,
|
33
36
|
host: "localhost",
|
34
37
|
},
|
38
|
+
externals: {
|
39
|
+
'./cptable': 'var cptable'
|
40
|
+
},
|
35
41
|
plugins: [
|
36
42
|
// new HtmlWebpackPlugin({
|
37
43
|
// template: "index.html",
|
@@ -48,9 +54,24 @@ const config = {
|
|
48
54
|
],
|
49
55
|
module: {
|
50
56
|
rules: [
|
57
|
+
{
|
58
|
+
test: /\.(vue)$/,
|
59
|
+
use: [
|
60
|
+
{
|
61
|
+
loader: 'vue-loader',
|
62
|
+
options: {
|
63
|
+
esModule: false
|
64
|
+
}
|
65
|
+
}
|
66
|
+
]
|
67
|
+
},
|
51
68
|
{
|
52
69
|
test: /\.(ts|tsx)$/i,
|
53
70
|
loader: "ts-loader",
|
71
|
+
options: {
|
72
|
+
appendTsSuffixTo: [/\.(vue)$/],
|
73
|
+
transpileOnly: true //只进行语法转换, 不进行类型校验, 提高构建速度
|
74
|
+
},
|
54
75
|
exclude: ["/node_modules/"],
|
55
76
|
},
|
56
77
|
{
|
@@ -62,7 +83,7 @@ const config = {
|
|
62
83
|
use: [stylesHandler, "css-loader", "postcss-loader"],
|
63
84
|
},
|
64
85
|
{
|
65
|
-
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
|
86
|
+
test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif|ico)$/i,
|
66
87
|
type: "asset/inline"
|
67
88
|
},
|
68
89
|
|
@@ -75,7 +96,11 @@ const config = {
|
|
75
96
|
alias: {
|
76
97
|
'@': resolve('src')
|
77
98
|
},
|
78
|
-
|
99
|
+
fallback: {
|
100
|
+
crypto: false,
|
101
|
+
fs: false
|
102
|
+
},
|
103
|
+
extensions: ['.js', '.jsx', '.ts', '.tsx', '.vue', '.json'],
|
79
104
|
}
|
80
105
|
};
|
81
106
|
|
@@ -84,6 +109,7 @@ module.exports = () => {
|
|
84
109
|
config.mode = "production";
|
85
110
|
|
86
111
|
config.plugins.push(new MiniCssExtractPlugin());
|
112
|
+
config.plugins.push(new VueLoaderPlugin());
|
87
113
|
} else {
|
88
114
|
config.mode = "development";
|
89
115
|
}
|