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,53 +0,0 @@
1
-
2
- .FormModel {
3
- display: flex;
4
- flex-wrap: wrap;
5
-
6
- &__LabelTips {
7
- width: 100%;
8
- }
9
-
10
- .ant-select,
11
- .ant-input-number,
12
- .ant-calendar-picker {
13
- width: 100% !important;
14
- }
15
-
16
- .ant-form-item-children {
17
- display: flex;
18
- align-items: center;
19
- }
20
-
21
- .FormLine {
22
- display: flex;
23
-
24
- :deep(.ant-form-item-label) {
25
- width: 85px;
26
- text-align: right;
27
- }
28
-
29
- :deep(.ant-form-item-control-wrapper) {
30
- width: calc(100% - 85px);
31
- }
32
- }
33
-
34
- .FormLineVertical {
35
- display: flex;
36
- flex-direction: column;
37
-
38
- :deep(.ant-form-item-label) {
39
- text-align: left;
40
- width: 100%;
41
- }
42
-
43
- :deep(.ant-form-item-control-wrapper) {
44
- width: 100%;
45
- }
46
- }
47
-
48
- .MultipleForm {
49
- display: flex;
50
- flex-wrap: wrap;
51
- align-items: center;
52
- }
53
- }
@@ -1,16 +0,0 @@
1
- /** 根据属性类型重置数据初始化 */
2
- export function resetFields(formObj) {
3
- const initialForm = {}
4
- for (const key in formObj) {
5
- if ( formObj[key] === null || typeof formObj[key] !== 'object') {
6
- initialForm[key] = ''
7
- }
8
- else if( Array.isArray(formObj[key]) ) {
9
- initialForm[key] = []
10
- }
11
- else { initialForm[key] = {} }
12
- }
13
- return initialForm
14
- }
15
-
16
- export default resetFields
@@ -1,2 +0,0 @@
1
- import Vue from 'vue'
2
- export default new Vue()
@@ -1,234 +0,0 @@
1
- import PropTypes from 'ant-design-vue/es/_util/vue-types'
2
-
3
- import Modal from '../modal/index.jsx'
4
-
5
- import { Spin, Icon } from 'ant-design-vue'
6
-
7
- // const IconFont = Icon.createFromIconfontCN({
8
- // scriptUrl: '//at.alicdn.com/t/c/font_4641025_trbtf28ob8g.js'
9
- // })
10
-
11
- // Spin.setDefaultIndicator({
12
- // indicator: {
13
- // render() {
14
- // return <IconFont type="icon-loading" />
15
- // }
16
- // }
17
- // })
18
-
19
- Spin.setDefaultIndicator({
20
- indicator: {
21
- render() {
22
- return <Icon type="loading" />
23
- }
24
- }
25
- })
26
-
27
- import IframeEvent from './events.js'
28
-
29
- import './index.less'
30
-
31
- const IframeContainerProps = {
32
- activeKey: PropTypes.string,
33
- checkedKey: PropTypes.string.def('name'),
34
- linkurlKey: PropTypes.string.def('linkUrl'),
35
- operatesArr: PropTypes.array,
36
- componentsArr: PropTypes.array,
37
- postMessage: PropTypes.object
38
- }
39
-
40
- const IframeContainer = {
41
- name: 'IframeComp',
42
- props: IframeContainerProps,
43
- data () {
44
- return {
45
- /** 页面加载状态 */
46
- compSpinning: true,
47
- componentAdd: true,
48
- /** 弹窗加载状态 */
49
- modalSpinning: true,
50
- modalComponents: {}
51
- }
52
- },
53
- render(h, content) {
54
- const { $props, modalComponents } = this
55
-
56
- const { activeKey, checkedKey, componentsArr } = $props
57
-
58
- const IframeComponents = componentsArr.map(componentItem => {
59
- const isActive = activeKey === componentItem[checkedKey]
60
- return this.getIframeComponent( componentItem, isActive )
61
- })
62
-
63
- const modalKeys = Object.keys(modalComponents)
64
-
65
- const ModalOperates = modalKeys.map(modalKey => {
66
- return (
67
- <Modal
68
- {...{
69
- props: {
70
- ...modalComponents[modalKey],
71
- cancelHandle: () => this.closeModalHandle(modalKey)
72
- }
73
- }}>
74
- <Spin spinning={this.modalSpinning} tip="加载中...">
75
- { this.getIframeComponent(modalComponents[modalKey], true) }
76
- </Spin>
77
- </Modal>
78
- )
79
- })
80
-
81
- return (
82
- <div class="ant-pro-grid-content-page">
83
- <Spin spinning={this.compSpinning} tip="加载中...">
84
- {IframeComponents}
85
- </Spin>
86
- {ModalOperates}
87
- </div>
88
- )
89
-
90
- },
91
- watch: {
92
- activeKey(newVal) {
93
- this.modalComponents = {}
94
- },
95
- componentsArr: {
96
- handler(newVal, oldVal) {
97
- this.componentAdd = newVal.length > oldVal.length
98
- this.postCompMessage()
99
- },
100
- deep: true
101
- }
102
- },
103
- computed: {
104
- activeKeyAndParams() {
105
- const {activeKey, postMessage, componentsArr} = this
106
- return {
107
- activeKey,
108
- postMessage,
109
- componentsArr
110
- }
111
- }
112
- },
113
- created() {
114
- IframeEvent.$on('modalOpen', ({ name, params }) => {
115
- const activeModal = this.switchModalHandle(name, params)
116
- activeModal && (
117
- this.componentAdd = true,
118
- this.$set(
119
- this.modalComponents, name, {
120
- mode: params.mode,
121
- visible: true,
122
- ...activeModal
123
- })
124
- )
125
- })
126
- IframeEvent.$on('modalClose', ({ name, params }) => {
127
- this.closeModalHandle(name)
128
- params && (
129
- this.componentAdd = false,
130
- this.postCompMessage(params)
131
- )
132
- })
133
- IframeEvent.$on('modalGoBack', ({ name, params }, closeModal) => {
134
- this.componentAdd = false
135
- this.closeModalHandle(closeModal)
136
- this.switchModalHandle(name, params)
137
- })
138
- },
139
- mounted() {
140
- // this.postCompMessage()
141
- },
142
- methods: {
143
- postCompMessage(data = {}) {
144
- const { componentsArr, activeKey, postMessage } = this
145
- componentsArr.length &&
146
- this.postIframeMessage(componentsArr, {
147
- type: 'refreshPage',
148
- activeKey,
149
- data
150
- })
151
- },
152
- closeModalHandle(name) {
153
- this.modalComponents[name].visible = false
154
- delete this.modalComponents[name]
155
- },
156
- switchModalHandle(name, data) {
157
- const { operatesArr, checkedKey } = this
158
- const activeModal = operatesArr.find( operatesItem => operatesItem[checkedKey] === name )
159
- activeModal && this.postIframeMessage(operatesArr, {
160
- type: 'refreshModal',
161
- activeKey: name,
162
- data
163
- })
164
- return {...activeModal, ...(data.attrs ?? {})}
165
- },
166
- postIframeMessage(components, iframeConfig) {
167
- const { type, activeKey, data = {} } = iframeConfig
168
-
169
- this.$nextTick(() => {
170
-
171
- const { checkedKey, linkurlKey, postMessage } = this
172
- const activeComp = components.find(componentsItem => activeKey === componentsItem[checkedKey])
173
- const refKey = activeComp[linkurlKey]
174
- const isModal = refKey.includes('?type=modal')
175
- const spinningKey = isModal ? 'modalSpinning' : 'compSpinning'
176
-
177
- const iframeRef = () => {
178
- const _self = this
179
- const iframe = this.$refs[refKey]
180
- const iframeWin = this.$refs[refKey]?.contentWindow
181
- const iframeOptions = {
182
- type,
183
- params: {
184
- data,
185
- name: activeKey,
186
- title: isModal ? activeComp.title : activeComp.meta?.title,
187
- routeQuery: postMessage
188
- }
189
- }
190
-
191
- this.componentAdd ? (
192
- this[spinningKey] = true,
193
- iframe.onload = function() {
194
- _self[spinningKey] = false
195
- iframeWin.postMessage(iframeOptions, '*')
196
- } ) :
197
- iframeWin.postMessage(iframeOptions, '*')
198
- }
199
-
200
- if(isModal) {
201
- const timer = setTimeout( () => {
202
- iframeRef()
203
- clearTimeout(timer)
204
- }, 0 )
205
- return
206
- }
207
- iframeRef()
208
- })
209
- },
210
- getIframeComponent(componentItem, isActive) {
211
- const { linkurlKey, checkedKey } = this
212
- return (
213
- <iframe
214
- width="100%"
215
- height="100%"
216
- ref={componentItem[linkurlKey]}
217
- src={componentItem[linkurlKey]}
218
- key={componentItem[checkedKey]}
219
- style={{
220
- border: 'none',
221
- display: isActive ? 'block' : 'none'
222
- }}
223
- />
224
- )
225
- }
226
- }
227
- }
228
-
229
- IframeContainer.install = function (Vue) {
230
- Vue.prototype.$IframeBus = IframeEvent
231
- Vue.component('IframePage', IframeContainer)
232
- }
233
-
234
- export default IframeContainer
@@ -1,19 +0,0 @@
1
- @import '~ant-design-vue/lib/style/themes/default.less';
2
-
3
- .ant-pro-grid-content-page,
4
- .ant-spin-nested-loading,
5
- .ant-spin-container {
6
- width: 100%;
7
- height: 100%;
8
- }
9
-
10
- .ant-spin-nested-loading > div > .ant-spin {
11
- .ant-spin-dot {
12
- font-size: 48px;
13
- }
14
- .ant-spin-text.ant-spin-text {
15
- top: 60%;
16
- padding-left: 36px;
17
- font-size: @font-size-lg;
18
- }
19
- }
@@ -1,72 +0,0 @@
1
- // 按需引入ant-design-vue必要指令组件
2
- // import './lazy_use'
3
-
4
- // 将组件库中定义的所有组件引入并导出
5
- import Table from './table'
6
- import FormComp,{ Model, Search } from './form'
7
- import Button from './button'
8
- import Avatar from './avatar'
9
- import SvgIcon from './svgIcon'
10
- import { Tree, Directory } from './tree'
11
- import DateTime from './dateTime'
12
- import Weather from './weather'
13
- import MultiTab from './multiTab'
14
- import IframePage from './iframe/index.jsx'
15
- import Modal from './modal/index.jsx'
16
- import AmapComp,{ AmapDraw } from './amap'
17
- import Brower from './browse/index.jsx'
18
- import DescriptionsList from './descriptions/index.jsx'
19
-
20
- const components = {
21
- Table,
22
- Model,
23
- Search,
24
- FormComp,
25
- Button,
26
- Avatar,
27
- SvgIcon,
28
- Tree,
29
- Directory,
30
- DateTime,
31
- Weather,
32
- MultiTab,
33
- IframePage,
34
- Modal,
35
- AmapComp,
36
- AmapDraw,
37
- Brower,
38
- DescriptionsList
39
- }
40
-
41
- const install = function (Vue) {
42
- if (install.installed) return
43
- Object.keys(components).forEach(component => {
44
- Vue.component(components[component].name, components[component])
45
- })
46
- }
47
-
48
- export {
49
- Table,
50
- Model,
51
- Search,
52
- FormComp,
53
- Button,
54
- Avatar,
55
- SvgIcon,
56
- Tree,
57
- Directory,
58
- DateTime,
59
- Weather,
60
- MultiTab,
61
- IframePage,
62
- Modal,
63
- AmapComp,
64
- AmapDraw,
65
- Brower,
66
- DescriptionsList
67
- }
68
-
69
- export default {
70
- install,
71
- ...components
72
- }
@@ -1,40 +0,0 @@
1
-
2
- import {
3
- Input,
4
- InputNumber,
5
- Checkbox,
6
- DatePicker,
7
- TimePicker,
8
- Cascader,
9
- Radio,
10
- Select,
11
- Upload,
12
- Modal,
13
- message,
14
- notification
15
- } from 'ant-design-vue'
16
-
17
- /** 按需加载antDesignVue */
18
- export default {
19
- install(Vue) {
20
-
21
- Vue.use(Input)
22
- Vue.use(InputNumber)
23
- Vue.use(Radio)
24
- Vue.use(Checkbox)
25
- Vue.use(Select)
26
- Vue.use(DatePicker)
27
- Vue.use(TimePicker)
28
- Vue.use(Upload)
29
- Vue.use(Cascader)
30
- Vue.use(Modal)
31
-
32
- Vue.prototype.$confirm = Modal.confirm
33
- Vue.prototype.$message = message
34
- Vue.prototype.$notification = notification
35
- Vue.prototype.$info = Modal.info
36
- Vue.prototype.$success = Modal.success
37
- Vue.prototype.$error = Modal.error
38
- Vue.prototype.$warning = Modal.warning
39
- }
40
- }
@@ -1,53 +0,0 @@
1
- import PropTypes from 'ant-design-vue/es/_util/vue-types'
2
-
3
- import Modal from 'ant-design-vue/es/modal'
4
- import './index.less'
5
-
6
- const ModalProps = {
7
- mode: PropTypes.string.def('small'),
8
- title: PropTypes.string.def('标题'),
9
- visible: PropTypes.bool.def(false),
10
- cancelHandle: PropTypes.func,
11
- attrs: PropTypes.object.def({})
12
- }
13
-
14
- const ModalComp = {
15
- name: 'ModalComp',
16
- props: ModalProps,
17
- functional: true,
18
- render(h, content) {
19
-
20
- const { props, children } = content
21
-
22
- const attrs = Object.assign({
23
- width: null,
24
- footer: null,
25
- keyboard: false,
26
- maskClosable: false
27
- }, props.attrs)
28
-
29
- delete props.attrs
30
-
31
- props.mode == 'screen' && delete props.title
32
-
33
- return (
34
- <Modal
35
- {...{ props, attrs, on: { cancel: props.cancelHandle } }}
36
- wrapClassName={`AntModal__${props.mode}`}
37
- >
38
- { children }
39
- </Modal>
40
- )
41
-
42
- },
43
- mounted() {
44
- },
45
- methods: {
46
- }
47
- }
48
-
49
- ModalComp.install = function (Vue) {
50
- Vue.component('ModalComp', ModalComp)
51
- }
52
-
53
- export default ModalComp
@@ -1,50 +0,0 @@
1
- @import '../style/mixins.less';
2
-
3
- .AntModal__small {
4
- .ant-modal {
5
- .layout( 712px, 640px );
6
- }
7
- }
8
-
9
- .AntModal__middle {
10
- .ant-modal {
11
- .layout( 1104px, 848px );
12
- }
13
- }
14
-
15
- .AntModal__large {
16
- .ant-modal {
17
- .layout( 1600px, 848px );
18
- }
19
- }
20
-
21
- .AntModal__max {
22
- .ant-modal {
23
- .layout( 100%, 100% );
24
- top: 0;
25
- }
26
- }
27
-
28
- .AntModal__screen {
29
- .ant-modal {
30
- .layout( 100%, 100% );
31
- top: 0;
32
- padding: 0;
33
-
34
- &-body {
35
- padding: 0;
36
- }
37
- }
38
- }
39
-
40
- .ant-modal {
41
- &-content {
42
- display: flex;
43
- flex-direction: column;
44
- height: 100%;
45
- }
46
- &-body {
47
- flex: 1;
48
- // padding: 0;
49
- }
50
- }
@@ -1,17 +0,0 @@
1
- export const TAB_BINDING = {
2
- TAB_CLOSE: 'hook:tab:ck',
3
- TAB_CLOSE_ALL: 'hook:tab:ca',
4
- TAB_CLOSE_LEFT: 'hook:tab:cl',
5
- TAB_CLOSE_RIGHT: 'hook:tab:cr',
6
- TAB_CLOSE_OTHER: 'hook:tab:co',
7
- TAB_NAME: 'hook:tab:rename',
8
- TAB_ACTIVE: 'hook:tab:active'
9
- }
10
-
11
- export const ROUTE_BINDING = {
12
- R_OPEN: 'hook:open',
13
- R_CLOSE: 'hook:close',
14
- R_ACTIVE: 'hook:active',
15
- R_REFRESH: 'hook:refresh',
16
- R_GET_CACHES: 'hook:caches'
17
- }