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/package.json CHANGED
@@ -1,47 +1,80 @@
1
1
  {
2
2
  "name": "vxe-design",
3
- "version": "0.0.1",
4
- "description": "design",
3
+ "version": "3.0.1",
4
+ "description": "A PC-based visual designer based on Vxe UI, used for building zero-code and low-code platforms",
5
+ "scripts": {
6
+ "update": "npm install --legacy-peer-deps",
7
+ "serve": "vue-cli-service serve",
8
+ "lib:pack": "vue-cli-service build --target lib --name index --dest lib_temp index.ts",
9
+ "lib:modules": "gulp build",
10
+ "lib": "npm run lib:pack && npm run lib:modules"
11
+ },
5
12
  "files": [
6
13
  "lib",
7
- "types"
14
+ "es",
15
+ "src",
16
+ "helper",
17
+ "types",
18
+ "styles",
19
+ "packages"
8
20
  ],
9
21
  "main": "lib/index.common.js",
10
22
  "module": "es/index.esm.js",
11
- "unpkg": "lib/index.umd.js",
23
+ "unpkg": "lib/index.umd.js",
12
24
  "jsdelivr": "lib/index.umd.js",
25
+ "style": "lib/style.css",
13
26
  "typings": "types/index.d.ts",
14
27
  "devDependencies": {
15
- "@babel/core": "^7.4.4",
16
- "@babel/plugin-transform-runtime": "^7.4.4",
17
- "@babel/preset-env": "^7.4.4",
18
- "@babel/runtime": "^7.4.4",
19
- "eslint": "^5.16.0",
20
- "eslint-config-standard": "^12.0.0",
21
- "eslint-friendly-formatter": "^4.0.1",
22
- "eslint-plugin-import": "^2.16.0",
23
- "eslint-plugin-node": "^8.0.1",
24
- "eslint-plugin-promise": "^4.0.1",
25
- "eslint-plugin-standard": "^4.0.0",
28
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
29
+ "@typescript-eslint/parser": "^6.21.0",
30
+ "@vue/cli-plugin-babel": "~5.0.0",
31
+ "@vue/cli-plugin-eslint": "~5.0.0",
32
+ "@vue/cli-plugin-router": "~5.0.0",
33
+ "@vue/cli-plugin-typescript": "~5.0.0",
34
+ "@vue/cli-plugin-vuex": "~5.0.0",
35
+ "@vue/cli-service": "~5.0.0",
36
+ "@vue/eslint-config-standard": "^6.1.0",
37
+ "@vue/eslint-config-typescript": "^9.1.0",
38
+ "core-js": "^3.8.3",
39
+ "del": "^6.1.1",
40
+ "eslint": "^7.32.0",
41
+ "eslint-plugin-import": "^2.29.1",
42
+ "eslint-plugin-node": "^11.1.0",
43
+ "eslint-plugin-promise": "^6.1.1",
44
+ "eslint-plugin-vue": "^8.0.3",
26
45
  "gulp": "^4.0.2",
27
- "gulp-autoprefixer": "^7.0.1",
46
+ "gulp-autoprefixer": "^8.0.0",
28
47
  "gulp-babel": "^8.0.0",
29
- "gulp-clean-css": "^4.2.0",
48
+ "gulp-clean-css": "^4.3.0",
30
49
  "gulp-concat": "^2.6.1",
31
50
  "gulp-rename": "^2.0.0",
32
- "gulp-replace": "^1.0.0",
33
- "gulp-sass": "^4.1.0",
51
+ "gulp-replace": "^1.1.4",
52
+ "gulp-sass": "^5.1.0",
53
+ "gulp-sourcemaps": "^3.0.0",
54
+ "gulp-typescript": "^5.0.1",
34
55
  "gulp-uglify": "^3.0.2",
35
- "markdown-doctest": "^1.0.0"
56
+ "sass": "^1.80.4",
57
+ "sass-loader": "^14.2.1",
58
+ "typescript": "~5.9.3",
59
+ "vue-template-compiler": "2.6.14",
60
+ "vue": "~2.6.14",
61
+ "vue-i18n": "^8.15.1",
62
+ "vue-router": "^3.5.1",
63
+ "vxe-pc-ui": "3.16.0",
64
+ "vxe-table": "3.22.0"
65
+ },
66
+ "vetur": {
67
+ "tags": "helper/vetur/tags.json",
68
+ "attributes": "helper/vetur/attributes.json"
36
69
  },
37
70
  "repository": {
38
71
  "type": "git",
39
72
  "url": "git+https://github.com/x-extends/vxe-design.git"
40
73
  },
41
74
  "keywords": [
42
- "form",
43
- "table",
44
- "design"
75
+ "vxe",
76
+ "vxe-ui",
77
+ "vxe-design"
45
78
  ],
46
79
  "author": {
47
80
  "name": "Xu Liangzhan",
@@ -50,6 +83,5 @@
50
83
  "license": "MIT",
51
84
  "bugs": {
52
85
  "url": "https://github.com/x-extends/vxe-design/issues"
53
- },
54
- "homepage": "https://github.com/x-extends/vxe-design/"
86
+ }
55
87
  }
