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
package/dist/style.css ADDED
@@ -0,0 +1,17 @@
1
+ /* stylelint-disable at-rule-empty-line-before,at-rule-name-space-after,at-rule-no-unknown */
2
+ /* stylelint-disable no-duplicate-selectors */
3
+ /* stylelint-disable */
4
+ /* stylelint-disable declaration-bang-space-before,no-duplicate-selectors,string-no-newline */
5
+ /* 布局( 纯为了不想多写一行 */
6
+ /* 正方体盒子 */
7
+ /* 滚动条样式 */
8
+ /* 文字换行省略(默认1行)*/
9
+ /* flex布局 */
10
+ /* flex排版方式 */
11
+ .weather {
12
+ font-size: 16px;
13
+ display: flex;
14
+ gap: 0 14px;
15
+ flex-direction: row;
16
+ }
17
+
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.rui=t():e.rui=t()}(self,function(){return function(){var e={71765:function(e,t,o){"use strict";o.r(t)}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var u=t[r]={exports:{}};return e[r](u,u.exports,o),u.exports}o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};return o(71765),{}}()});
@@ -1,6 +1,3 @@
1
- // amap-plugin.js
2
- // import AMapLoader from '@amap/amap-jsapi-loader'
3
-
4
1
  /** 入口文件不同 作用域不同 */
5
2
  let AMapKey = null
6
3
  let AMapStyle = null
@@ -236,9 +233,8 @@ export const getAMapInstance = async (options = {}) => {
236
233
  }
237
234
  }
238
235
 
