dpzvc-ui 1.1.0 → 1.2.1

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.
Files changed (64) hide show
  1. package/README.md +102 -18
  2. package/build-style.js +56 -5
  3. package/dist/dpzvc.esm.js +15572 -0
  4. package/dist/dpzvc.esm.js.map +1 -0
  5. package/dist/dpzvc.esm.min.js +2 -0
  6. package/dist/dpzvc.esm.min.js.map +1 -0
  7. package/dist/dpzvc.js +87 -18
  8. package/dist/dpzvc.js.map +1 -1
  9. package/dist/dpzvc.min.js +1 -1
  10. package/dist/dpzvc.min.js.map +1 -1
  11. package/dist/styles/base/font.css +1 -0
  12. package/dist/styles/base/reset.css +1 -0
  13. package/dist/styles/base/variable.css +0 -0
  14. package/dist/styles/components/actionSheet.css +1 -0
  15. package/dist/styles/components/badge.css +1 -0
  16. package/dist/styles/components/button.css +1 -0
  17. package/dist/styles/components/card.css +1 -0
  18. package/dist/styles/components/cell-swipe.css +1 -0
  19. package/dist/styles/components/cell.css +1 -0
  20. package/dist/styles/components/checkBox.css +1 -0
  21. package/dist/styles/components/editor.css +1 -0
  22. package/dist/styles/components/header.css +1 -0
  23. package/dist/styles/components/indicator.css +1 -0
  24. package/dist/styles/components/loadmore.css +1 -0
  25. package/dist/styles/components/message.css +1 -0
  26. package/dist/styles/components/modal.css +1 -0
  27. package/dist/styles/components/number.css +1 -0
  28. package/dist/styles/components/picker.css +1 -0
  29. package/dist/styles/components/popup.css +1 -0
  30. package/dist/styles/components/progress.css +1 -0
  31. package/dist/styles/components/prompt.css +1 -0
  32. package/dist/styles/components/radioBox.css +1 -0
  33. package/dist/styles/components/slide-Bar.css +1 -0
  34. package/dist/styles/components/spinner.css +1 -0
  35. package/dist/styles/components/swipe.css +1 -0
  36. package/dist/styles/components/switchBar.css +1 -0
  37. package/dist/styles/components/tab.css +1 -0
  38. package/dist/styles/components/text.css +1 -0
  39. package/dist/styles/components/toTop.css +1 -0
  40. package/dist/styles/components/upload.css +1 -0
  41. package/dist/styles/utils/1px.css +1 -0
  42. package/dist/styles/utils/animation.css +1 -0
  43. package/dist/styles/utils/nowrap.css +1 -0
  44. package/package.json +3 -1
  45. package/src/index.js +113 -48
  46. package/src/styles/base/reset.less +77 -11
  47. package/src/styles/components/badge.less +2 -0
  48. package/src/styles/components/button.less +1 -0
  49. package/src/styles/components/checkBox.less +2 -0
  50. package/src/styles/components/header.less +2 -0
  51. package/src/styles/components/indicator.less +2 -0
  52. package/src/styles/components/modal.less +2 -0
  53. package/src/styles/components/number.less +2 -0
  54. package/src/styles/components/picker.less +2 -0
  55. package/src/styles/components/progress.less +2 -0
  56. package/src/styles/components/radioBox.less +2 -0
  57. package/src/styles/components/slide-Bar.less +2 -0
  58. package/src/styles/components/spinner.less +1 -0
  59. package/src/styles/components/tab.less +2 -0
  60. package/src/styles/components/text.less +2 -0
  61. package/src/styles/components/toTop.less +2 -0
  62. package/src/styles/utils/1px.less +2 -0
  63. package/webpack.dist.dev.config.js +37 -7
  64. package/webpack.dist.prod.config.js +52 -22
@@ -8,6 +8,8 @@
8
8
  // }
9
9
  // }
10
10
  //}