@@ -0,0 +1,38 @@
1
+ import { VueConstructor } from 'vue'
2
+ import VxeUI from './ui'
3
+
4
+ import VxeFlowDesign from './flow-design'
5
+ import VxeFlowView from './flow-view'
6
+ import VxeFormDesign from './form-design'
7
+ import VxeFormView from './form-view'
8
+ import VxeListDesign from './list-design'
9
+ import VxeListView from './list-view'
10
+
11
+ import type { VxeGlobalConfig } from 'vxe-pc-ui'
12
+
13
+ const { setConfig } = VxeUI
14
+
15
+ const components = [
16
+ VxeFlowDesign,
17
+ VxeFlowView,
18
+ VxeFormDesign,
19
+ VxeFormView,
20
+ VxeListDesign,
21
+ VxeListView
22
+ ]
23
+
24
+ export function install (app: VueConstructor, options?: VxeGlobalConfig) {
25
+ setConfig(options)
26
+
27
+ components.forEach(component => app.use(component))
28
+ }
29
+
30
+ export { VxeUI }
31
+
32
+ // Components
33
+ export * from './flow-design'
34
+ export * from './flow-view'
35
+ export * from './form-design'
36
+ export * from './form-view'
37
+ export * from './list-design'
38
+ export * from './list-view'
@@ -0,0 +1,19 @@
1
+ import { VueConstructor } from 'vue'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import { checkDependVersion } from '../ui/src/depend'
4
+ import VxeFlowDesignComponent from './src/flow-design'
5
+
6
+ export const VxeFlowDesign = Object.assign({}, VxeFlowDesignComponent, {
7
+ install (app: VueConstructor) {
8
+ checkDependVersion()
9
+ app.component(VxeFlowDesignComponent.name as string, VxeFlowDesignComponent)
10
+ }
11
+ })
12
+
13
+ if (VxeUI.dynamicApp) {
14
+ VxeUI.dynamicApp.use(VxeFlowDesign)
15
+ }
16
+ VxeUI.component(VxeFlowDesignComponent)
17
+
18
+ export const FlowDesign = VxeFlowDesign
19
+ export default VxeFlowDesign
@@ -0,0 +1,60 @@
1
+ import { CreateElement, VNode } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import { VxeUI } from '@vxe-ui/core'
4
+ import XEUtils from 'xe-utils'
5
+
6
+ import type { ValueOf } from 'vxe-pc-ui'
7
+ import type { FlowDesignReactData, VxeFlowDesignEmits } from '../../../types'
8
+
9
+ const { createEvent } = VxeUI
10
+
11
+ export default /* define-vxe-component start */ defineVxeComponent({
12
+ name: 'VxeFlowDesign',
13
+ props: {
14
+ },
15
+ data () {
16
+ const xID = XEUtils.uniqueId()
17
+ const reactData: FlowDesignReactData = {
18
+ }
19
+ return {
20
+ xID,
21
+ reactData
22
+ }
23
+ },
24
+ methods: {
25
+ //
26
+ // Method
27
+ //
28
+ dispatchEvent (type: ValueOf<VxeFlowDesignEmits>, params: Record<string, any>, evnt: Event | null) {
29
+ const $xeFlowDesign = this
30
+ $xeFlowDesign.$emit(type, createEvent(evnt, { $flowDesign: $xeFlowDesign }, params))
31
+ },
32
+ emitModel (value: any) {
33
+ const $xeFlowDesign = this
34
+
35
+ const { _events } = $xeFlowDesign as any
36
+ if (_events && _events.modelValue) {
37
+ $xeFlowDesign.$emit('modelValue', value)
38
+ } else {
39
+ $xeFlowDesign.$emit('model-value', value)
40
+ }
41
+ },
42
+
43
+ //
44
+ // Render
45
+ //
46
+ renderVN (h: CreateElement): VNode {
47
+ const $xeFlowDesign = this
48
+ const slots = $xeFlowDesign.$scopedSlots
49
+
50
+ const defaultSlot = slots.default
51
+ return h('div', {
52
+ ref: 'refElem',
53
+ class: 'vxe-flow-design'
54
+ }, defaultSlot ? defaultSlot({}) : [])
55
+ }
56
+ },
57
+ render (this: any, h) {
58
+ return this.renderVN(h)
59
+ }
60
+ }) /* define-vxe-component end */
@@ -0,0 +1,60 @@
1
+ import { CreateElement, VNode } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import { VxeUI } from '@vxe-ui/core'
4
+ import XEUtils from 'xe-utils'
5
+
6
+ import type { ValueOf } from 'vxe-pc-ui'
7
+ import type { FlowViewReactData, VxeFlowViewEmits } from '../../../types'
8
+
9
+ const { createEvent } = VxeUI
10
+
11
+ export default /* define-vxe-component start */ defineVxeComponent({
12
+ name: 'VxeFlowView',
13
+ props: {
14
+ },
15
+ data () {
16
+ const xID = XEUtils.uniqueId()
17
+ const reactData: FlowViewReactData = {
18
+ }
19
+ return {
20
+ xID,
21
+ reactData
22
+ }
23
+ },
24
+ methods: {
25
+ //
26
+ // Method
27
+ //
28
+ dispatchEvent (type: ValueOf<VxeFlowViewEmits>, params: Record<string, any>, evnt: Event | null) {
29
+ const $xeFlowView = this
30
+ $xeFlowView.$emit(type, createEvent(evnt, { $flowView: $xeFlowView }, params))
31
+ },
32
+ emitModel (value: any) {
33
+ const $xeFlowView = this
34
+
35
+ const { _events } = $xeFlowView as any
36
+ if (_events && _events.modelValue) {
37
+ $xeFlowView.$emit('modelValue', value)
38
+ } else {
39
+ $xeFlowView.$emit('model-value', value)
40
+ }
41
+ },
42
+
43
+ //
44
+ // Render
45
+ //
46
+ renderVN (h: CreateElement): VNode {
47
+ const $xeFlowView = this
48
+ const slots = $xeFlowView.$scopedSlots
49
+
50
+ const defaultSlot = slots.default
51
+ return h('div', {
52
+ ref: 'refElem',
53
+ class: 'vxe-flow-view'
54
+ }, defaultSlot ? defaultSlot({}) : [])
55
+ }
56
+ },
57
+ render (this: any, h) {
58
+ return this.renderVN(h)
59
+ }
60
+ }) /* define-vxe-component end */
@@ -0,0 +1,19 @@
1
+ import { VueConstructor } from 'vue'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import { checkDependVersion } from '../ui/src/depend'
4
+ import VxeFlowViewComponent from '../flow-design/src/flow-view'
5
+
6
+ export const VxeFlowView = Object.assign({}, VxeFlowViewComponent, {
7
+ install (app: VueConstructor) {
8
+ checkDependVersion()
9
+ app.component(VxeFlowViewComponent.name as string, VxeFlowViewComponent)
10
+ }
11
+ })
12
+
13
+ if (VxeUI.dynamicApp) {
14
+ VxeUI.dynamicApp.use(VxeFlowView)
15
+ }
16
+ VxeUI.component(VxeFlowViewComponent)
17
+
18
+ export const FlowView = VxeFlowView
19
+ export default VxeFlowView
@@ -0,0 +1,19 @@
1
+ import { VueConstructor } from 'vue'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import { checkDependVersion } from '../ui/src/depend'
4
+ import VxeFormDesignComponent from './src/form-design'
5
+
6
+ export const VxeFormDesign = Object.assign({}, VxeFormDesignComponent, {
7
+ install (app: VueConstructor) {
8
+ checkDependVersion()
9
+ app.component(VxeFormDesignComponent.name as string, VxeFormDesignComponent)
10
+ }
11
+ })
12
+
13
+ if (VxeUI.dynamicApp) {
14
+ VxeUI.dynamicApp.use(VxeFormDesign)
15
+ }
16
+ VxeUI.component(VxeFormDesignComponent)
17
+
18
+ export const FormDesign = VxeFormDesign
19
+ export default VxeFormDesign
@@ -0,0 +1,105 @@
1
+ import { CreateElement, VNode, PropType } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import { VxeUI } from '@vxe-ui/core'
4
+ import XEUtils from 'xe-utils'
5
+
6
+ import type { ValueOf } from 'vxe-pc-ui'
7
+ import type { FormDesignReactData, VxeFormDesignDefines, VxeFormDesignEmits, VxeFormDesignPropTypes } from '../../../types'
8
+
9
+ const { getConfig, createEvent } = VxeUI
10
+
11
+ export default /* define-vxe-component start */ defineVxeComponent({
12
+ name: 'VxeFormDesign',
13
+ props: {
14
+ size: {
15
+ type: String as PropType<VxeFormDesignPropTypes.Size>,
16
+ default: () => getConfig().formDesign.size || getConfig().size
17
+ },
18
+ config: Object as PropType<VxeFormDesignPropTypes.Config>,
19
+ height: {
20
+ type: [String, Number] as PropType<VxeFormDesignPropTypes.Height>,
21
+ default: () => getConfig().formDesign.height
22
+ },
23
+ widgets: {
24
+ type: Array as PropType<VxeFormDesignPropTypes.Widgets>,
25
+ default: () => XEUtils.clone(getConfig().formDesign.widgets) || []
26
+ },
27
+ showHeader: {
28
+ type: Boolean as PropType<VxeFormDesignPropTypes.ShowHeader>,
29
+ default: () => getConfig().formDesign.showHeader
30
+ },
31
+ showPc: {
32
+ type: Boolean as PropType<VxeFormDesignPropTypes.ShowPc>,
33
+ default: () => getConfig().formDesign.showPc
34
+ },
35
+ showMobile: {
36
+ type: Boolean as PropType<VxeFormDesignPropTypes.ShowMobile>,
37
+ default: () => getConfig().formDesign.showMobile
38
+ },
39
+ showStyleSetting: {
40
+ type: Boolean as PropType<VxeFormDesignPropTypes.ShowStyleSetting>,
41
+ default: () => getConfig().formDesign.showStyleSetting
42
+ },
43
+ formRender: Object as PropType<VxeFormDesignPropTypes.FormRender>,
44
+ menuConfig: Object as PropType<VxeFormDesignPropTypes.MenuConfig>
45
+ },
46
+ data () {
47
+ const xID = XEUtils.uniqueId()
48
+ const reactData: FormDesignReactData = {
49
+ formData: {} as VxeFormDesignDefines.DefaultSettingFormDataObjVO,
50
+ widgetConfigs: [],
51
+ widgetObjList: [],
52
+ dragWidget: null,
53
+ sortWidget: null,
54
+ activeWidget: null
55
+ }
56
+ return {
57
+ xID,
58
+ reactData
59
+ }
60
+ },
61
+ computed: {
62
+ computeMenuOpts () {
63
+ const $xeFormDesign = this
64
+ const props = $xeFormDesign
65
+
66
+ return Object.assign({}, getConfig().calendar.menuConfig, props.menuConfig)
67
+ }
68
+ },
69
+ methods: {
70
+ //
71
+ // Method
72
+ //
73
+ dispatchEvent (type: ValueOf<VxeFormDesignEmits>, params: Record<string, any>, evnt: Event | null) {
74
+ const $xeFormDesign = this
75
+ $xeFormDesign.$emit(type, createEvent(evnt, { $formDesign: $xeFormDesign }, params))
76
+ },
77
+ emitModel (value: any) {
78
+ const $xeFormDesign = this
79
+
80
+ const { _events } = $xeFormDesign as any
81
+ if (_events && _events.modelValue) {
82
+ $xeFormDesign.$emit('modelValue', value)
83
+ } else {
84
+ $xeFormDesign.$emit('model-value', value)
85
+ }
86
+ },
87
+
88
+ //
89
+ // Render
90
+ //
91
+ renderVN (h: CreateElement): VNode {
92
+ const $xeFormDesign = this
93
+ const slots = $xeFormDesign.$scopedSlots
94
+
95
+ const defaultSlot = slots.default
96
+ return h('div', {
97
+ ref: 'refElem',
98
+ class: 'vxe-form-design'
99
+ }, defaultSlot ? defaultSlot({}) : [])
100
+ }
101
+ },
102
+ render (this: any, h) {
103
+ return this.renderVN(h)
104
+ }
105
+ }) /* define-vxe-component end */
@@ -0,0 +1,63 @@
1
+ import { CreateElement, VNode } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import XEUtils from 'xe-utils'
4
+ import { VxeUI } from '@vxe-ui/core'
5
+
6
+ import type { ValueOf } from 'vxe-pc-ui'
7
+ import type { FormViewReactData, VxeFormViewEmits } from '../../../types'
8
+
9
+ const { createEvent } = VxeUI
10
+
11
+ export default /* define-vxe-component start */ defineVxeComponent({
12
+ name: 'VxeFormView',
13
+ props: {
14
+ },
15
+ data () {
16
+ const xID = XEUtils.uniqueId()
17
+ const reactData: FormViewReactData = {
18
+ formConfig: {},
19
+ formRules: {},
20
+ widgetObjList: []
21
+ }
22
+ return {
23
+ xID,
24
+ reactData
25
+ }
26
+ },
27
+ methods: {
28
+ //
29
+ // Method
30
+ //
31
+ dispatchEvent (type: ValueOf<VxeFormViewEmits>, params: Record<string, any>, evnt: Event | null) {
32
+ const $xeFormView = this
33
+ $xeFormView.$emit(type, createEvent(evnt, { $formView: $xeFormView }, params))
34
+ },
35
+ emitModel (value: any) {
36
+ const $xeFormView = this
37
+
38
+ const { _events } = $xeFormView as any
39
+ if (_events && _events.modelValue) {
40
+ $xeFormView.$emit('modelValue', value)
41
+ } else {
42
+ $xeFormView.$emit('model-value', value)
43
+ }
44
+ },
45
+
46
+ //
47
+ // Render
48
+ //
49
+ renderVN (h: CreateElement): VNode {
50
+ const $xeFormView = this
51
+ const slots = $xeFormView.$scopedSlots
52
+
53
+ const defaultSlot = slots.default
54
+ return h('div', {
55
+ ref: 'refElem',
56
+ class: 'vxe-form-view'
57
+ }, defaultSlot ? defaultSlot({}) : [])
58
+ }
59
+ },
60
+ render (this: any, h) {
61
+ return this.renderVN(h)
62
+ }
63
+ }) /* define-vxe-component end */
@@ -0,0 +1,19 @@
1
+ import { VueConstructor } from 'vue'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import { checkDependVersion } from '../ui/src/depend'
4
+ import VxeFormViewComponent from '../form-design/src/form-view'
5
+
6
+ export const VxeFormView = Object.assign(VxeFormViewComponent, {
7
+ install (app: VueConstructor) {
8
+ checkDependVersion()
9
+ app.component(VxeFormViewComponent.name as string, VxeFormViewComponent)
10
+ }
11
+ })
12
+
13
+ if (VxeUI.dynamicApp) {
14
+ VxeUI.dynamicApp.use(VxeFormView)
15
+ }
16
+ VxeUI.component(VxeFormViewComponent)
17
+
18
+ export const FormView = VxeFormView
19
+ export default VxeFormView
@@ -0,0 +1,8 @@
1
+ import * as VxeUIDesignExport from './components'
2
+
3
+ export * from './components'
4
+
5
+ /**
6
+ * A vue based PC component library
7
+ */
8
+ export default VxeUIDesignExport
@@ -0,0 +1,19 @@
1
+ import { VueConstructor } from 'vue'
2
+ import { VxeUI } from '@vxe-ui/core'
3
+ import { checkDependVersion } from '../ui/src/depend'
4
+ import VxeListDesignComponent from './src/list-design'
5
+
6
+ export const VxeListDesign = Object.assign({}, VxeListDesignComponent, {
7
+ install (app: VueConstructor) {
8
+ checkDependVersion()
9
+ app.component(VxeListDesignComponent.name as string, VxeListDesignComponent)
10
+ }
11
+ })
12
+
13
+ if (VxeUI.dynamicApp) {
14
+ VxeUI.dynamicApp.use(VxeListDesign)
15
+ }
16
+ VxeUI.component(VxeListDesignComponent)
17
+
18
+ export const ListDesign = VxeListDesign
19
+ export default VxeListDesign
@@ -0,0 +1,64 @@
1
+ import { CreateElement, VNode } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import XEUtils from 'xe-utils'
4
+ import { VxeUI } from '@vxe-ui/core'
5
+
6
+ import type { ValueOf } from 'vxe-pc-ui'
7
+ import type { ListDesignReactData, VxeListDesignDefines, VxeListDesignEmits } from '../../../types'
8
+
9
+ const { createEvent } = VxeUI
10
+
11
+ export default /* define-vxe-component start */ defineVxeComponent({
12
+ name: 'VxeListDesign',
13
+ props: {
14
+ },
15
+ data () {
16
+ const xID = XEUtils.uniqueId()
17
+ const reactData: ListDesignReactData = {
18
+ formData: {} as VxeListDesignDefines.DefaultSettingFormDataObjVO,
19
+ searchFormData: {},
20
+ searchFormItems: [],
21
+ listTableColumns: []
22
+ }
23
+ return {
24
+ xID,
25
+ reactData
26
+ }
27
+ },
28
+ methods: {
29
+ //
30
+ // Method
31
+ //
32
+ dispatchEvent (type: ValueOf<VxeListDesignEmits>, params: Record<string, any>, evnt: Event | null) {
33
+ const $xeListDesign = this
34
+ $xeListDesign.$emit(type, createEvent(evnt, { $listDesign: $xeListDesign }, params))
35
+ },
36
+ emitModel (value: any) {
37
+ const $xeListDesign = this
38
+
39
+ const { _events } = $xeListDesign as any
40
+ if (_events && _events.modelValue) {
41
+ $xeListDesign.$emit('modelValue', value)
42
+ } else {
43
+ $xeListDesign.$emit('model-value', value)
44
+ }
45
+ },
46
+
47
+ //
48
+ // Render
49
+ //
50
+ renderVN (h: CreateElement): VNode {
51
+ const $xeListDesign = this
52
+ const slots = $xeListDesign.$scopedSlots
53
+
54
+ const defaultSlot = slots.default
55
+ return h('div', {
56
+ ref: 'refElem',
57
+ class: 'vxe-list-design'
58
+ }, defaultSlot ? defaultSlot({}) : [])
59
+ }
60
+ },
61
+ render (this: any, h) {
62
+ return this.renderVN(h)
63
+ }
64
+ }) /* define-vxe-component end */
@@ -0,0 +1,68 @@
1
+ import { CreateElement, VNode } from 'vue'
2
+ import { defineVxeComponent } from '../../ui/src/comp'
3
+ import XEUtils from 'xe-utils'
4
+ import { VxeUI } from '@vxe-ui/core'
5
+
6
+ import type { ValueOf } from 'vxe-pc-ui'
7
+ import type { ListViewReactData, VxeListDesignDefines, VxeListViewEmits } from '../../../types'
8
+
9
+ const { createEvent } = VxeUI
10
+
11
+ export default /* define-vxe-component start */ defineVxeComponent({
12
+ name: 'VxeListView',
13
+ props: {
14
+ },
15
+ data () {
16
+ const xID = XEUtils.uniqueId()
17
+ const reactData: ListViewReactData = {
18
+ formConfig: {} as VxeListDesignDefines.DefaultSettingFormDataObjVO,
19
+ searchFormData: {},
20
+ searchFormItems: [],
21
+ listTableColumns: [],
22
+ tableColumns: [],
23
+ footerData: [
24
+ {} // 默认一行合计
25
+ ]
26
+ }
27
+ return {
28
+ xID,
29
+ reactData
30
+ }
31
+ },
32
+ methods: {
33
+ //
34
+ // Method
35
+ //
36
+ dispatchEvent (type: ValueOf<VxeListViewEmits>, params: Record<string, any>, evnt: Event | null) {
37
+ const $xeListView = this
38
+ $xeListView.$emit(type, createEvent(evnt, { $listView: $xeListView }, params))
39
+ },
40
+ emitModel (value: any) {
41
+ const $xeListView = this
42
+
43
+ const { _events } = $xeListView as any
44
+ if (_events && _events.modelValue) {
45
+ $xeListView.$emit('modelValue', value)
46
+ } else {
47
+ $xeListView.$emit('model-value', value)
48
+ }
49
+ },
50
+
51
+ //
52
+ // Render
53
+ //
54
+ renderVN (h: CreateElement): VNode {
55
+ const $xeListView = this
56
+ const slots = $xeListView.$scopedSlots
57
+
58
+ const defaultSlot = slots.default
59
+ return h('div', {
60
+ ref: 'refElem',
61
+ class: 'vxe-list-view'
62
+ }, defaultSlot ? defaultSlot({}) : [])
63
+ }
64
+ },
65
+ render (this: any, h) {
66
+ return this.renderVN(h)
67
+ }
68
+ }) /* define-vxe-component end */