zhyp-vue2-common-ui 0.2.0 → 0.3.0

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 (104) hide show
  1. package/lib/zhyp-vue2-common-ui.common.js.map +1 -0
  2. package/lib/zhyp-vue2-common-ui.umd.js.map +1 -0
  3. package/lib/zhyp-vue2-common-ui.umd.min.js.map +1 -0
  4. package/package.json +6 -1
  5. package/packages/battery-charging/index.js +7 -0
  6. package/packages/battery-charging/src/index.vue +126 -0
  7. package/packages/button/index.js +9 -0
  8. package/packages/button/src/button.vue +60 -0
  9. package/packages/index.js +26 -0
  10. package/.prettierrc.json +0 -4
  11. package/docs/README.en.md +0 -37
  12. package/docs/README.md +0 -5
  13. package/docs/deploy.sh +0 -22
  14. package/docs/docs/.vitepress/config/navConfig.js +0 -10
  15. package/docs/docs/.vitepress/config/sidebarConfig.js +0 -18
  16. package/docs/docs/.vitepress/config.js +0 -39
  17. package/docs/docs/.vitepress/dist/404.html +0 -21
  18. package/docs/docs/.vitepress/dist/IOS/Object-C/mac-question.html +0 -28
  19. package/docs/docs/.vitepress/dist/IOS/Object-C/oc-question.html +0 -35
  20. package/docs/docs/.vitepress/dist/IOS/Object-C/teammeeting.html +0 -58
  21. package/docs/docs/.vitepress/dist/assets/IOS_Object-C_mac-question.md.iNoUPpvj.js +0 -5
  22. package/docs/docs/.vitepress/dist/assets/IOS_Object-C_mac-question.md.iNoUPpvj.lean.js +0 -1
  23. package/docs/docs/.vitepress/dist/assets/IOS_Object-C_oc-question.md.yl7-X1lB.js +0 -12
  24. package/docs/docs/.vitepress/dist/assets/IOS_Object-C_oc-question.md.yl7-X1lB.lean.js +0 -1
  25. package/docs/docs/.vitepress/dist/assets/IOS_Object-C_teammeeting.md.rpxsBzUu.js +0 -35
  26. package/docs/docs/.vitepress/dist/assets/IOS_Object-C_teammeeting.md.rpxsBzUu.lean.js +0 -1
  27. package/docs/docs/.vitepress/dist/assets/app.d_BG5PHp.js +0 -7
  28. package/docs/docs/.vitepress/dist/assets/catalog.md.-j_-LmKq.js +0 -1
  29. package/docs/docs/.vitepress/dist/assets/catalog.md.-j_-LmKq.lean.js +0 -1
  30. package/docs/docs/.vitepress/dist/assets/chunks/framework.4Tex8Uls.js +0 -2
  31. package/docs/docs/.vitepress/dist/assets/chunks/theme.Jw7HlF7i.js +0 -1
  32. package/docs/docs/.vitepress/dist/assets/frontend_css_css-question.md.HKzi87sa.js +0 -98
  33. package/docs/docs/.vitepress/dist/assets/frontend_css_css-question.md.HKzi87sa.lean.js +0 -1
  34. package/docs/docs/.vitepress/dist/assets/frontend_es6_es6-arr.md.jEmK171f.js +0 -29
  35. package/docs/docs/.vitepress/dist/assets/frontend_es6_es6-arr.md.jEmK171f.lean.js +0 -1
  36. package/docs/docs/.vitepress/dist/assets/frontend_es6_es6.md.kVe9WLW9.js +0 -53
  37. package/docs/docs/.vitepress/dist/assets/frontend_es6_es6.md.kVe9WLW9.lean.js +0 -1
  38. package/docs/docs/.vitepress/dist/assets/frontend_js_js-method.md.1rKvqPT0.js +0 -258
  39. package/docs/docs/.vitepress/dist/assets/frontend_js_js-method.md.1rKvqPT0.lean.js +0 -1
  40. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue-question.md.LrOKTqRK.js +0 -56
  41. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue-question.md.LrOKTqRK.lean.js +0 -1
  42. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue-study.md.rj4_xBjU.js +0 -1
  43. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue-study.md.rj4_xBjU.lean.js +0 -1
  44. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue3-question.md.Mp2SP8bL.js +0 -87
  45. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue3-question.md.Mp2SP8bL.lean.js +0 -1
  46. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue3-study.md.mgccM28h.js +0 -769
  47. package/docs/docs/.vitepress/dist/assets/frontend_vue_vue3-study.md.mgccM28h.lean.js +0 -1
  48. package/docs/docs/.vitepress/dist/assets/index.md.t_TVKlD7.js +0 -1
  49. package/docs/docs/.vitepress/dist/assets/index.md.t_TVKlD7.lean.js +0 -1
  50. package/docs/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.OVycGSDq.woff2 +0 -0
  51. package/docs/docs/.vitepress/dist/assets/inter-italic-cyrillic.-nLMcIwj.woff2 +0 -0
  52. package/docs/docs/.vitepress/dist/assets/inter-italic-greek-ext.hznxWNZO.woff2 +0 -0
  53. package/docs/docs/.vitepress/dist/assets/inter-italic-greek.PSfer2Kc.woff2 +0 -0
  54. package/docs/docs/.vitepress/dist/assets/inter-italic-latin-ext.RnFly65-.woff2 +0 -0
  55. package/docs/docs/.vitepress/dist/assets/inter-italic-latin.27E69YJn.woff2 +0 -0
  56. package/docs/docs/.vitepress/dist/assets/inter-italic-vietnamese.xzQHe1q1.woff2 +0 -0
  57. package/docs/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.8T9wMG5w.woff2 +0 -0
  58. package/docs/docs/.vitepress/dist/assets/inter-roman-cyrillic.jIZ9REo5.woff2 +0 -0
  59. package/docs/docs/.vitepress/dist/assets/inter-roman-greek-ext.9JiNzaSO.woff2 +0 -0
  60. package/docs/docs/.vitepress/dist/assets/inter-roman-greek.Cb5wWeGA.woff2 +0 -0
  61. package/docs/docs/.vitepress/dist/assets/inter-roman-latin-ext.GZWE-KO4.woff2 +0 -0
  62. package/docs/docs/.vitepress/dist/assets/inter-roman-latin.bvIUbFQP.woff2 +0 -0
  63. package/docs/docs/.vitepress/dist/assets/inter-roman-vietnamese.paY3CzEB.woff2 +0 -0
  64. package/docs/docs/.vitepress/dist/assets/other_regular_regular-check.md.fqxAGj-8.js +0 -1
  65. package/docs/docs/.vitepress/dist/assets/other_regular_regular-check.md.fqxAGj-8.lean.js +0 -1
  66. package/docs/docs/.vitepress/dist/assets/other_safety_safety.md.IFx1TY_H.js +0 -1
  67. package/docs/docs/.vitepress/dist/assets/other_safety_safety.md.IFx1TY_H.lean.js +0 -1
  68. package/docs/docs/.vitepress/dist/assets/style.disEb6vb.css +0 -1
  69. package/docs/docs/.vitepress/dist/catalog.html +0 -24
  70. package/docs/docs/.vitepress/dist/frontend/css/css-question.html +0 -121
  71. package/docs/docs/.vitepress/dist/frontend/es6/es6-arr.html +0 -52
  72. package/docs/docs/.vitepress/dist/frontend/es6/es6.html +0 -76
  73. package/docs/docs/.vitepress/dist/frontend/js/js-method.html +0 -281
  74. package/docs/docs/.vitepress/dist/frontend/vue/vue-question.html +0 -79
  75. package/docs/docs/.vitepress/dist/frontend/vue/vue-study.html +0 -24
  76. package/docs/docs/.vitepress/dist/frontend/vue/vue3-question.html +0 -110
  77. package/docs/docs/.vitepress/dist/frontend/vue/vue3-study.html +0 -792
  78. package/docs/docs/.vitepress/dist/hashmap.json +0 -1
  79. package/docs/docs/.vitepress/dist/img/cssImg/button.png +0 -0
  80. package/docs/docs/.vitepress/dist/img/cssImg/color.png +0 -0
  81. package/docs/docs/.vitepress/dist/img/cssImg/dialog.png +0 -0
  82. package/docs/docs/.vitepress/dist/img/cssImg/focus.png +0 -0
  83. package/docs/docs/.vitepress/dist/img/cssImg/focusEdit.png +0 -0
  84. package/docs/docs/.vitepress/dist/img/cssImg/mesBox.png +0 -0
  85. package/docs/docs/.vitepress/dist/img/cssImg/search.png +0 -0
  86. package/docs/docs/.vitepress/dist/img/iosImg/healthlist.jpg +0 -0
  87. package/docs/docs/.vitepress/dist/img/vueImg/btnFocus.png +0 -0
  88. package/docs/docs/.vitepress/dist/img/vueImg/selectClose.png +0 -0
  89. package/docs/docs/.vitepress/dist/index.html +0 -24
  90. package/docs/docs/.vitepress/dist/logo.png +0 -0
  91. package/docs/docs/.vitepress/dist/other/regular/regular-check.html +0 -24
  92. package/docs/docs/.vitepress/dist/other/safety/safety.html +0 -24
  93. package/docs/docs/.vitepress/theme/index.js +0 -19
  94. package/docs/docs/.vitepress/theme/styles/index.scss +0 -3
  95. package/docs/docs/.vitepress/theme/styles/rainbow.scss +0 -679
  96. package/docs/docs/.vitepress/theme/styles/vars.scss +0 -103
  97. package/docs/docs/catalog.md +0 -1
  98. package/docs/docs/component/Basic/Button.md +0 -19
  99. package/docs/docs/component/Basic/Icon.md +0 -1
  100. package/docs/docs/component/Data/BatteryCharging.md +0 -107
  101. package/docs/docs/index.md +0 -41
  102. package/docs/docs/public/logo.png +0 -0
  103. package/docs/package.json +0 -23
  104. package/src/utils/common.js +0 -16
