general-basic-form 2.0.2 → 2.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/dist/index.mjs +452 -0
- package/dist/index.umd.js +1 -0
- package/dist/style.css +1 -0
- package/package.json +17 -5
- package/README.assets/image-20210820173738506.png +0 -0
- package/script/link.ts +0 -34
- package/script/unlink.ts +0 -42
- package/src/GeneralBasicForm.vue +0 -234
- package/src/assets/image-20210820173037871.png +0 -0
- package/src/assets/logo.png +0 -0
- package/src/components/VBasic/divider/index.vue +0 -52
- package/src/components/VBasic/input/index.vue +0 -67
- package/src/components/VBasic/input-graphic-verification/index.vue +0 -56
- package/src/components/VBasic/input-mobile-verification/index.vue +0 -31
- package/src/components/VBasic/input-mobile-verification/verification-button.vue +0 -64
- package/src/components/VBasic/input-number/index.vue +0 -30
- package/src/components/setting.ts +0 -15
- package/src/index.ts +0 -15
- package/src/types/basicFrom.ts +0 -48
- package/src/types/componentsProps.ts +0 -17
- package/tsconfig.json +0 -14
- package/vite.config.js +0 -123
- /package/{public → dist}/index.d.ts +0 -0
package/vite.config.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import legacy from '@vitejs/plugin-legacy'
|
|
2
|
-
import { fileURLToPath } from 'url'
|
|
3
|
-
import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite'
|
|
4
|
-
import vue from '@vitejs/plugin-vue'
|
|
5
|
-
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
6
|
-
import { ViteImageOptimizer } from 'vite-plugin-image-optimizer';
|
|
7
|
-
import path from 'path';
|
|
8
|
-
const __filenameNew = fileURLToPath(import.meta.url)
|
|
9
|
-
const __dirnameNew = path.dirname(__filenameNew)
|
|
10
|
-
const resolve = (dir) => path.resolve(__dirnameNew, dir);
|
|
11
|
-
// https://vitejs.dev/config/
|
|
12
|
-
export default defineConfig(({ command, mode }) => {
|
|
13
|
-
// 根据当前工作目录中的 `mode` 加载 .env 文件
|
|
14
|
-
// 设置第三个参数为 '' 来加载所有环境变量,而不管是否有 `VITE_` 前缀。
|
|
15
|
-
const env = loadEnv(mode, process.cwd(), '')
|
|
16
|
-
// console.log(command)
|
|
17
|
-
// console.log(env)
|
|
18
|
-
// console.log(env.CURRENT_ENV)
|
|
19
|
-
// console.log(env.APP_ENV)
|
|
20
|
-
// console.log(env.VUE_APP_BASE_API)
|
|
21
|
-
return {
|
|
22
|
-
// vite环境变量配置
|
|
23
|
-
define: {
|
|
24
|
-
"CURRENT_ENV": JSON.stringify(env.CURRENT_ENV),
|
|
25
|
-
},
|
|
26
|
-
server: {
|
|
27
|
-
open: true,
|
|
28
|
-
},
|
|
29
|
-
resolve: {
|
|
30
|
-
alias: {
|
|
31
|
-
'@': resolve('src'),//路径化名
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue'],
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
plugins: [
|
|
38
|
-
/**
|
|
39
|
-
* @description: vite自带的文件分割配置
|
|
40
|
-
* @return {*}
|
|
41
|
-
*/
|
|
42
|
-
{
|
|
43
|
-
...splitVendorChunkPlugin(),
|
|
44
|
-
apply: 'build',
|
|
45
|
-
},
|
|
46
|
-
/**
|
|
47
|
-
* @description: 图片压缩插件
|
|
48
|
-
* @return {*}
|
|
49
|
-
*/
|
|
50
|
-
{
|
|
51
|
-
...ViteImageOptimizer({
|
|
52
|
-
/* pass your config */
|
|
53
|
-
}),
|
|
54
|
-
// enforce: 'pre',
|
|
55
|
-
apply: 'build',
|
|
56
|
-
},
|
|
57
|
-
/**
|
|
58
|
-
* @description: 兼容旧版本浏览器
|
|
59
|
-
* @return {*}
|
|
60
|
-
*/
|
|
61
|
-
{
|
|
62
|
-
...legacy({
|
|
63
|
-
targets: ['defaults'],
|
|
64
|
-
}),
|
|
65
|
-
apply: 'build',
|
|
66
|
-
},
|
|
67
|
-
vue(),
|
|
68
|
-
vueJsx(),
|
|
69
|
-
],
|
|
70
|
-
css: {
|
|
71
|
-
preprocessorOptions: {
|
|
72
|
-
less: {
|
|
73
|
-
// 支持内联 JavaScript
|
|
74
|
-
javascriptEnabled: true,
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
},
|
|
78
|
-
/**
|
|
79
|
-
* @description: 打包时才调用
|
|
80
|
-
* @return {*}
|
|
81
|
-
*/
|
|
82
|
-
build: {
|
|
83
|
-
lib: {
|
|
84
|
-
// Could also be a dictionary or array of multiple entry points
|
|
85
|
-
// 添加打包入口文件夹
|
|
86
|
-
entry: resolve(`${__dirnameNew}/src`, 'index.ts'),
|
|
87
|
-
// formats: ['es', 'cjs', 'umd', 'iife'],
|
|
88
|
-
name: 'Index',
|
|
89
|
-
// the proper extensions will be added
|
|
90
|
-
// fileName: (format) => `index.${format}.js`,
|
|
91
|
-
fileName: "index",
|
|
92
|
-
},
|
|
93
|
-
rollupOptions: {
|
|
94
|
-
// 确保外部化处理那些你不想打包进库的依赖
|
|
95
|
-
external: ['vue', 'vue-router', "element-plus"],
|
|
96
|
-
output: {
|
|
97
|
-
// 在 UMD 构建模式下为这些外部化的依赖提供一个全局变量
|
|
98
|
-
globals: {
|
|
99
|
-
vue: 'Vue',
|
|
100
|
-
'vue-router': 'vue-router',
|
|
101
|
-
"element-plus": "element-plus",
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
// minify: 'terser',
|
|
106
|
-
//打包环境移除console.log,debugger
|
|
107
|
-
// terserOptions: {
|
|
108
|
-
// compress: {
|
|
109
|
-
// drop_console: true,
|
|
110
|
-
// drop_debugger: true,
|
|
111
|
-
// },
|
|
112
|
-
// },
|
|
113
|
-
//打包文件按照类型分文件夹显示(貌似会导致性能下降)
|
|
114
|
-
// rollupOptions: {
|
|
115
|
-
// output: {
|
|
116
|
-
// chunkFileNames: 'js/[name]-chunk-[hash:7].js',
|
|
117
|
-
// entryFileNames: 'js/[name]-app-[hash:7].js',
|
|
118
|
-
// assetFileNames: '[ext]/[name]-chunk-[hash:7].[ext]',
|
|
119
|
-
// },
|
|
120
|
-
// },
|
|
121
|
-
},
|
|
122
|
-
}
|
|
123
|
-
})
|
|
File without changes
|