239
- const AMapLoader = (await import('@amap/amap-jsapi-loader')).default
240
-
241
236
  try {
237
+ const AMapLoader = (await import('@amap/amap-jsapi-loader')).default
242
238
  const AMap = await AMapLoader.load({
243
239
  key: AMapKey,
244
240
  version: '2.0',
@@ -1,8 +1,8 @@
1
1
  import Modal from 'ant-design-vue/es/modal'
2
- import {Brower} from './lib/index.js'
2
+ import {Browse} from '../lib/index'
3
3
 
4
4
  const defaultComponents = {
5
- Brower
5
+ Browse
6
6
  }
7
7
 
8
8
  export default Vue => {
@@ -1,4 +1,4 @@
1
-
1
+ /** 加载antDesignVue */
2
2
  import {
3
3
  Input,
4
4
  InputNumber,
@@ -14,7 +14,16 @@ import {
14
14
  notification
15
15
  } from 'ant-design-vue'
16
16
 
17
- /** 按需加载antDesignVue */
17
+ /** 全局便捷弹出框 */
18
+ import Dialog from "./Dialog"
19
+ /** 全局页面加载框 */
20
+ import PageLoading from "./PageLoading"
21
+ /**
22
+ * 全局切换主题
23
+ * @theme 主题key 使用方法: this.$setTheme(@theme)
24
+ * */
25
+ import setTheme from './Theme'
26
+
18
27
  export default {
19
28
  install(Vue) {
20
29
 
@@ -36,5 +45,10 @@ export default {
36
45
  Vue.prototype.$success = Modal.success
37
46
  Vue.prototype.$error = Modal.error
38
47
  Vue.prototype.$warning = Modal.warning
48
+
49
+ /** 加载便捷弹窗等 */
50
+ Vue.use(Dialog)
51
+ Vue.use(PageLoading)
52
+ Vue.use(setTheme)
39
53
  }
40
54
  }
@@ -1,8 +1,6 @@
1
1
  import PropTypes from 'ant-design-vue/es/_util/vue-types'
2
- import { FormComp, Button } from '../../../index'
3
- import { getAMapInstance } from '../../../../method/AMap.js'
4
-
5
- import './index.less'
2
+ import { FormComp, Button } from '../index.js'
3
+ import { getAMapInstance } from '../../extensions/AMap.js'
6
4
 
7
5
  const { ASelectCustom } = FormComp
8
6
 
@@ -55,7 +53,7 @@ const AmapSearch = {
55
53
  labelKey: 'label',
56
54
  options: selectOptions,
57
55
  placeholder: '请输入目的地进行搜索'
58
- }
56
+ }
59
57
 
60
58
  return (
61
59
  <div class="AmapDraw__Search">
@@ -0,0 +1,18 @@
1
+ /* 地图搜索 */
2
+ import AmapSearch from './AmapSearch'
3
+
4
+ const components = {
5
+ AmapSearch
6
+ }
7
+
8
+ const install = function (Vue) {
9
+ if (install.installed) return
10
+ Object.keys(components).forEach(component => {
11
+ Vue.component(components[component].name, components[component])
12
+ })
13
+ }
14
+
15
+ export default {
16
+ install,
17
+ ...components
18
+ }
@@ -1,7 +1,10 @@
1
+ @import '~ant-design-vue/lib/style/themes/default.less';
2
+ @import '../../style/mixins.less';
3
+
1
4
  .AmapDraw__Search {
2
5
  display: flex;
3
6
  align-items: center;
4
- width: calc(100% - 16px);
7
+ width: calc(100% - 16px);
5
8
 
6
9
  .ASelectCustom {
7
10
  width: 346px;
@@ -9,8 +12,7 @@
9
12
 
10
13
  &__Button {
11
14
  flex: 1;
12
- gap: 0 8px;
13
- display: flex;
14
15
  justify-content: flex-end;
16
+ .flex-layout(@flexGap: 0 @padding-xs);
15
17
  }
16
18
  }
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -0,0 +1 @@
1
+ @import './AmapSearch.less';
@@ -1,8 +1,6 @@
1
- import AmapSearch from './components/AmapSearch/index.jsx'
1
+ import AmapSearch from '../amap-comp/AmapSearch.jsx'
2
2
  import PropTypes from 'ant-design-vue/es/_util/vue-types'
3
- import { getAMapInstance } from '../../method/AMap.js'
4
-
5
- import './AmapDraw.less'
3
+ import { getAMapInstance } from '../../extensions/AMap.js'
6
4
 
7
5
  export const AmapDrawProps = {
8
6
  /** drawEl为地图容器实例名称 */
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -1,5 +1,7 @@
1
- @import '../style/mixins.less';
2
- @import 'ant-design-vue/lib/style/themes/default.less';
1
+ @import '~ant-design-vue/lib/style/themes/default.less';
2
+ @import '../../style/mixins.less';
3
+ // 按需引入对应模块样式
4
+ @import '../../amap-comp/style/AmapSearch.less';
3
5
 
4
6
  .AmapDraw {
5
7
  position: relative;
@@ -27,6 +29,7 @@
27
29
  color: fade(@white, 70%);
28
30
  letter-spacing: 0.2em;
29
31
  writing-mode: vertical-rl;
32
+ background: @component-background;
30
33
  .flex-mixins();
31
34
  }
32
35
 
@@ -41,5 +44,5 @@
41
44
  #AmapDraw {
42
45
  width: 100%;
43
46
  min-height: 304px;
44
- }
47
+ }
45
48
  }
@@ -1,7 +1,5 @@
1
1
  import PropTypes from 'ant-design-vue/es/_util/vue-types'
2
2
 
3
- import './index.less'
4
-
5
3
  import { Base64 } from '../../utils/Base64'
6
4
 
7
5
  import { getPictureAttrs } from '../../utils/Utils'
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -10,7 +10,7 @@ const PopconfirmProps = {
10
10
  }
11
11
 
12
12
  export default {
13
- name: "Button",
13
+ name: "WButton",
14
14
  props: {
15
15
  buttonProps: {
16
16
  type: [ Array, Object ],
@@ -55,7 +55,6 @@ export default {
55
55
  )
56
56
  },
57
57
  ButtonRender( props ) {
58
- // const buttonEvent = props.type
59
58
  return (
60
59
  <Button
61
60
  props={ props }
@@ -74,7 +73,6 @@ export default {
74
73
  },
75
74
  render() {
76
75
  const { buttonProps, SwitchButton } = this
77
- // console.log( buttonProps.constructor === Array )
78
76
 
79
77
  return (
80
78
  <div class='ButtonDiversity'>
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -11,7 +11,7 @@
11
11
  import {formatDate} from '../../utils/Filter'
12
12
 
13
13
  export default {
14
- name: 'dateTime',
14
+ name: 'DateTime',
15
15
  data() {
16
16
  return {
17
17
  time: new Date(),
@@ -22,22 +22,12 @@ export default {
22
22
  formatDate
23
23
  },
24
24
  mounted() {
25
- this.timer = setInterval(
25
+ this.timer = setInterval(
26
26
  () => this.time = new Date(), 1000 )
27
27
  },
28
28
  destroyed() {
29
29
  clearInterval(this.timer)
30
30
  this.timer = null
31
- },
32
- methods: {
33
31
  }
34
32
  }
35
- </script>
36
-
37
- <style scoped lang="less">
38
- .dateTime {
39
- display: flex;
40
- gap: 0 14px;
41
- font-size: 16px;
42
- }
43
- </style>
33
+ </script>
@@ -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
+ .dateTime {
5
+ font-size: @font-size-lg;
6
+ .flex-layout(@flexGap: 0 14px);
7
+ }
@@ -8,8 +8,6 @@ const {
8
8
  Item: DescriptionsItem
9
9
  } = Descriptions
10
10
 
11
- import './index.less'
12
-
13
11
  const descDefaultAttrs = {
14
12
  size: 'middle',
15
13
  bordered: true
@@ -41,7 +39,7 @@ const renderContent = (h, item, details) => {
41
39
  }
42
40
 
43
41
  const DescriptionsList = {
44
- name: 'Descriptions',
42
+ name: 'DescriptionsList',
45
43
  props: DescriptionsProps,
46
44
  render(h, content) {
47
45
  const { title, column, descAttrs, descDetails, descSettings, $slots, $scopedSlots } = this
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -1,17 +1,12 @@
1
- import { h } from 'vue'
2
- import { getTreeKey, filterTreeById } from '../../utils/Tree'
3
- import { Tree, Menu, Input, Icon, Button, Dropdown, Popconfirm } from 'ant-design-vue'
4
- import './style/Directory.less'
1
+ import { Tree, Input, Icon, Button, Dropdown } from 'ant-design-vue'
5
2
 
6
- import SvgIcon from '../svgIcon'
7
-
8
- /* 明天来了做一下@快捷指向 */
3
+ import SvgIcon from '../svg-icon'
9
4
 
10
5
  const TreeNode = Tree.TreeNode
11
6
  const DirectoryTree = Tree.DirectoryTree
12
7
 
13
8
  export default {
14
- name: 'DirectoryTreeMenu',
9
+ name: 'WDirectory',
15
10
  props: {
16
11
  treeData: {
17
12
  type: Array,
@@ -60,7 +55,6 @@ export default {
60
55
  },
61
56
  mounted() {
62
57
  this.onInitTree()
63
- // this.NodeExpandKeys = ( this.treeExpandKeys.length && this.treeExpandKeys ) || ( treeExpend && getTreeKey(this.treeData, true, this.replaceFields) ) || []
64
58
  },
65
59
  watch: {
66
60
  treeData(newValue, oldValue) {
@@ -267,7 +261,6 @@ export default {
267
261
  },
268
262
  onInitTree(treeExpend = true) {
269
263
  this.treeData && (this.NodeSelectedKeys = [this.treeData.at(0)?.[this.replaceFields.key]])
270
- // this.NodeExpandKeys = ( this.treeExpandKeys.length && this.treeExpandKeys ) || ( treeExpend && getTreeKey(this.treeData, true, this.replaceFields) ) || []
271
264
  },
272
265
  onCheck(keys, {}) {
273
266
  this.NodeCheckedKeys = keys
@@ -294,24 +287,15 @@ export default {
294
287
  id: node._props.eventKey,
295
288
  title: node._props.title,
296
289
  parentOrgId: node.$parent.eventKey || null
297
- }
298
- // this.MenuDropdown = false
290
+ }
299
291
  this.NodeKey = [].concat(this.NodeSelectedKeys)
300
292
  this.NodeKey.push(node.eventKey)
301
- // console.log(node, 'handleMouseEnter')
302
- // 是否加个参数 判断是否处于打开状态
303
293
  },
304
294
  handleMouseLeave({ event, node }) {
305
295
  if( this.NodeKey.includes(node.eventKey) && this.NodeSelectedKeys != node.eventKey ) {
306
296
  const i = this.NodeKey.findIndex( key => key == node.eventKey )
307
297
  this.NodeKey.splice( i, 1 )
308
298
  }
309
- // this.NodeKey = []
310
- },
311
- onDragEnter(node) {
312
- console.log(node, '--onDragEnter')
313
- // expandedKeys 需要受控时设置
314
- // this.expandedKeys = info.expandedKeys
315
299
  },
316
300
  onDrop(info) {
317
301
 
@@ -357,7 +341,6 @@ export default {
357
341
  let dropIndex
358
342
  loop(data, dropKey, (node, i, array) => {
359
343
  dropIndex = i
360
- console.log( node, i, dragObj, dragObjIndex, '--i' )
361
344
  })
362
345
 
363
346
  this.$emit(
@@ -0,0 +1,8 @@
1
+ /* treeMenu树形菜单目录 */
2
+ import Directory from './Directory.js'
3
+
4
+ Directory.install = function (Vue) {
5
+ Vue.component(Directory.name, Directory)
6
+ }
7
+
8
+ export default Directory
@@ -0,0 +1 @@
1
+ require('./index.less');
@@ -1,6 +1,5 @@
1
- /* 混入样式 */
2
- @import '../../style/mixins.less';
3
1
  @import '~ant-design-vue/lib/style/themes/default.less';
2
+ @import '../../style/mixins.less';
4
3
 
5
4
  .DirectoryTreeMenu {
6
5
  height: 100%;
@@ -46,7 +45,7 @@
46
45
  }
47
46
  }
48
47
 
49
- :deep(.ant-btn) {
48
+ .ant-btn {
50
49
  line-height: 16px;
51
50
  margin-right: @padding-sm;
52
51
  border-color: @white;
@@ -69,10 +68,10 @@
69
68
 
70
69
  .DirectoryTreeMenu__Dropdown {
71
70
  &__Menu {
72
- .layout( 140px, auto );
73
71
  padding: @padding-xs 0;
74
72
  box-sizing: border-box;
75
73
  border-radius: @border-radius-sm;
74
+ .layout( 140px, auto );
76
75
 
77
76
  span {
78
77
  display: flex;
@@ -123,7 +123,7 @@
123
123
  }
124
124
  };
125
125
  export default {
126
- name: "gbAntSelectMultipleCascader",
126
+ name: "ACascaderMultiple",
127
127
  components: {
128
128
  VNodes: {
129
129
  functional: true,
@@ -658,109 +658,4 @@
658
658
  }
659
659
  };
660
660
  </script>
661
- <style lang="less">
662
- .gb-ant-select-multiple-cascader {
663
- .ant-select-dropdown-menu-item {
664
- display: none;
665
- }
666
- .cascader-content-item {
667
- .checkbox-text {
668
- padding-left: 8px;
669
- font-size: 12px;
670
- color: #4a4a4a;
671
- cursor: default;
672
- flex: 1;
673
- overflow: hidden;
674
- text-overflow: ellipsis;
675
- white-space: nowrap;
676
- text-align: left;
677
- }
678
- &.cascader-content-item-active {
679
- background-color: rgba(66, 70, 86, 0.05);
680
- .checkbox-text {
681
- color: #1d47aa;
682
- }
683
- }
684
- .ant-checkbox-wrapper {
685
- .ant-checkbox-indeterminate {
686
- .ant-checkbox-inner {
687
- &:after {
688
- background-color: #1d47aa;
689
- left: 48%;
690
- }
691
- }
692
- }
693
- .ant-checkbox-inner {
694
- width: 14px;
695
- height: 14px;
696
- background-color: #fff;
697
- border-color: #7d8292;
698
- &:after {
699
- border-color: #1d47aa;
700
- left: 20%;
701
- }
702
- }
703
- }
704
- }
705
- .ant-select-dropdown--multiple {
706
- min-width: auto !important;
707
- }
708
- &.multiple-cascader-outside {
709
- .ant-select-arrow {
710
- transform: rotate(180deg);
711
- }
712
- }
713
- .ant-select-arrow {
714
- margin-top: -8px;
715
- transition: transform 0.3s;
716
- }
717
- .ant-select-dropdown-menu-root {
718
- display: none;
719
- }
720
- .cascader-content-right {
721
- .right-wrap {
722
- .ant-checkbox {
723
- top: 0;
724
- }
725
- }
726
- }
727
- }
728
- </style>
729
- <style lang="less" scoped>
730
- .gb-ant-select-multiple-cascader {
731
- position: relative;
732
- .cascader-content-wrap {
733
- height: 100%;
734
- .cascader-content-container {
735
- display: flex;
736
- flex-direction: row;
737
- .cascader-content-list {
738
- list-style: none;
739
- padding: 0;
740
- margin: 0;
741
- width: 153px;
742
- box-sizing: border-box;
743
- padding: 11px 0;
744
- max-height: 160px;
745
- overflow-y: auto;
746
- border-right: 1px solid rgba(222, 223, 226, 0.3);
747
- .cascader-content-item {
748
- padding: 5px 16px;
749
- margin-top: 5px;
750
- display: flex;
751
- flex-direction: row;
752
- align-items: center;
753
- line-height: 1;
754
- &:hover {
755
- background-color: rgba(66, 70, 86, 0.05);
756
- }
757
- }
758
- }
759
- }
760
- }
761
- .cascader-not-content {
762
- padding: 10px;
763
- }
764
- }
765
- </style>
766
661
 
@@ -0,0 +1,70 @@
1
+ <template>
2
+ <RadioGroup
3
+ v-bind="filteredAttrs"
4
+ v-on="$listeners"
5
+ class="TAntdRadio"
6
+ :value="value"
7
+ @change="handleChange"
8
+ >
9
+ <template v-if="!$attrs.options">
10
+ <component
11
+ :is="radioType"
12
+ v-for="child in internalOptions"
13
+ :key="child[valueKey]"
14
+ :value="child[valueKey]"
15
+ >
16
+ {{ child[labelKey] }}
17
+ </component>
18
+ </template>
19
+ </RadioGroup>
20
+ </template>
21
+
22
+ <script>
23
+ import { Radio } from 'ant-design-vue'
24
+
25
+ export default {
26
+ name: 'ARadio',
27
+ components: {
28
+ Radio,
29
+ RadioGroup: Radio.Group,
30
+ RadioButton: Radio.Button
31
+ },
32
+ props: {
33
+ value: {
34
+ type: [String, Number, Boolean],
35
+ required: true
36
+ },
37
+ radioType: {
38
+ type: String,
39
+ default: 'Radio',
40
+ validator: value => ['Radio', 'RadioButton'].includes(value)
41
+ },
42
+ valueKey: {
43
+ type: String,
44
+ default: 'value'
45
+ },
46
+ labelKey: {
47
+ type: String,
48
+ default: 'label'
49
+ },
50
+ options: {
51
+ type: Array,
52
+ default: () => []
53
+ }
54
+ },
55
+ computed: {
56
+ filteredAttrs() {
57
+ const { options, ...rest } = this.$attrs
58
+ return rest
59
+ },
60
+ internalOptions() {
61
+ return this.options.length > 0 ? this.options : []
62
+ }
63
+ },
64
+ methods: {
65
+ handleChange(e) {
66
+ this.$emit('input', e.target.value)
67
+ }
68
+ }
69
+ }
70
+ </script>
@@ -5,7 +5,7 @@
5
5
  v-bind="startPickerAttrs"
6
6
  @openChange="handleStartOpenChange"
7
7
  />
8
- ~
8
+ <span class="separator">~</span>
9
9
  <DatePicker
10
10
  v-model="date[1]"
11
11
  :open="endOpen"
@@ -26,6 +26,7 @@ import moment from 'moment'
26
26
  import { DatePicker } from 'ant-design-vue'
27
27
 
28
28
  export default {
29
+ name: 'ARangePicker',
29
30
  components: { DatePicker },
30
31
  model: {
31
32
  prop: 'value',
@@ -39,18 +40,18 @@ export default {
39
40
  },
40
41
  props: {
41
42
  value: {
42
- type: Array,
43
- default: () => ([])
43
+ type: Array,
44
+ default: () => ([])
44
45
  },
45
46
  /* 开始日期配置项 */
46
47
  startConfig: {
47
- type: Object,
48
- default: () => ({})
48
+ type: Object,
49
+ default: () => ({})
49
50
  },
50
51
  /* 结束日期配置项 */
51
52
  endConfig: {
52
- type: Object,
53
- default: () => ({})
53
+ type: Object,
54
+ default: () => ({})
54
55
  }
55
56
  },
56
57
  watch: {
@@ -114,16 +115,4 @@ export default {
114
115
  }
115
116
  }
116
117
  }
117
- </script>
118
- <style lang="less" scoped>
119
- .ADatePicker {
120
- width: 100%;
121
- display: flex;
122
- align-items: center;
123
- gap: 0 6px;
124
-
125
- .ant-calendar-picker {
126
- flex: 1;
127
- }
128
- }
129
- </style>
118
+ </script>
@@ -59,7 +59,7 @@
59
59
  import { Select, Checkbox, Pagination } from 'ant-design-vue'
60
60
 
61
61
  export default {
62
- name: 'TAntdSelect',
62
+ name: 'ASelectCustom',
63
63
  components: {
64
64
  VNodes: {
65
65
  functional: true,
@@ -217,10 +217,3 @@ export default {
217
217
  }
218
218
  }
219
219
  </script>
220
- <style lang="less" scoped>
221
- // 添加flex属性解决css中div莫名高度
222
- .ASelectCustom {
223
- width: 100%;
224
- // display: flex;
225
- }
226
- </style>