@@ -1,103 +0,0 @@
1
- /**
2
- * Customize default theme styling by overriding CSS variables:
3
- * https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
4
- */
5
-
6
- /**
7
- * Colors
8
- * -------------------------------------------------------------------------- */
9
- :root {
10
- --vp-c-gutter: var(--vp-c-divider);
11
- --vp-code-block-bg: rgba(125, 125, 125, 0.04);
12
- --vp-code-tab-divider: var(--vp-c-divider);
13
- --vp-code-copy-code-bg: rgba(125, 125, 125, 0.1);
14
- --vp-code-copy-code-hover-bg: rgba(125, 125, 125, 0.2);
15
- --vp-c-disabled-bg: rgba(125, 125, 125, 0.2);
16
- --vp-code-tab-text-color: var(--vp-c-text-2);
17
- --vp-code-tab-active-text-color: var(--vp-c-text-1);
18
- --vp-code-tab-hover-text-color: var(--vp-c-text-1);
19
- --vp-code-copy-code-active-text: var(--vp-c-text-2);
20
- --vp-c-text-dark-3: rgba(56, 56, 56, 0.8);
21
- --vp-c-brand-lightest: var(--vp-c-brand-1);
22
-
23
- --vp-c-highlight-bg: var(--vp-c-brand-light);
24
- --vp-c-highlight-text: var(--vp-c-bg);
25
- }
26
-
27
- .dark {
28
- --vp-code-block-bg: rgba(0, 0, 0, 0.2);
29
- --vp-c-text-code: #c0cec0;
30
- }
31
-
32
- /**
33
- * Component: Button
34
- * -------------------------------------------------------------------------- */
35
- :root {
36
- --vp-button-brand-border: var(--vp-c-brand-light);
37
- --vp-button-brand-text: var(--vp-c-white);
38
- --vp-button-brand-bg: var(--vp-c-brand-1);
39
- --vp-button-brand-hover-border: var(--vp-c-brand-light);
40
- --vp-button-brand-hover-text: var(--vp-c-white);
41
- --vp-button-brand-hover-bg: var(--vp-c-brand-light);
42
- --vp-button-brand-active-border: var(--vp-c-brand-light);
43
- --vp-button-brand-active-text: var(--vp-c-white);
44
- --vp-button-brand-active-bg: var(--vp-button-brand-bg);
45
- }
46
-
47
- /**
48
- * Component: Home
49
- * -------------------------------------------------------------------------- */
50
- :root {
51
- --vp-home-hero-name-color: transparent;
52
- --vp-home-hero-name-background: -webkit-linear-gradient(
53
- 120deg,
54
- var(--vp-c-brand-1) 30%,
55
- var(--vp-c-brand-next)
56
- );
57
- --vp-home-hero-image-background-image: linear-gradient(
58
- -45deg,
59
- var(--vp-c-brand-1) 30%,
60
- var(--vp-c-brand-next)
61
- );
62
- --vp-home-hero-image-filter: blur(80px);
63
- }
64
-
65
- @media (min-width: 640px) {
66
- :root {
67
- --vp-home-hero-image-filter: blur(120px);
68
- }
69
- }
70
-
71
- @media (min-width: 960px) {
72
- :root {
73
- --vp-home-hero-image-filter: blur(120px);
74
- }
75
- }
76
-
77
- /* Safari has a very bad performance on gradient and filter */
78
- .browser-safari,
79
- .browser-firefox {
80
- --vp-home-hero-image-background-image: transparent;
81
- --vp-home-hero-image-filter: '';
82
- }
83
-
84
- /**
85
- * Component: Custom Block
86
- * -------------------------------------------------------------------------- */
87
- :root {
88
- --vp-custom-block-tip-border: var(--vp-c-brand-1);
89
- --vp-custom-block-tip-text: var(--vp-c-brand-darker);
90
- --vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
91
- }
92
- .dark {
93
- --vp-custom-block-tip-border: var(--vp-c-brand-1);
94
- --vp-custom-block-tip-text: var(--vp-c-brand-lightest);
95
- --vp-custom-block-tip-bg: var(--vp-c-brand-dimm);
96
- }
97
-
98
- /**
99
- * Component: Algolia
100
- * -------------------------------------------------------------------------- */
101
- .DocSearch {
102
- --docsearch-primary-color: var(--vp-c-brand-1) !important;
103
- }
@@ -1 +0,0 @@
1
- ## 文档说明
@@ -1,19 +0,0 @@
1
- # Button 组件示例
2
-
3
- :::demo
4
-
5
- ```vue
6
- <template>
7
- <CoButton type="primary" style="margin-right:20px">主要按钮</CoButton>
8
-
9
- <CoButton>默认按钮</CoButton>
10
- </template>
11
- ```
12
-
13
- :::
14
-
15
- ## Attributes
16
-
17
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
18
- | ---- | ---- | ------ | ------- | ------ |
19
- | type | 类型 | string | primary | |
@@ -1 +0,0 @@
1
- ## 测试
@@ -1,107 +0,0 @@
1
- # BatteryCharging 水波纹
2
-
3
- ### 基本用法
4
-
5
- :::demo
6
-
7
- ```vue
8
- <template>
9
- <div
10
- style="width: 100%; height: 200px; background: #02173aff; padding: 10px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-around;"
11
- >
12
- <co-battery-charging :percent="20" :width="150">
13
- <div class="slot-box">
14
- <div>20%</div>
15
- <div>百分比</div>
16
- </div>
17
- </co-battery-charging>
18
- <co-battery-charging :percent="50" :width="150" color="#02c6d9">
19
- <div class="slot-box">
20
- <div>50%</div>
21
- <div>百分比</div>
22
- </div>
23
- </co-battery-charging>
24
- <co-battery-charging :percent="80" :width="150" color="#aa4101">
25
- <div class="slot-box">
26
- <div>80%</div>
27
- <div>百分比</div>
28
- </div>
29
- </co-battery-charging>
30
- </div>
31
- </template>
32
- <style>
33
- .slot-box {
34
- width: 100%;
35
- height: 100%;
36
- display: flex;
37
- align-items: center;
38
- justify-content: center;
39
- flex-direction: column;
40
- }
41
- .slot-box div:nth-child(1) {
42
- color: #fff;
43
- font-size: 20px;
44
- }
45
- .slot-box div:nth-child(2) {
46
- color: #fff;
47
- font-size: 26px;
48
- }
49
- </style>
50
- ```
51
-
52
- :::
53
-
54
- ### Attributes
55
-
56
- | 参数 | 说明 | 类型 | 可选值 | 默认值 |
57
- | :-----: | :----------: | :----: | :----: | :-----: |
58
- | percent | 占比 | number | - | 0 |
59
- | color | 整体颜色 | string | - | #0bd5be |
60
- | width | 水波纹的宽高 | number | - | 200 |
61
-
62
- ### Slots
63
-
64
- | name | 说明 |
65
- | :------: | :------------------: |
66
- | 匿名插槽 | 用作水波纹的提示文字 |
67
-
68
- <style>
69
- table {
70
- border-collapse: collapse;
71
- width: 100%;
72
- background-color: #fff;
73
- font-size: 14px;
74
- margin-bottom: 20px;
75
- display: table;
76
- }
77
- table thead, table tbody {
78
- width:100%;
79
- border-color: inherit;
80
- }
81
- table thead td, table tbody td {
82
- max-width: 250px;
83
- }
84
- table th {
85
- text-align: left;
86
- white-space: nowrap;
87
- color: #909399;
88
- font-weight: 400;
89
- }
90
- table td, table th {
91
- padding: 15px;
92
- max-width: 250px;
93
-
94
- }
95
- .screen-line-progress-box{
96
- width: 100%;
97
- height: 200px;
98
- display: flex;
99
- flex-direction: column;
100
- justify-content: space-evenly;
101
- align-items:center;
102
- margin:0 auto;
103
- background: #061a3b;
104
- padding: 0 20px;
105
- box-sizing: border-box;
106
- }
107
- </style>
@@ -1,41 +0,0 @@
1
- ---
2
- layout: home
3
-
4
- hero:
5
- name: 前端组件库
6
- text:
7
- tagline: 所有幸运,都是努力埋下的伏笔。
8
- image:
9
- src: /logo.png
10
- alt: 图片不见了
11
- actions:
12
- - theme: brand
13
- text: 开始
14
- link: /component/Basic/Button
15
- - theme: alt
16
- text: 组件库
17
- link: /catalog
18
- features:
19
- - icon: 🎄
20
- title: 组件库
21
- details: 进入正文
22
- link: /catalog
23
- linkText: 了解更多
24
- - icon: ⚡️
25
- title: 奇思妙想
26
- details: 新奇的想法...
27
- - icon: 🌞
28
- title: 一群快乐的小码农
29
- details: 加油...
30
- - icon: 🛠️
31
- title: 笔记目录
32
- details: 进入正文
33
- link: /catalog
34
- linkText: 了解更多
35
- - icon: 🤔
36
- title: 踩坑记录
37
- details: 那些年我踩过的坑...
38
- - icon: ❣️
39
- title: 如果可以请为笔记停留
40
- details: 多些耐心...
41
- ---
Binary file
package/docs/package.json DELETED
@@ -1,23 +0,0 @@
1
- {
2
- "name": "common-ui-vitepress",
3
- "version": "1.0.0",
4
- "type": "module",
5
- "description": "",
6
- "main": "index.js",
7
- "scripts": {
8
- "test": "echo \"Error: no test specified\" && exit 1",
9
- "docs:dev": "vitepress dev docs",
10
- "docs:build": "vitepress build docs",
11
- "docs:serve": "vitepress serve docs",
12
- "docs:deploy": "sh deploy.sh"
13
- },
14
- "author": "zhangxiaoning",
15
- "license": "ISC",
16
- "dependencies": {
17
- "vitepress": "^1.0.0-rc.32"
18
- },
19
- "devDependencies": {
20
- "sass": "^1.70.0",
21
- "vitepress-theme-demoblock": "^3.1.3"
22
- }
23
- }
@@ -1,16 +0,0 @@
1
- let id = 1
2
- // 主要用于 Vue 的 diff 算法,为每个元素创建一个独一无二的 ID
3
- export function generateID () {
4
- return id++
5
- }
6
- export function getLastestMonth () {
7
- const date = new Date()
8
- let year = date.getFullYear()
9
- let month = date.getMonth()
10
- if (month === 0) {
11
- month = 12
12
- year -= 1
13
- }
14
- month = month > 9 ? month : `0${month}`
15
- return `${year}${month}`
16
- }