web-component-gallery 1.3.12 → 2.0.2

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 (218) hide show
  1. package/dist/923.umd.js +1 -0
  2. package/dist/index.umd.js +1 -12252
  3. package/dist/js.umd.js +1 -0
  4. package/dist/style.css +17 -0
  5. package/dist/style.umd.js +1 -0
  6. package/{method → extensions}/AMap.js +1 -5
  7. package/{plugins/method → extensions}/Dialog.js +2 -2
  8. package/{lib/lazy_use.js → extensions/index.js} +16 -2
  9. package/lib/{amap/components/AmapSearch/index.jsx → amap-comp/AmapSearch.jsx} +3 -5
  10. package/lib/amap-comp/index.js +18 -0
  11. package/{plugins/lib/amap/components/AmapSearch/index.less → lib/amap-comp/style/AmapSearch.less} +5 -3
  12. package/lib/amap-comp/style/index.js +1 -0
  13. package/lib/amap-comp/style/index.less +1 -0
  14. package/lib/{amap/AmapDraw.jsx → amap-draw/index.jsx} +2 -4
  15. package/lib/amap-draw/style/index.js +1 -0
  16. package/lib/{amap/AmapDraw.less → amap-draw/style/index.less} +6 -3
  17. package/lib/browse/index.jsx +0 -2
  18. package/lib/browse/style/index.js +1 -0
  19. package/lib/button/Button.js +1 -3
  20. package/lib/button/style/index.js +1 -0
  21. package/{plugins/lib/dateTime → lib/date-time}/index.vue +3 -13
  22. package/lib/date-time/style/index.js +1 -0
  23. package/lib/date-time/style/index.less +7 -0
  24. package/lib/{descriptions → descriptions-list}/index.jsx +1 -3
  25. package/lib/descriptions-list/style/index.js +1 -0
  26. package/{plugins/lib/tree → lib/directory}/Directory.js +4 -21
  27. package/lib/directory/index.js +8 -0
  28. package/lib/directory/style/index.js +1 -0
  29. package/lib/{tree/style/Directory.less → directory/style/index.less} +3 -4
  30. package/{plugins/lib/form/components → lib/form-comp}/ACascaderMultiple.vue +1 -106
  31. package/lib/form-comp/ARadio.vue +70 -0
  32. package/lib/{form/components → form-comp}/ARangePicker.vue +9 -20
  33. package/lib/{form/components → form-comp}/ASelectCustom.vue +1 -8
  34. package/lib/form-comp/ATagsInput.vue +88 -0
  35. package/lib/form-comp/ATimePicker.vue +127 -0
  36. package/lib/{form/components → form-comp}/AUpload.vue +2 -17
  37. package/lib/form-comp/index.js +37 -0
  38. package/lib/form-comp/style/ACascaderMultiple.less +117 -0
  39. package/lib/form-comp/style/ARadio.less +0 -0
  40. package/lib/form-comp/style/ARangePicker.less +11 -0
  41. package/lib/form-comp/style/ASelectCustom.less +4 -0
  42. package/lib/form-comp/style/ATagsInput.less +24 -0
  43. package/lib/form-comp/style/ATimePicker.less +8 -0
  44. package/lib/form-comp/style/AUpload.less +15 -0
  45. package/lib/form-comp/style/index.js +1 -0
  46. package/lib/form-comp/style/index.less +7 -0
  47. package/lib/index.js +60 -45
  48. package/lib/modal/index.jsx +4 -6
  49. package/lib/modal/style/index.js +1 -0
  50. package/lib/modal/{index.less → style/index.less} +6 -7
  51. package/{plugins/lib/form → lib/model}/Model.js +1 -3
  52. package/lib/model/index.js +7 -0
  53. package/lib/model/style/index.js +1 -0
  54. package/lib/{form/style/Model.less → model/style/index.less} +10 -10
  55. package/{plugins/lib/form → lib/model}/utils/render.js +1 -1
  56. package/lib/{form → model}/utils/resetFields.js +1 -1
  57. package/lib/no-data/directive.js +65 -0
  58. package/lib/no-data/index.js +21 -0
  59. package/lib/no-data/index.vue +35 -0
  60. package/lib/no-data/style/index.js +1 -0
  61. package/lib/no-data/style/index.less +15 -0
  62. package/lib/search/index.js +7 -0
  63. package/{plugins/lib/form/Search.vue → lib/search/index.vue} +3 -6
  64. package/lib/search/style/index.js +1 -0
  65. package/{plugins/lib/form/style/Search.less → lib/search/style/index.less} +7 -8
  66. package/lib/style/mixins.less +1 -1
  67. package/lib/{svgIcon → svg-icon}/index.vue +1 -17
  68. package/lib/svg-icon/style/index.js +1 -0
  69. package/lib/svg-icon/style/index.less +15 -0
  70. package/lib/table/index.vue +4 -8
  71. package/lib/table/style/index.js +1 -0
  72. package/lib/table/style/index.less +12 -13
  73. package/lib/tree/index.js +2 -11
  74. package/{plugins/lib/tree/Tree.vue → lib/tree/index.vue} +2 -5
  75. package/lib/tree/style/index.js +1 -0
  76. package/{plugins/lib/tree/style/Tree.less → lib/tree/style/index.less} +4 -4
  77. package/lib/weather/index.vue +1 -9
  78. package/lib/weather/style/index.js +1 -0
  79. package/lib/weather/style/index.less +7 -0
  80. package/package.json +16 -34
  81. package/utils/Axios.js +91 -82
  82. package/utils/Postcss.js +12 -8
  83. package/README.md +0 -24
  84. package/dist/amap.umd.js +0 -12252
  85. package/dist/avatar.umd.js +0 -5337
  86. package/dist/button.umd.js +0 -5845
  87. package/dist/dateTime.umd.js +0 -1287
  88. package/dist/form.umd.js +0 -9981
  89. package/dist/multiTab.umd.js +0 -5556
  90. package/dist/svgIcon.umd.js +0 -1167
  91. package/dist/table.umd.js +0 -6306
  92. package/dist/tree.umd.js +0 -5393
  93. package/dist/weather.umd.js +0 -1167
  94. package/lib/amap/components/AmapSearch/index.less +0 -16
  95. package/lib/amap/index.js +0 -13
  96. package/lib/avatar/index.js +0 -7
  97. package/lib/avatar/index.vue +0 -47
  98. package/lib/basic/404.vue +0 -24
  99. package/lib/dateTime/index.vue +0 -43
  100. package/lib/form/Model.js +0 -153
  101. package/lib/form/Search.vue +0 -159
  102. package/lib/form/components/ACascaderMultiple.vue +0 -766
  103. package/lib/form/components/ARadio.vue +0 -74
  104. package/lib/form/components/ATagsInput.vue +0 -93
  105. package/lib/form/components/ATimePicker.vue +0 -73
  106. package/lib/form/index.js +0 -55
  107. package/lib/form/style/Search.less +0 -34
  108. package/lib/form/utils/render.js +0 -85
  109. package/lib/iframe/events.js +0 -2
  110. package/lib/iframe/index.jsx +0 -234
  111. package/lib/iframe/index.less +0 -19
  112. package/lib/multiTab/APIEnums.js +0 -17
  113. package/lib/multiTab/MultiTab.jsx +0 -237
  114. package/lib/multiTab/RouteAPI.js +0 -71
  115. package/lib/multiTab/RouteContent.jsx +0 -90
  116. package/lib/multiTab/RouteKeepAlive.js +0 -183
  117. package/lib/multiTab/events.js +0 -2
  118. package/lib/multiTab/index.js +0 -15
  119. package/lib/multiTab/index.less +0 -73
  120. package/lib/style/index.less +0 -2
  121. package/lib/tree/Directory.js +0 -428
  122. package/lib/tree/Tree.vue +0 -181
  123. package/lib/tree/style/Tree.less +0 -52
  124. package/method/Dialog.js +0 -134
  125. package/method/index.js +0 -12
  126. package/plugins/lib/amap/AmapDraw.jsx +0 -349
  127. package/plugins/lib/amap/AmapDraw.less +0 -45
  128. package/plugins/lib/amap/components/AmapSearch/index.jsx +0 -73
  129. package/plugins/lib/amap/index.js +0 -13
  130. package/plugins/lib/avatar/index.js +0 -7
  131. package/plugins/lib/avatar/index.vue +0 -47
  132. package/plugins/lib/basic/404.vue +0 -24
  133. package/plugins/lib/browse/index.jsx +0 -76
  134. package/plugins/lib/browse/index.less +0 -4
  135. package/plugins/lib/button/Button.js +0 -89
  136. package/plugins/lib/button/index.js +0 -7
  137. package/plugins/lib/dateTime/index.js +0 -7
  138. package/plugins/lib/descriptions/index.jsx +0 -108
  139. package/plugins/lib/descriptions/index.less +0 -15
  140. package/plugins/lib/form/components/ARadio.vue +0 -74
  141. package/plugins/lib/form/components/ARangePicker.vue +0 -129
  142. package/plugins/lib/form/components/ASelectCustom.vue +0 -226
  143. package/plugins/lib/form/components/ATagsInput.vue +0 -93
  144. package/plugins/lib/form/components/ATimePicker.vue +0 -73
  145. package/plugins/lib/form/components/AUpload.vue +0 -183
  146. package/plugins/lib/form/components/RenderComp.vue +0 -69
  147. package/plugins/lib/form/index.js +0 -55
  148. package/plugins/lib/form/style/Model.less +0 -53
  149. package/plugins/lib/form/utils/resetFields.js +0 -16
  150. package/plugins/lib/iframe/events.js +0 -2
  151. package/plugins/lib/iframe/index.jsx +0 -234
  152. package/plugins/lib/iframe/index.less +0 -19
  153. package/plugins/lib/index.js +0 -72
  154. package/plugins/lib/lazy_use.js +0 -40
  155. package/plugins/lib/modal/index.jsx +0 -53
  156. package/plugins/lib/modal/index.less +0 -50
  157. package/plugins/lib/multiTab/APIEnums.js +0 -17
  158. package/plugins/lib/multiTab/MultiTab.jsx +0 -237
  159. package/plugins/lib/multiTab/RouteAPI.js +0 -71
  160. package/plugins/lib/multiTab/RouteContent.jsx +0 -90
  161. package/plugins/lib/multiTab/RouteKeepAlive.js +0 -183
  162. package/plugins/lib/multiTab/events.js +0 -2
  163. package/plugins/lib/multiTab/index.js +0 -15
  164. package/plugins/lib/multiTab/index.less +0 -73
  165. package/plugins/lib/style/index.less +0 -2
  166. package/plugins/lib/style/mixins.less +0 -79
  167. package/plugins/lib/svgIcon/index.js +0 -7
  168. package/plugins/lib/svgIcon/index.vue +0 -77
  169. package/plugins/lib/table/index.js +0 -7
  170. package/plugins/lib/table/index.vue +0 -217
  171. package/plugins/lib/table/style/index.less +0 -50
  172. package/plugins/lib/tree/index.js +0 -17
  173. package/plugins/lib/tree/style/Directory.less +0 -119
  174. package/plugins/lib/weather/index.js +0 -7
  175. package/plugins/lib/weather/index.vue +0 -58
  176. package/plugins/method/AMap.js +0 -368
  177. package/plugins/method/PageLoading.jsx +0 -106
  178. package/plugins/method/Theme.js +0 -88
  179. package/plugins/method/index.js +0 -12
  180. package/plugins/store/auth.js +0 -31
  181. package/plugins/store/cache.js +0 -56
  182. package/plugins/store/chat.js +0 -74
  183. package/plugins/store/project.js +0 -46
  184. package/plugins/utils/Axios.js +0 -105
  185. package/plugins/utils/Base64.js +0 -314
  186. package/plugins/utils/Filter.js +0 -249
  187. package/plugins/utils/PostMessage.js +0 -16
  188. package/plugins/utils/Postcss.js +0 -9
  189. package/plugins/utils/Rem.js +0 -24
  190. package/plugins/utils/Request.js +0 -38
  191. package/plugins/utils/Storage.js +0 -73
  192. package/plugins/utils/Tree.js +0 -169
  193. package/plugins/utils/Utils.js +0 -51
  194. package/plugins/utils/Validate.js +0 -33
  195. package/plugins/utils/Websocket.js +0 -186
  196. package/utils/PostMessage.js +0 -16
  197. package/utils/Request.js +0 -38
  198. /package/{method → extensions}/PageLoading.jsx +0 -0
  199. /package/{method → extensions}/Theme.js +0 -0
  200. /package/{plugins/font → font}/DS-DIGI-1.ttf +0 -0
  201. /package/{plugins/font → font}/DS-DIGIB-2.ttf +0 -0
  202. /package/{plugins/font → font}/DS-DIGII-3.ttf +0 -0
  203. /package/{plugins/font → font}/DS-DIGIT-4.ttf +0 -0
  204. /package/{plugins/font → font}/Orbitron-Black.ttf +0 -0
  205. /package/{plugins/font → font}/Orbitron-Bold.ttf +0 -0
  206. /package/{plugins/font → font}/Orbitron-Medium.ttf +0 -0
  207. /package/{plugins/font → font}/Orbitron-Regular.ttf +0 -0
  208. /package/{plugins/font → font}/PANGMENZHENGDAOBIAOTITI-1.TTF +0 -0
  209. /package/{plugins/font → font}/PingFang SC.ttf +0 -0
  210. /package/{plugins/font → font}/YouSheBiaoTiHei.ttf +0 -0
  211. /package/{plugins/font → font}/font.css +0 -0
  212. /package/{plugins/font → font}//345/255/227/351/255/20235/345/217/267-/347/273/217/345/205/270/351/233/205/351/273/221.ttf" +0 -0
  213. /package/lib/browse/{index.less → style/index.less} +0 -0
  214. /package/{dist/css/index.css → lib/button/style/index.less} +0 -0
  215. /package/lib/{dateTime → date-time}/index.js +0 -0
  216. /package/lib/{descriptions → descriptions-list/style}/index.less +0 -0
  217. /package/lib/{form/components → form-comp}/RenderComp.vue +0 -0
  218. /package/lib/{svgIcon → svg-icon}/index.js +0 -0
