vxe-design 0.0.1 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -0
  3. package/es/components.js +28 -0
  4. package/es/flow-design/index.js +15 -0
  5. package/es/flow-design/src/flow-design.js +50 -0
  6. package/es/flow-design/src/flow-view.js +50 -0
  7. package/es/flow-design/style.css +0 -0
  8. package/es/flow-design/style.min.css +0 -0
  9. package/es/flow-view/index.js +15 -0
  10. package/es/flow-view/style.css +0 -0
  11. package/es/flow-view/style.min.css +0 -0
  12. package/es/form-design/index.js +15 -0
  13. package/es/form-design/src/form-design.js +96 -0
  14. package/es/form-design/src/form-view.js +54 -0
  15. package/es/form-design/style.css +831 -0
  16. package/es/form-design/style.min.css +1 -0
  17. package/es/form-view/index.js +15 -0
  18. package/es/form-view/style.css +3 -0
  19. package/es/form-view/style.min.css +1 -0
  20. package/es/index.esm.js +6 -0
  21. package/es/list-design/index.js +15 -0
  22. package/es/list-design/src/list-design.js +55 -0
  23. package/es/list-design/src/list-view.js +59 -0
  24. package/es/list-design/style.css +332 -0
  25. package/es/list-design/style.min.css +1 -0
  26. package/es/list-view/index.js +15 -0
  27. package/es/list-view/style.css +15 -0
  28. package/es/list-view/style.min.css +1 -0
  29. package/es/style.css +1 -0
  30. package/es/style.min.css +1 -0
  31. package/es/ui/index.js +40 -0
  32. package/es/ui/src/comp.js +1 -0
  33. package/es/ui/src/depend.js +14 -0
  34. package/es/ui/src/dom.js +221 -0
  35. package/es/ui/src/log.js +15 -0
  36. package/es/ui/src/utils.js +41 -0
  37. package/es/ui/src/vn.js +45 -0
  38. package/es/ui/style.css +0 -0
  39. package/es/ui/style.min.css +0 -0
  40. package/es/vxe-flow-design/index.js +3 -0
  41. package/es/vxe-flow-design/style.css +0 -0
  42. package/es/vxe-flow-design/style.min.css +0 -0
  43. package/es/vxe-flow-view/index.js +3 -0
  44. package/es/vxe-flow-view/style.css +0 -0
  45. package/es/vxe-flow-view/style.min.css +0 -0
  46. package/es/vxe-form-design/index.js +3 -0
  47. package/es/vxe-form-design/style.css +831 -0
  48. package/es/vxe-form-design/style.min.css +1 -0
  49. package/es/vxe-form-view/index.js +3 -0
  50. package/es/vxe-form-view/style.css +3 -0
  51. package/es/vxe-form-view/style.min.css +1 -0
  52. package/es/vxe-list-design/index.js +3 -0
  53. package/es/vxe-list-design/style.css +332 -0
  54. package/es/vxe-list-design/style.min.css +1 -0
  55. package/es/vxe-list-view/index.js +3 -0
  56. package/es/vxe-list-view/style.css +15 -0
  57. package/es/vxe-list-view/style.min.css +1 -0
  58. package/es/vxe-ui/index.js +3 -0
  59. package/es/vxe-ui/style.css +0 -0
  60. package/es/vxe-ui/style.min.css +0 -0
  61. package/helper/vetur/attributes.json +1 -0
  62. package/helper/vetur/tags.json +1 -0
  63. package/lib/components.js +102 -0
  64. package/lib/components.min.js +1 -0
  65. package/lib/flow-design/index.js +22 -0
  66. package/lib/flow-design/index.min.js +1 -0
  67. package/lib/flow-design/src/flow-design.js +59 -0
  68. package/lib/flow-design/src/flow-design.min.js +1 -0
  69. package/lib/flow-design/src/flow-view.js +59 -0
  70. package/lib/flow-design/src/flow-view.min.js +1 -0
  71. package/lib/flow-design/style/index.js +1 -0
  72. package/lib/flow-design/style/style.css +0 -0
  73. package/lib/flow-design/style/style.min.css +0 -0
  74. package/lib/flow-view/index.js +22 -0
  75. package/lib/flow-view/index.min.js +1 -0
  76. package/lib/flow-view/style/index.js +1 -0
  77. package/lib/flow-view/style/style.css +0 -0
  78. package/lib/flow-view/style/style.min.css +0 -0
  79. package/lib/form-design/index.js +22 -0
  80. package/lib/form-design/index.min.js +1 -0
  81. package/lib/form-design/src/form-design.js +120 -0
  82. package/lib/form-design/src/form-design.min.js +1 -0
  83. package/lib/form-design/src/form-view.js +63 -0
  84. package/lib/form-design/src/form-view.min.js +1 -0
  85. package/lib/form-design/style/index.js +1 -0
  86. package/lib/form-design/style/style.css +831 -0
  87. package/lib/form-design/style/style.min.css +1 -0
  88. package/lib/form-view/index.js +22 -0
  89. package/lib/form-view/index.min.js +1 -0
  90. package/lib/form-view/style/index.js +1 -0
  91. package/lib/form-view/style/style.css +3 -0
  92. package/lib/form-view/style/style.min.css +1 -0
  93. package/lib/index.common.js +25 -0
  94. package/lib/index.umd.js +6236 -0
  95. package/lib/index.umd.min.js +1 -0
  96. package/lib/list-design/index.js +22 -0
  97. package/lib/list-design/index.min.js +1 -0
  98. package/lib/list-design/src/list-design.js +64 -0
  99. package/lib/list-design/src/list-design.min.js +1 -0
  100. package/lib/list-design/src/list-view.js +67 -0
  101. package/lib/list-design/src/list-view.min.js +1 -0
  102. package/lib/list-design/style/index.js +1 -0
  103. package/lib/list-design/style/style.css +332 -0
  104. package/lib/list-design/style/style.min.css +1 -0
  105. package/lib/list-view/index.js +22 -0
  106. package/lib/list-view/index.min.js +1 -0
  107. package/lib/list-view/style/index.js +1 -0
  108. package/lib/list-view/style/style.css +15 -0
  109. package/lib/list-view/style/style.min.css +1 -0
  110. package/lib/style.css +1 -0
  111. package/lib/style.min.css +1 -0
  112. package/lib/ui/index.js +52 -0
  113. package/lib/ui/index.min.js +1 -0
  114. package/lib/ui/src/comp.js +9 -0
  115. package/lib/ui/src/comp.min.js +1 -0
  116. package/lib/ui/src/depend.js +19 -0
  117. package/lib/ui/src/depend.min.js +1 -0
  118. package/lib/ui/src/dom.js +266 -0
  119. package/lib/ui/src/dom.min.js +1 -0
  120. package/lib/ui/src/log.js +22 -0
  121. package/lib/ui/src/log.min.js +1 -0
  122. package/lib/ui/src/utils.js +56 -0
  123. package/lib/ui/src/utils.min.js +1 -0
  124. package/lib/ui/src/vn.js +57 -0
  125. package/lib/ui/src/vn.min.js +1 -0
  126. package/lib/ui/style/index.js +1 -0
  127. package/lib/ui/style/style.css +0 -0
  128. package/lib/ui/style/style.min.css +0 -0
  129. package/lib/vxe-flow-design/index.js +22 -0
  130. package/lib/vxe-flow-design/index.min.js +1 -0
  131. package/lib/vxe-flow-design/style/index.js +1 -0
  132. package/lib/vxe-flow-design/style/style.css +0 -0
  133. package/lib/vxe-flow-design/style/style.min.css +0 -0
  134. package/lib/vxe-flow-view/index.js +22 -0
  135. package/lib/vxe-flow-view/index.min.js +1 -0
  136. package/lib/vxe-flow-view/style/index.js +1 -0
  137. package/lib/vxe-flow-view/style/style.css +0 -0
  138. package/lib/vxe-flow-view/style/style.min.css +0 -0
  139. package/lib/vxe-form-design/index.js +22 -0
  140. package/lib/vxe-form-design/index.min.js +1 -0
  141. package/lib/vxe-form-design/style/index.js +1 -0
  142. package/lib/vxe-form-design/style/style.css +831 -0
  143. package/lib/vxe-form-design/style/style.min.css +1 -0
  144. package/lib/vxe-form-view/index.js +22 -0
  145. package/lib/vxe-form-view/index.min.js +1 -0
  146. package/lib/vxe-form-view/style/index.js +1 -0
  147. package/lib/vxe-form-view/style/style.css +3 -0
  148. package/lib/vxe-form-view/style/style.min.css +1 -0
  149. package/lib/vxe-list-design/index.js +22 -0
  150. package/lib/vxe-list-design/index.min.js +1 -0
  151. package/lib/vxe-list-design/style/index.js +1 -0
  152. package/lib/vxe-list-design/style/style.css +332 -0
  153. package/lib/vxe-list-design/style/style.min.css +1 -0
  154. package/lib/vxe-list-view/index.js +22 -0
  155. package/lib/vxe-list-view/index.min.js +1 -0
  156. package/lib/vxe-list-view/style/index.js +1 -0
  157. package/lib/vxe-list-view/style/style.css +15 -0
  158. package/lib/vxe-list-view/style/style.min.css +1 -0
  159. package/lib/vxe-ui/index.js +22 -0
  160. package/lib/vxe-ui/index.min.js +1 -0
  161. package/lib/vxe-ui/style/index.js +1 -0
  162. package/lib/vxe-ui/style/style.css +0 -0
  163. package/lib/vxe-ui/style/style.min.css +0 -0
  164. package/package.json +57 -25
  165. package/packages/components.ts +38 -0
  166. package/packages/flow-design/index.ts +19 -0
  167. package/packages/flow-design/src/flow-design.ts +60 -0
  168. package/packages/flow-design/src/flow-view.ts +60 -0
  169. package/packages/flow-view/index.ts +19 -0
  170. package/packages/form-design/index.ts +19 -0
  171. package/packages/form-design/src/form-design.ts +105 -0
  172. package/packages/form-design/src/form-view.ts +63 -0
  173. package/packages/form-view/index.ts +19 -0
  174. package/packages/index.ts +8 -0
  175. package/packages/list-design/index.ts +19 -0
  176. package/packages/list-design/src/list-design.ts +64 -0
  177. package/packages/list-design/src/list-view.ts +68 -0
  178. package/packages/list-view/index.ts +19 -0
  179. package/packages/ui/index.ts +49 -0
  180. package/packages/ui/src/comp.ts +3 -0
  181. package/packages/ui/src/depend.ts +14 -0
  182. package/packages/ui/src/dom.ts +243 -0
  183. package/packages/ui/src/log.ts +19 -0
  184. package/packages/ui/src/utils.ts +51 -0
  185. package/packages/ui/src/vn.ts +53 -0
  186. package/styles/all.scss +8 -0
  187. package/styles/base.scss +2 -0
  188. package/styles/components/flow-design.scss +0 -0
  189. package/styles/components/flow-view.scss +0 -0
  190. package/styles/components/form-design.scss +302 -0
  191. package/styles/components/form-view.scss +3 -0
  192. package/styles/components/list-design.scss +116 -0
  193. package/styles/components/list-item/list-item-all.scss +3 -0
  194. package/styles/components/list-item/list-item-field-column.scss +19 -0
  195. package/styles/components/list-item/list-item-field-configs.scss +43 -0
  196. package/styles/components/list-item/list-item-field-search.scss +81 -0
  197. package/styles/components/list-view.scss +16 -0
  198. package/styles/components/ui.scss +0 -0
  199. package/styles/components/widget-form/widget-form-all.scss +6 -0
  200. package/styles/components/widget-form/widget-form-empty.scss +7 -0
  201. package/styles/components/widget-form/widget-form-input.scss +0 -0
  202. package/styles/components/widget-form/widget-form-row.scss +88 -0
  203. package/styles/components/widget-form/widget-form-select.scss +0 -0
  204. package/styles/components/widget-form/widget-form-subtable.scss +204 -0
  205. package/styles/components/widget-form/widget-form-textarea.scss +0 -0
  206. package/styles/components/widget-item/widget-item-all.scss +4 -0
  207. package/styles/components/widget-item/widget-item-data-source.scss +110 -0
  208. package/styles/components/widget-item/widget-item-devices.scss +4 -0
  209. package/styles/components/widget-item/widget-item-layout.scss +87 -0
  210. package/styles/components/widget-item/widget-item-prop-list.scss +49 -0
  211. package/styles/cssvar.scss +0 -0
  212. package/styles/helpers/baseMixin.scss +105 -0
  213. package/styles/helpers/baseVar.scss +4 -0
  214. package/styles/helpers/placement.scss +39 -0
  215. package/styles/theme/dark.scss +9 -0
  216. package/styles/theme/light.scss +11 -0
  217. package/styles/variable.scss +9 -0
  218. package/types/all.d.ts +59 -0
  219. package/types/index.d.ts +4 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 xuliangzhan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,5 +1,53 @@