11
+ @import "../base/variable.less";
12
+
11
13
  .dpzvc-radioBoxGroup.dpzvc-radioBoxGroup-vertical .dpzvc-radiobox {
12
14
  margin-right: 0;
13
15
  margin-bottom: 8px;
@@ -1,3 +1,5 @@
1
+ @import "../base/variable.less";
2
+
1
3
  .dpzvc-slideBar {
2
4
  border-top-color: @SlideBarBgColor;
3
5
  border-bottom-color: @SlideBarBgColor;
@@ -1,3 +1,4 @@
1
+ @import "../base/variable.less";
1
2
  // spinner.less - 完整可用版本(无 unit()/round(),可直接编译)
2
3
  @SpinnerSize: 28px;
3
4
  @SpinnerColor: #ccc;
@@ -1,3 +1,5 @@
1
+ @import "../base/variable.less";
2
+
1
3
  .dpzvc-tab {
2
4
  background: @TabBgColor;
3
5
  position: absolute;
@@ -1,3 +1,5 @@
1
+ @import "../base/variable.less";
2
+
1
3
  .dpzvc-textBar {
2
4
 
3
5
  background: #ffffff;
@@ -1,3 +1,5 @@
1
+ @import "../base/variable.less";
2
+
1
3
  .dpzvc-toTop {
2
4
  position: fixed;
3
5
  right: 15px;
@@ -1,4 +1,6 @@
1
1
  // 使用1px类时,需要注意 如果是absolute定位的,在引入mx-1px后,需要重新写入absolute定位
2
+ @import "../base/variable.less";
3
+
2
4
  .dpzvc-1px {
3
5
  &-all {
4
6
  .dpzvc-1px(@BorderColor);
@@ -1,8 +1,3 @@
1
- /**
2
- * webpack.dist.dev.config.js
3
- * 开发环境打包库文件 (Webpack 5)
4
- */
5
-
6
1
  const path = require('path');
7
2
  const webpack = require('webpack');
8
3
  const { merge } = require('webpack-merge');
@@ -10,7 +5,7 @@ const webpackBaseConfig = require('./webpack.base.config.js');
10
5
 
11
6
  process.env.NODE_ENV = 'production';
12
7
 
13
- module.exports = merge(webpackBaseConfig, {
8
+ module.exports =[merge(webpackBaseConfig, {
14
9
  mode: 'production',
15
10
 
16
11
  entry: {
@@ -46,4 +41,39 @@ module.exports = merge(webpackBaseConfig, {
46
41
  optimization: {
47
42
  minimize: false, // 开发库打包通常不压缩
48
43
  },
49
- });
44
+ }),
45
+ merge(webpackBaseConfig, {
46
+ mode: 'production',
47
+
48
+ entry: {
49
+ main: path.resolve(__dirname, './src/index.js')
50
+ },
51
+
52
+ output: {
53
+ path: path.resolve(__dirname, './dist'),
54
+ filename: 'dpzvc.esm.js', // 改名,标识 ESM
55
+ library: {
56
+ type: 'module' // ✅ 核心改动
57
+ },
58
+ clean: false
59
+ },
60
+
61
+ experiments: {
62
+ outputModule: true // ✅ 必须
63
+ },
64
+
65
+ externals: {
66
+ vue: 'vue'
67
+ },
68
+
69
+ plugins: [
70
+ new webpack.DefinePlugin({
71
+ 'process.env.NODE_ENV': JSON.stringify('production')
72
+ })
73
+ ],
74
+
75
+ optimization: {
76
+ concatenateModules: false,
77
+ minimize: false
78
+ }
79
+ })];
@@ -1,8 +1,3 @@
1
- /**
2
- * webpack.dist.prod.config.js
3
- * 生产环境打包库文件 (Webpack 5)
4
- */
5
-
6
1
  const path = require('path');
7
2
  const webpack = require('webpack');
8
3
  const TerserPlugin = require('terser-webpack-plugin');
@@ -11,7 +6,43 @@ const webpackBaseConfig = require('./webpack.base.config.js');
11
6
 
12
7
  process.env.NODE_ENV = 'production';
13
8
 
14
- module.exports = merge(webpackBaseConfig, {
9
+ module.exports =[
10
+ // -------- UMD 输出 --------
11
+ merge(webpackBaseConfig, {
12
+ mode: 'production',
13
+ entry: {
14
+ main: path.resolve(__dirname, './src/index.js')
15
+ },
16
+ output: {
17
+ path: path.resolve(__dirname, './dist'),
18
+ filename: 'dpzvc.min.js',
19
+ library: 'dpzvc',
20
+ libraryTarget: 'umd',
21
+ umdNamedDefine: true,
22
+ clean: false
23
+ },
24
+ externals: {
25
+ vue: 'Vue'
26
+ },
27
+ optimization: {
28
+ minimize: true,
29
+ minimizer: [
30
+ new TerserPlugin({
31
+ terserOptions: {
32
+ compress: { drop_console: true, drop_debugger: true },
33
+ output: { comments: false }
34
+ },
35
+ extractComments: false
36
+ })
37
+ ]
38
+ },
39
+ plugins: [
40
+ new webpack.DefinePlugin({
41
+ 'process.env.NODE_ENV': JSON.stringify('production')
42
+ })
43
+ ]
44
+ }),
45
+ merge(webpackBaseConfig, {
15
46
  mode: 'production',
16
47
 
17
48
  entry: {
@@ -20,34 +51,33 @@ module.exports = merge(webpackBaseConfig, {
20
51
 
21
52
  output: {
22
53
  path: path.resolve(__dirname, './dist'),
23
- publicPath: '/dist/',
24
- filename: 'dpzvc.min.js',
25
- library: 'dpzvc',
26
- libraryTarget: 'umd',
27
- umdNamedDefine: true,
28
- clean: false // webpack5 新增,每次构建清理旧文件
54
+ filename: 'dpzvc.esm.min.js', // ESM 文件
55
+ library: {
56
+ type: 'module' // 核心 ESM 输出
57
+ },
58
+ clean: false
59
+ },
60
+
61
+ experiments: {
62
+ outputModule: true
29
63
  },
30
64
 
31
65
  externals: {
32
- vue: {
33
- root: 'Vue',
34
- commonjs: 'vue',
35
- commonjs2: 'vue',
36
- amd: 'vue'
37
- }
66
+ vue: 'vue'
38
67
  },
39
68
 
40
69
  optimization: {
70
+ concatenateModules: false,
41
71
  minimize: true,
42
72
  minimizer: [
43
73
  new TerserPlugin({
44
74
  terserOptions: {
45
75
  compress: { drop_console: true, drop_debugger: true },
46
- output: { comments: false },
76
+ output: { comments: false }
47
77
  },
48
- extractComments: false, // 防止生成 LICENSE.txt
78
+ extractComments: false
49
79
  })
50
- ],
80
+ ]
51
81
  },
52
82
 
53
83
  plugins: [
@@ -55,4 +85,4 @@ module.exports = merge(webpackBaseConfig, {
55
85
  'process.env.NODE_ENV': JSON.stringify('production')
56
86
  })
57
87
  ]
58
- });
88
+ })];