@@ -1,10 +1,8 @@
1
1
  import { FormModel } from 'ant-design-vue'
2
2
  import { getFormWidth, setFormItemRule, setFormItem } from './utils/render'
3
3
 
4
- import './style/Model.less'
5
-
6
4
  export default {
7
- name: 'Model',
5
+ name: 'WModel',
8
6
  model: {
9
7
  prop: 'value',
10
8
  event: 'Change:Model'
@@ -0,0 +1,7 @@
1
+ import Model from './Model.js'
2
+
3
+ Model.install = function (Vue) {
4
+ Vue.component(Model.name, Model)
5
+ }
6
+
7
+ export default Model
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -1,7 +1,8 @@
1
+ @import '../../form-comp/style/index.less';
1
2
 
2
3
  .FormModel {
3
4
  display: flex;
4
- flex-wrap: wrap;
5
+ flex-wrap: wrap;
5
6
 
6
7
  &__LabelTips {
7
8
  width: 100%;
@@ -10,37 +11,36 @@
10
11
  .ant-select,
11
12
  .ant-input-number,
12
13
  .ant-calendar-picker {
13
- width: 100% !important;
14
+ width: 100%;
14
15
  }
15
16
 
16
17
  .ant-form-item-children {
17
18
  display: flex;
18
- align-items: center;
19
+ align-items: center;
19
20
  }
20
21
 
21
22
  .FormLine {
22
23
  display: flex;
23
24
 
24
- :deep(.ant-form-item-label) {
25
+ .ant-form-item-label {
25
26
  width: 85px;
26
27
  text-align: right;
27
28
  }
28
29
 
29
- :deep(.ant-form-item-control-wrapper) {
30
+ .ant-form-item-control-wrapper {
30
31
  width: calc(100% - 85px);
31
32
  }
32
33
  }
33
34
 
34
35
  .FormLineVertical {
35
- display: flex;
36
- flex-direction: column;
36
+ .flex-layout(column);
37
37
 
38
- :deep(.ant-form-item-label) {
39
- text-align: left;
38
+ .ant-form-item-label {
40
39
  width: 100%;
40
+ text-align: left;
41
41
  }
42
42
 
43
- :deep(.ant-form-item-control-wrapper) {
43
+ .ant-form-item-control-wrapper {
44
44
  width: 100%;
45
45
  }
46
46
  }
@@ -1,5 +1,5 @@
1
1
  import { FormModel } from 'ant-design-vue'
2
- import RenderComp from '../components/RenderComp.vue'
2
+ import RenderComp from '../../form-comp/RenderComp.vue'
3
3
 
4
4
  const FormModelItem = FormModel.Item
5
5
 
@@ -1,5 +1,5 @@
1
1
  /** 根据属性类型重置数据初始化 */
2
- export function resetFields(formObj) {
2
+ export function resetFields(formObj) {
3
3
  const initialForm = {}
4
4
  for (const key in formObj) {
5
5
  if ( formObj[key] === null || typeof formObj[key] !== 'object') {
@@ -0,0 +1,65 @@
1
+ import NoData from './index.vue'
2
+
3
+ // <!-- 基础用法 -->
4
+ // <div v-no-data="list"></div>
5
+ // <!-- 指定描述内容 -->
6
+ // <div v-no-data:暂无="list"></div>
7
+ // <!-- 指定图标类型 -->
8
+ // <div v-no-data.error="list"></div>
9
+ // <!-- 既指定描述内容, 也指定图标类型 -->
10
+ // <div v-no-data:暂无数据.error="list"></div>
11
+
12
+ const isEmpty = value => {
13
+ return value === null ||
14
+ value === undefined ||
15
+ (Array.isArray(value) && !value.length) ||
16
+ (typeof value === 'object' && !Object.keys(value).length)
17
+ }
18
+
19
+ export default function(Vue) {
20
+ const createNoDataInstance = (el, binding) => {
21
+ const modifierType = Object.keys(binding.modifiers)[0] || 'zanwushuju'
22
+
23
+ const instance = new (Vue.extend(NoData))({
24
+ propsData: {
25
+ text: binding.arg || '暂无数据',
26
+ type: modifierType
27
+ }
28
+ }).$mount()
29
+
30
+ el._noDataInstance = instance
31
+ el.parentNode.insertBefore(instance.$el, el)
32
+ }
33
+
34
+ const removeNoDataInstance = (el) => {
35
+ if (el._noDataInstance) {
36
+ el.parentNode.removeChild(el._noDataInstance.$el)
37
+ el._noDataInstance.$destroy()
38
+ el._noDataInstance = null
39
+ }
40
+ }
41
+
42
+ return {
43
+ inserted(el, binding) {
44
+ if (isEmpty(binding.value)) {
45
+ createNoDataInstance(el, binding)
46
+ }
47
+ },
48
+ update(el, binding) {
49
+ if (binding.oldValue !== binding.value) {
50
+ if (isEmpty(binding.value)) {
51
+ if (!el._noDataInstance) {
52
+ createNoDataInstance(el, binding)
53
+ } else {
54
+ const modifierType = Object.keys(binding.modifiers)[0] || 'zanwushuju'
55
+ el._noDataInstance.text = binding.arg || '暂无数据'
56
+ el._noDataInstance.type = modifierType
57
+ }
58
+ } else {
59
+ removeNoDataInstance(el)
60
+ }
61
+ }
62
+ },
63
+ unbind: removeNoDataInstance
64
+ }
65
+ }
@@ -0,0 +1,21 @@
1
+ // 主入口文件 index.js
2
+ import NoData from './index.vue'
3
+ import NoDataDirective from './directive'
4
+
5
+ const install = (Vue) => {
6
+ Vue.component(NoData.name, NoData)
7
+ Vue.directive('no-data', NoDataDirective(Vue))
8
+ }
9
+
10
+ // 全量导出
11
+ export default {
12
+ install,
13
+ component: NoData,
14
+ directive: NoDataDirective
15
+ }
16
+
17
+ // 单独导出
18
+ export {
19
+ NoData,
20
+ NoDataDirective
21
+ }
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <Empty
3
+ :description="text"
4
+ class="no-data-container"
5
+ >
6
+ <div slot="image">
7
+ <IconFont :type="`icon-${type}`" />
8
+ </div>
9
+ <slot></slot>
10
+ </Empty>
11
+ </template>
12
+
13
+ <script>
14
+
15
+ import { Icon, Empty } from 'ant-design-vue'
16
+
17
+ const IconFont = Icon.createFromIconfontCN({
18
+ scriptUrl: '//at.alicdn.com/t/c/font_4641025_6uucxf9fvta.js'
19
+ })
20
+
21
+ export default {
22
+ name: 'NoData',
23
+ components: { Empty, IconFont },
24
+ props: {
25
+ text: {
26
+ type: String,
27
+ default: '暂无数据'
28
+ },
29
+ type: {
30
+ type: String,
31
+ default: 'zanwushuju'
32
+ }
33
+ }
34
+ }
35
+ </script>
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -0,0 +1,15 @@
1
+ @import '~ant-design-vue/lib/style/themes/default.less';
2
+ @import '../../style/mixins.less';
3
+
4
+ .no-data-container {
5
+ padding: @padding-lg;
6
+ box-sizing: border-box;
7
+
8
+ div {
9
+ .layout();
10
+
11
+ .anticon {
12
+ font-size: 100px;
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,7 @@
1
+ import Search from './index.vue'
2
+
3
+ Search.install = function (Vue) {
4
+ Vue.component(Search.name, Search)
5
+ }
6
+
7
+ export default Search
@@ -29,12 +29,12 @@
29
29
  </template>
30
30
  <script>
31
31
 
32
- import resetFields from './utils/resetFields'
33
- import RenderComp from './components/RenderComp.vue'
32
+ import resetFields from '../model/utils/resetFields'
33
+ import RenderComp from '../form-comp/RenderComp.vue'
34
34
  import { Icon, Button, FormModel } from 'ant-design-vue'
35
35
 
36
36
  export default {
37
- name: 'Search',
37
+ name: 'WSearch',
38
38
  components: {
39
39
  Icon,
40
40
  Button,
@@ -154,6 +154,3 @@ export default {
154
154
  }
155
155
  }
156
156
  </script>
157
- <style lang="less" scoped>
158
- @import url('./style/Search.less');
159
- </style>
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -1,5 +1,4 @@
1
- /* 混入样式 */
2
- @import url('../../style/mixins.less');
1
+ @import '../../form-comp/style/index.less';
3
2
 
4
3
  .WebComponentFormSearch {
5
4
  gap: 16px 0;
@@ -9,20 +8,20 @@
9
8
  display: inline-flex;
10
9
  margin-right: unset;
11
10
 
12
- :deep(.ant-form-item-label) {
11
+ .ant-form-item-label {
13
12
  min-width: 70px;
14
13
  max-width: 100px;
15
14
  text-align: right;
16
15
  }
17
16
 
18
- :deep(.ant-form-item-control-wrapper) {
17
+ .ant-form-item-control-wrapper {
19
18
  flex: 1;
20
19
  }
21
20
 
22
- :deep(.ant-select),
23
- :deep(.ant-input-number),
24
- :deep(.ant-calendar-picker) {
25
- width: 100% !important;
21
+ .ant-select,
22
+ .ant-input-number,
23
+ .ant-calendar-picker {
24
+ width: 100%;
26
25
  }
27
26
  }
28
27
 
@@ -2,7 +2,7 @@
2
2
  .layout( @w: 100%, @h: 100% ) {
3
3
  width: @w;
4
4
  height: @h;
5
- }
5
+ }
6
6
 
7
7
  /* 正方体盒子 */
8
8
  .square(@size) {
@@ -9,7 +9,7 @@
9
9
  <script>
10
10
 
11
11
  export default {
12
- name: "svgIcon",
12
+ name: "SvgIcon",
13
13
  props: {
14
14
  iconClass: {
15
15
  type: String,
@@ -59,19 +59,3 @@ export default {
59
59
  }
60
60
  };
61
61
  </script>
62
-
63
- <style scoped lang="less">
64
- .svg-icon {
65
- width: 90px;
66
- height: 90px;
67
- vertical-align: -0.15em;
68
- fill: currentColor;
69
- overflow: hidden;
70
- }
71
-
72
- .svg-external-icon {
73
- background-color: currentColor;
74
- mask-size: cover;
75
- display: inline-block;
76
- }
77
- </style>
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -0,0 +1,15 @@
1
+ @import '~ant-design-vue/lib/style/themes/default.less';
2
+ @import '../../style/mixins.less';
3
+
4
+ .svg-icon {
5
+ vertical-align: -0.15em;
6
+ fill: currentColor;
7
+ overflow: hidden;
8
+ .square(24px);
9
+ }
10
+
11
+ .svg-external-icon {
12
+ background-color: currentColor;
13
+ mask-size: cover;
14
+ display: inline-block;
15
+ }
@@ -12,7 +12,7 @@
12
12
  v-on="$listeners"
13
13
  v-bind="setAttrs"
14
14
  class="WebComponentTable__List"
15
- >
15
+ >
16
16
  <!-- 下次更改一下title的传递方式 -->
17
17
  <div class="WebComponentTable__List__Title" ref="TableListTitle" slot="title">
18
18
  <slot name="ATableTitle" />
@@ -26,7 +26,7 @@
26
26
  <template #customRender="text, record, i, column">
27
27
  <slot :name="column.dataIndex" :customProps="record" :text="text" :index="i" />
28
28
  </template>
29
- </Table>
29
+ </Table>
30
30
 
31
31
  <div class="WebComponentTable__Pagination" ref="TablePagination">
32
32
  <slot name="ATablePagination">
@@ -62,7 +62,7 @@ export default {
62
62
  Table,
63
63
  Pagination
64
64
  },
65
- name: 'uTable',
65
+ name: 'WTable',
66
66
  data() {
67
67
  return {
68
68
  pagination: {
@@ -210,8 +210,4 @@ export default {
210
210
  }
211
211
  }
212
212
  }
213
- </script>
214
-
215
- <style lang="less" scoped>
216
- @import url('./style/index.less');
217
- </style>
213
+ </script>
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -1,16 +1,12 @@
1
- /* 混入样式 */
2
- @import url('../../style/mixins.less');
3
1
  @import '~ant-design-vue/lib/style/themes/default.less';
2
+ @import '../../style/mixins.less';
4
3
 
5
4
  .WebComponentTable {
6
5
  .layout();
7
- .flex-layout( column, 16px 0 );
8
-
9
- &__Head {
10
-
11
- }
6
+ .flex-layout(column, @padding-md 0);
12
7
 
13
8
  &__List {
9
+ flex: 1;
14
10
 
15
11
  &__Title {
16
12
  display: flex;
@@ -18,9 +14,8 @@
18
14
  }
19
15
 
20
16
  &__Empty {
21
- gap: 16px 0;
22
17
  height: 120px;
23
- .flex-mixins( column );
18
+ .flex-mixins(column, @gap: @padding-md 0);
24
19
 
25
20
  i {
26
21
  font-size: 80px;
@@ -31,20 +26,24 @@
31
26
  }
32
27
  }
33
28
 
34
- :deep(.ant-table-title) {
29
+ .ant-table-title {
35
30
  padding: 0;
36
31
  margin-bottom: @padding-sm;
37
32
  }
38
33
 
39
- :deep(.ant-table-body) {
34
+ .ant-table-header {
35
+ overflow-y: hidden !important;
36
+ }
37
+
38
+ .ant-table-body {
40
39
  .scrollbarStyle();
41
- }
40
+ }
42
41
 
43
42
  }
44
43
 
45
44
  &__Pagination {
46
45
  display: flex;
47
- justify-content: flex-end;
46
+ justify-content: center;
48
47
  }
49
48
 
50
49
  }
package/lib/tree/index.js CHANGED
@@ -1,17 +1,8 @@
1
1
  /* 查询tree穿梭 */
2
- import Tree from './Tree.vue'
3
- /* treeMenu树形菜单目录 */
4
- import Directory from './Directory.js'
2
+ import Tree from './index.vue'
5
3
 
6
4
  Tree.install = function (Vue) {
7
5
  Vue.component(Tree.name, Tree)
8
6
  }
9
7
 
10
- Directory.install = function (Vue) {
11
- Vue.component(Directory.name, Directory)
12
- }
13
-
14
- export {
15
- Tree,
16
- Directory
17
- }
8
+ export default Tree
@@ -36,12 +36,12 @@
36
36
  </template>
37
37
 
38
38
  <script>
39
- import { Tree, Checkbox, Input } from 'ant-design-vue'
40
39
 
40
+ import { Tree, Checkbox, Input } from 'ant-design-vue'
41
41
  import { getTreeKey, findCheckNodes } from '../../utils/Tree'
42
42
 
43
43
  export default {
44
- name: 'TreeTransfer',
44
+ name: 'WTree',
45
45
  components: {
46
46
  Tree,
47
47
  InputSearch: Input.Search,
@@ -176,6 +176,3 @@ export default {
176
176
  }
177
177
  }
178
178
  </script>
179
- <style lang="less" scoped>
180
- @import url('./style/Tree.less');
181
- </style>
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -1,6 +1,5 @@
1
- /* 混入样式 */
1
+ @import '~ant-design-vue/lib/style/themes/default.less';
2
2
  @import '../../style/mixins.less';
3
- @import 'ant-design-vue/lib/style/themes/default.less';
4
3
 
5
4
  .publicTreeCheck {
6
5
  display: flex;
@@ -17,6 +16,7 @@
17
16
 
18
17
  .TreeSelect {
19
18
  border-right: 1px solid @border-color-split;
19
+ box-sizing: border-box;
20
20
  }
21
21
 
22
22
  .TreeReveal {
@@ -35,11 +35,11 @@
35
35
 
36
36
  .TreeListPage {
37
37
  .scrollbarStyle();
38
- :deep(.ant-checkbox-group) {
38
+ .ant-checkbox-group {
39
39
  width: 100%;
40
40
  .flex-layout( column );
41
41
  }
42
- :deep(.ant-checkbox-group-item) {
42
+ .ant-checkbox-group-item {
43
43
  height: 40px;
44
44
  display: flex;
45
45
  align-items: center;
@@ -9,7 +9,7 @@
9
9
  <script>
10
10
 
11
11
  export default {
12
- name: 'weather',
12
+ name: 'Weather',
13
13
  props: {
14
14
  /** 当前城市高德code编码 */
15
15
  adCode: String,
@@ -48,11 +48,3 @@ export default {
48
48
  }
49
49
  }
50
50
  </script>
51
-
52
- <style scoped lang="less">
53
- .weather {
54
- display: flex;
55
- gap: 0 14px;
56
- font-size: 16px;
57
- }
58
- </style>
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -0,0 +1,7 @@
1
+ @import '~ant-design-vue/lib/style/themes/default.less';
2
+ @import '../../style/mixins.less';
3
+
4
+ .weather {
5
+ font-size: @font-size-lg;
6
+ .flex-layout(@flexGap: 0 14px);
7
+ }
package/package.json CHANGED
@@ -1,66 +1,48 @@
1
1
  {
2
2
  "name": "web-component-gallery",
3
- "version": "1.3.12",
4
- "description": "基于Vue2的Web Components组件库",
3
+ "version": "2.0.2",
4
+ "description": "基础vue、antdvue、less实现的私有组件库",
5
5
  "main": "dist/index.umd.js",
6
6
  "files": [
7
7
  "dist",
8
- "plugins",
8
+ "extensions",
9
+ "font",
9
10
  "lib",
10
- "utils",
11
- "method"
11
+ "utils"
12
12
  ],
13
13
  "scripts": {
14
+ "build": "webpack --config ./webpack.config.js",
14
15
  "serve": "vue-cli-service serve",
15
- "build": "vue-cli-service build",
16
- "lint": "vue-cli-service lint",
17
- "build:js": "webpack --config ./webpack.config.js",
18
- "build:css": "npx gulp",
19
- "build:lib": "npm run build:js && npm run build:css"
16
+ "lint": "vue-cli-service lint"
20
17
  },
21
18
  "peerDependencies": {
22
- "@amap/amap-jsapi-loader": "^1.0.1",
23
- "ant-design-vue": "1.7.8",
24
- "vue": "^2.6.14"
19
+ "@amap/amap-jsapi-loader": "^1.0.1"
25
20
  },
26
21
  "dependencies": {
27
- "dompurify": "^3.2.4",
28
- "luxon": "^1.21.3"
22
+ "core-js": "^3.8.3",
23
+ "vue": "^2.6.14"
29
24
  },
30
25
  "devDependencies": {
31
- "@babel/core": "^7.12.16",
26
+ "@amap/amap-jsapi-loader": "^1.0.1",
27
+ "@babel/core": "^7.28.0",
32
28
  "@babel/eslint-parser": "^7.12.16",
33
- "@vue/babel-plugin-transform-vue-jsx": "^1.4.0",
29
+ "@babel/preset-env": "^7.28.0",
30
+ "@vue/babel-preset-jsx": "^1.4.0",
34
31
  "@vue/cli-plugin-babel": "~5.0.0",
35
32
  "@vue/cli-plugin-eslint": "~5.0.0",
36
- "@vue/cli-plugin-router": "~5.0.0",
37
- "@vue/cli-plugin-vuex": "~5.0.0",
38
33
  "@vue/cli-service": "~5.0.0",
39
34
  "ant-design-vue": "1.7.8",
40
35
  "babel-loader": "^9.1.3",
41
- "babel-plugin-import": "^1.13.8",
42
36
  "clean-webpack-plugin": "^4.0.0",
43
- "css-loader": "^5.2.6",
44
37
  "eslint": "^7.32.0",
45
38
  "eslint-plugin-vue": "^8.0.3",
46
- "gulp": "^5.0.0",
47
- "gulp-clean-css": "^4.3.0",
48
- "gulp-less": "^5.0.0",
49
39
  "less": "^3.13.1",
50
40
  "less-loader": "^10.0.0",
51
41
  "mini-css-extract-plugin": "2.4.5",
52
- "postcss-loader": "^8.1.1",
53
- "style-loader": "^3.0.0",
54
- "style-resources-loader": "^1.5.0",
55
- "through2": "^4.0.2",
56
- "url-loader": "^4.1.1",
57
- "vue": "^2.6.14",
58
- "vue-cli-plugin-style-resources-loader": "^0.1.5",
42
+ "terser-webpack-plugin": "^5.3.14",
59
43
  "vue-loader": "^15.10.1",
60
44
  "vue-template-compiler": "^2.6.14",
61
- "vuex": "^3.6.2",
62
- "webpack-cli": "^5.1.4",
63
- "webpack-merge": "5.0.0"
45
+ "webpack-cli": "^6.0.1"
64
46
  },
65
47
  "eslintConfig": {
66
48
  "root": true,