1
1
  # vxe-design
2
2
 
3
+ [![star](https://gitee.com/x-extends/vxe-design/badge/star.svg?theme=gvp)](https://gitee.com/x-extends/vxe-design/stargazers)
4
+ [![npm version](https://img.shields.io/npm/v/vxe-design.svg?style=flat-square)](https://www.npmjs.com/package/vxe-design)
5
+ [![NodeJS with Webpack](https://github.com/x-extends/vxe-design/actions/workflows/webpack.yml/badge.svg)](https://github.com/x-extends/vxe-design/actions/workflows/webpack.yml)
6
+ [![npm downloads](https://img.shields.io/npm/dt/vxe-design.svg?style=flat-square)](https://npm-stat.com/charts.html?package=vxe-design)
7
+ [![issues](https://img.shields.io/github/issues/x-extends/vxe-design.svg)](https://github.com/x-extends/vxe-design/issues)
8
+ [![issues closed](https://img.shields.io/github/issues-closed/x-extends/vxe-design.svg)](https://github.com/x-extends/vxe-design/issues?q=is%3Aissue+is%3Aclosed)
9
+ [![pull requests](https://img.shields.io/github/issues-pr/x-extends/vxe-design.svg)](https://github.com/x-extends/vxe-design/pulls)
10
+ [![pull requests closed](https://img.shields.io/github/issues-pr-closed/x-extends/vxe-design.svg)](https://github.com/x-extends/vxe-design/pulls?q=is%3Apr+is%3Aclosed)
11
+ [![npm license](https://img.shields.io/github/license/mashape/apistatus.svg)](LICENSE)
12
+
13
+ 一个基于 [Vxe UI](https://github.com/x-extends/vxe-pc-ui) 的 PC 端可视化设计器,用于搭建零代码、低代码的平台
14
+
15
+ ## 浏览器支持
16
+
17
+ ![Edge](https://raw.github.com/alrra/browser-logos/master/src/edge/edge_48x48.png) | ![Chrome](https://raw.github.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png) | ![Firefox](https://raw.github.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png) | ![Opera](https://raw.github.com/alrra/browser-logos/master/src/opera/opera_48x48.png) | ![Safari](https://raw.github.com/alrra/browser-logos/master/src/safari/safari_48x48.png)
18
+ --- | --- | --- | --- | --- |
19
+ 80+ ✔ | 80+ ✔ | 90+ ✔ | 75+ ✔ | 10+ ✔ |
20
+
21
+ ## 安装
22
+
23
+ ```shell
24
+ npm install vxe-pc-ui@3 vxe-table@3 vxe-design@3
25
+ ```
26
+
27
+ ```javascript
28
+ import Vue from 'vue'
29
+ // ...
30
+ import VxeUIBase from 'vxe-pc-ui'
31
+ import 'vxe-pc-ui/es/style.css'
32
+
33
+ import VxeUITable from 'vxe-table'
34
+ import 'vxe-table/es/style.css'
35
+
36
+ import VxeUIDesign from 'vxe-design'
37
+ import 'vxe-design/lib/style.css'
38
+ // ...
39
+
40
+ Vue.use(VxeUIBase)
41
+ Vue.use(VxeUITable)
42
+ Vue.use(VxeUIDesign)
43
+ ```
44
+
45
+ ## Contributors
46
+
47
+ Thank you to everyone who contributed to this project.
48
+
49
+ [![vxe-design](https://contrib.rocks/image?repo=x-extends/vxe-design)](https://github.com/x-extends/vxe-design/graphs/contributors)
50
+
3
51
  ## License
4
52
 
5
53
  [MIT](LICENSE) © 2019-present, Xu Liangzhan
@@ -0,0 +1,28 @@
1
+ import VxeUI from './ui';
2
+ import VxeFlowDesign from './flow-design';
3
+ import VxeFlowView from './flow-view';
4
+ import VxeFormDesign from './form-design';
5
+ import VxeFormView from './form-view';
6
+ import VxeListDesign from './list-design';
7
+ import VxeListView from './list-view';
8
+ const { setConfig } = VxeUI;
9
+ const components = [
10
+ VxeFlowDesign,
11
+ VxeFlowView,
12
+ VxeFormDesign,
13
+ VxeFormView,
14
+ VxeListDesign,
15
+ VxeListView
16
+ ];
17
+ export function install(app, options) {
18
+ setConfig(options);
19
+ components.forEach(component => app.use(component));
20
+ }
21
+ export { VxeUI };
22
+ // Components
23
+ export * from './flow-design';
24
+ export * from './flow-view';
25
+ export * from './form-design';
26
+ export * from './form-view';
27
+ export * from './list-design';
28
+ export * from './list-view';
@@ -0,0 +1,15 @@
1
+ import { VxeUI } from '@vxe-ui/core';
2
+ import { checkDependVersion } from '../ui/src/depend';
3
+ import VxeFlowDesignComponent from './src/flow-design';
4
+ export const VxeFlowDesign = Object.assign({}, VxeFlowDesignComponent, {
5
+ install(app) {
6
+ checkDependVersion();
7
+ app.component(VxeFlowDesignComponent.name, VxeFlowDesignComponent);
8
+ }
9
+ });
10
+ if (VxeUI.dynamicApp) {
11
+ VxeUI.dynamicApp.use(VxeFlowDesign);
12
+ }
13
+ VxeUI.component(VxeFlowDesignComponent);
14
+ export const FlowDesign = VxeFlowDesign;
15
+ export default VxeFlowDesign;
@@ -0,0 +1,50 @@
1
+ import { defineVxeComponent } from '../../ui/src/comp';
2
+ import { VxeUI } from '@vxe-ui/core';
3
+ import XEUtils from 'xe-utils';
4
+ const { createEvent } = VxeUI;
5
+ export default {
6
+ name: 'VxeFlowDesign',
7
+ props: {},
8
+ data() {
9
+ const xID = XEUtils.uniqueId();
10
+ const reactData = {};
11
+ return {
12
+ xID,
13
+ reactData
14
+ };
15
+ },
16
+ methods: {
17
+ //
18
+ // Method
19
+ //
20
+ dispatchEvent(type, params, evnt) {
21
+ const $xeFlowDesign = this;
22
+ $xeFlowDesign.$emit(type, createEvent(evnt, { $flowDesign: $xeFlowDesign }, params));
23
+ },
24
+ emitModel(value) {
25
+ const $xeFlowDesign = this;
26
+ const { _events } = $xeFlowDesign;
27
+ if (_events && _events.modelValue) {
28
+ $xeFlowDesign.$emit('modelValue', value);
29
+ }
30
+ else {
31
+ $xeFlowDesign.$emit('model-value', value);
32
+ }
33
+ },
34
+ //
35
+ // Render
36
+ //
37
+ renderVN(h) {
38
+ const $xeFlowDesign = this;
39
+ const slots = $xeFlowDesign.$scopedSlots;
40
+ const defaultSlot = slots.default;
41
+ return h('div', {
42
+ ref: 'refElem',
43
+ class: 'vxe-flow-design'
44
+ }, defaultSlot ? defaultSlot({}) : []);
45
+ }
46
+ },
47
+ render(h) {
48
+ return this.renderVN(h);
49
+ }
50
+ };
@@ -0,0 +1,50 @@
1
+ import { defineVxeComponent } from '../../ui/src/comp';
2
+ import { VxeUI } from '@vxe-ui/core';
3
+ import XEUtils from 'xe-utils';
4
+ const { createEvent } = VxeUI;
5
+ export default {
6
+ name: 'VxeFlowView',
7
+ props: {},
8
+ data() {
9
+ const xID = XEUtils.uniqueId();
10
+ const reactData = {};
11
+ return {
12
+ xID,
13
+ reactData
14
+ };
15
+ },
16
+ methods: {
17
+ //
18
+ // Method
19
+ //
20
+ dispatchEvent(type, params, evnt) {
21
+ const $xeFlowView = this;
22
+ $xeFlowView.$emit(type, createEvent(evnt, { $flowView: $xeFlowView }, params));
23
+ },
24
+ emitModel(value) {
25
+ const $xeFlowView = this;
26
+ const { _events } = $xeFlowView;
27
+ if (_events && _events.modelValue) {
28
+ $xeFlowView.$emit('modelValue', value);
29
+ }
30
+ else {
31
+ $xeFlowView.$emit('model-value', value);
32
+ }
33
+ },
34
+ //
35
+ // Render
36
+ //
37
+ renderVN(h) {
38
+ const $xeFlowView = this;
39
+ const slots = $xeFlowView.$scopedSlots;
40
+ const defaultSlot = slots.default;
41
+ return h('div', {
42
+ ref: 'refElem',
43
+ class: 'vxe-flow-view'
44
+ }, defaultSlot ? defaultSlot({}) : []);
45
+ }
46
+ },
47
+ render(h) {
48
+ return this.renderVN(h);
49
+ }
50
+ };
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ import { VxeUI } from '@vxe-ui/core';
2
+ import { checkDependVersion } from '../ui/src/depend';
3
+ import VxeFlowViewComponent from '../flow-design/src/flow-view';
4
+ export const VxeFlowView = Object.assign({}, VxeFlowViewComponent, {
5
+ install(app) {
6
+ checkDependVersion();
7
+ app.component(VxeFlowViewComponent.name, VxeFlowViewComponent);
8
+ }
9
+ });
10
+ if (VxeUI.dynamicApp) {
11
+ VxeUI.dynamicApp.use(VxeFlowView);
12
+ }
13
+ VxeUI.component(VxeFlowViewComponent);
14
+ export const FlowView = VxeFlowView;
15
+ export default VxeFlowView;
File without changes
File without changes
@@ -0,0 +1,15 @@
1
+ import { VxeUI } from '@vxe-ui/core';
2
+ import { checkDependVersion } from '../ui/src/depend';
3
+ import VxeFormDesignComponent from './src/form-design';
4
+ export const VxeFormDesign = Object.assign({}, VxeFormDesignComponent, {
5
+ install(app) {
6
+ checkDependVersion();
7
+ app.component(VxeFormDesignComponent.name, VxeFormDesignComponent);
8
+ }
9
+ });
10
+ if (VxeUI.dynamicApp) {
11
+ VxeUI.dynamicApp.use(VxeFormDesign);
12
+ }
13
+ VxeUI.component(VxeFormDesignComponent);
14
+ export const FormDesign = VxeFormDesign;
15
+ export default VxeFormDesign;
@@ -0,0 +1,96 @@
1
+ import { defineVxeComponent } from '../../ui/src/comp';
2
+ import { VxeUI } from '@vxe-ui/core';
3
+ import XEUtils from 'xe-utils';
4
+ const { getConfig, createEvent } = VxeUI;
5
+ export default {
6
+ name: 'VxeFormDesign',
7
+ props: {
8
+ size: {
9
+ type: String,
10
+ default: () => getConfig().formDesign.size || getConfig().size
11
+ },
12
+ config: Object,
13
+ height: {
14
+ type: [String, Number],
15
+ default: () => getConfig().formDesign.height
16
+ },
17
+ widgets: {
18
+ type: Array,
19
+ default: () => XEUtils.clone(getConfig().formDesign.widgets) || []
20
+ },
21
+ showHeader: {
22
+ type: Boolean,
23
+ default: () => getConfig().formDesign.showHeader
24
+ },
25
+ showPc: {
26
+ type: Boolean,
27
+ default: () => getConfig().formDesign.showPc
28
+ },
29
+ showMobile: {
30
+ type: Boolean,
31
+ default: () => getConfig().formDesign.showMobile
32
+ },
33
+ showStyleSetting: {
34
+ type: Boolean,
35
+ default: () => getConfig().formDesign.showStyleSetting
36
+ },
37
+ formRender: Object,
38
+ menuConfig: Object
39
+ },
40
+ data() {
41
+ const xID = XEUtils.uniqueId();
42
+ const reactData = {
43
+ formData: {},
44
+ widgetConfigs: [],
45
+ widgetObjList: [],
46
+ dragWidget: null,
47
+ sortWidget: null,
48
+ activeWidget: null
49
+ };
50
+ return {
51
+ xID,
52
+ reactData
53
+ };
54
+ },
55
+ computed: {
56
+ computeMenuOpts() {
57
+ const $xeFormDesign = this;
58
+ const props = $xeFormDesign;
59
+ return Object.assign({}, getConfig().calendar.menuConfig, props.menuConfig);
60
+ }
61
+ },
62
+ methods: {
63
+ //
64
+ // Method
65
+ //
66
+ dispatchEvent(type, params, evnt) {
67
+ const $xeFormDesign = this;
68
+ $xeFormDesign.$emit(type, createEvent(evnt, { $formDesign: $xeFormDesign }, params));
69
+ },
70
+ emitModel(value) {
71
+ const $xeFormDesign = this;
72
+ const { _events } = $xeFormDesign;
73
+ if (_events && _events.modelValue) {
74
+ $xeFormDesign.$emit('modelValue', value);
75
+ }
76
+ else {
77
+ $xeFormDesign.$emit('model-value', value);
78
+ }
79
+ },
80
+ //
81
+ // Render
82
+ //
83
+ renderVN(h) {
84
+ const $xeFormDesign = this;
85
+ const slots = $xeFormDesign.$scopedSlots;
86
+ const defaultSlot = slots.default;
87
+ return h('div', {
88
+ ref: 'refElem',
89
+ class: 'vxe-form-design'
90
+ }, defaultSlot ? defaultSlot({}) : []);
91
+ }
92
+ },
93
+ render(h) {
94
+ return this.renderVN(h);
95
+ }
96
+ };
@@ -0,0 +1,54 @@
1
+ import { defineVxeComponent } from '../../ui/src/comp';
2
+ import XEUtils from 'xe-utils';
3
+ import { VxeUI } from '@vxe-ui/core';
4
+ const { createEvent } = VxeUI;
5
+ export default {
6
+ name: 'VxeFormView',
7
+ props: {},
8
+ data() {
9
+ const xID = XEUtils.uniqueId();
10
+ const reactData = {
11
+ formConfig: {},
12
+ formRules: {},
13
+ widgetObjList: []
14
+ };
15
+ return {
16
+ xID,
17
+ reactData
18
+ };
19
+ },
20
+ methods: {
21
+ //
22
+ // Method
23
+ //
24
+ dispatchEvent(type, params, evnt) {
25
+ const $xeFormView = this;
26
+ $xeFormView.$emit(type, createEvent(evnt, { $formView: $xeFormView }, params));
27
+ },
28
+ emitModel(value) {
29
+ const $xeFormView = this;
30
+ const { _events } = $xeFormView;
31
+ if (_events && _events.modelValue) {
32
+ $xeFormView.$emit('modelValue', value);
33
+ }
34
+ else {
35
+ $xeFormView.$emit('model-value', value);
36
+ }
37
+ },
38
+ //
39
+ // Render
40
+ //
41
+ renderVN(h) {
42
+ const $xeFormView = this;
43
+ const slots = $xeFormView.$scopedSlots;
44
+ const defaultSlot = slots.default;
45
+ return h('div', {
46
+ ref: 'refElem',
47
+ class: 'vxe-form-view'
48
+ }, defaultSlot ? defaultSlot({}) : []);
49
+ }
50
+ },
51
+ render(h) {
52
+ return this.renderVN(h);
53
+ }
54
+ };