tianheng-ui 0.0.65 → 0.0.66
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.
- package/lib/tianheng-ui.js +10 -10
- package/package.json +5 -4
- package/packages/Button/index.vue +1 -1
- package/packages/Cell/index.vue +1 -1
- package/packages/Col/index.js +1 -1
- package/packages/Col/index.vue +3 -1
- package/packages/FormMaking/Container.vue +34 -19
- package/packages/FormMaking/custom/config.js +2 -1
- package/packages/FormMaking/generate.js +5 -0
- package/packages/FormMaking/index.js +10 -10
- package/packages/FormMaking/making.js +9 -0
- package/packages/Row/index.vue +0 -2
- package/packages/index.js +26 -6
package/package.json
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
{
|
2
2
|
"name": "tianheng-ui",
|
3
3
|
"description": "A Vue.js project",
|
4
|
-
"version": "0.0.
|
4
|
+
"version": "0.0.66",
|
5
5
|
"author": "shu lang <403732931@qq.com>",
|
6
6
|
"license": "MIT",
|
7
7
|
"private": false,
|
8
8
|
"main": "./lib/tianheng-ui.js",
|
9
9
|
"style": "lib/theme-chalk/index.css",
|
10
10
|
"scripts": {
|
11
|
-
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
12
|
-
"build": "cross-env NODE_ENV=preview webpack --progress --hide-modules",
|
13
|
-
"build:npm": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
11
|
+
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot --mode=development",
|
12
|
+
"build": "cross-env NODE_ENV=preview webpack --progress --hide-modules --mode=production",
|
13
|
+
"build:npm": "cross-env NODE_ENV=production webpack --progress --hide-modules --mode=production"
|
14
14
|
},
|
15
15
|
"dependencies": {
|
16
16
|
"ace-builds": "^1.4.13",
|
@@ -53,6 +53,7 @@
|
|
53
53
|
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
|
54
54
|
"@vue/babel-preset-jsx": "^1.4.0",
|
55
55
|
"babel-loader": "^8.2.5",
|
56
|
+
"babel-plugin-component": "^1.1.1",
|
56
57
|
"babel-plugin-import": "^1.13.5",
|
57
58
|
"bpmn-js": "^8.8.3",
|
58
59
|
"bpmn-js-properties-panel": "^0.37.2",
|
package/packages/Cell/index.vue
CHANGED
package/packages/Col/index.js
CHANGED
package/packages/Col/index.vue
CHANGED
@@ -111,7 +111,11 @@
|
|
111
111
|
></i>
|
112
112
|
</div>
|
113
113
|
<slot name="action"> </slot>
|
114
|
-
<el-popover
|
114
|
+
<el-popover
|
115
|
+
placement="top"
|
116
|
+
trigger="hover"
|
117
|
+
style="margin:0 10px;"
|
118
|
+
>
|
115
119
|
<el-button
|
116
120
|
type="text"
|
117
121
|
size="medium"
|
@@ -508,6 +512,14 @@ export default {
|
|
508
512
|
return list;
|
509
513
|
}
|
510
514
|
},
|
515
|
+
watch: {
|
516
|
+
widgetFormData: {
|
517
|
+
deep: true,
|
518
|
+
handler: function(val) {
|
519
|
+
// console.log(this.$refs.widgetForm);
|
520
|
+
}
|
521
|
+
}
|
522
|
+
},
|
511
523
|
mounted() {},
|
512
524
|
methods: {
|
513
525
|
// 读取excel file
|
@@ -594,25 +606,36 @@ export default {
|
|
594
606
|
|
595
607
|
const colKey =
|
596
608
|
Date.parse(new Date()) + "_" + Math.ceil(Math.random() * 99999);
|
597
|
-
const
|
598
|
-
const
|
599
|
-
if (!
|
609
|
+
const titleDom = colsDom[i];
|
610
|
+
const valueDom = colsDom[i + 1];
|
611
|
+
if (!titleDom.innerText && !valueDom.innerText) continue;
|
600
612
|
|
601
|
-
if (
|
602
|
-
span =
|
613
|
+
if (valueDom) {
|
614
|
+
span =
|
615
|
+
((titleDom.colSpan || 1) + (valueDom.colSpan || 1)) * colSpan;
|
603
616
|
|
604
617
|
const data = this.getComponentsConfig("input");
|
605
|
-
|
606
|
-
|
618
|
+
let name = titleDom.innerText;
|
619
|
+
if (name.charAt(0) === "*") {
|
620
|
+
name = name.slice(1)
|
621
|
+
data.options.required = true;
|
622
|
+
data.rules = data.rules || []
|
623
|
+
data.rules.push({
|
624
|
+
required: true,
|
625
|
+
message: "单行文本必须填写"
|
626
|
+
});
|
627
|
+
}
|
628
|
+
data.name = name;
|
629
|
+
data.options.defaultValue = valueDom.innerText;
|
607
630
|
data.key = colKey;
|
608
631
|
data.model = "input_" + colKey;
|
609
632
|
grid.columns.push({ span: span, list: [data] });
|
610
633
|
} else {
|
611
|
-
span =
|
634
|
+
span = titleDom.colSpan * colSpan;
|
612
635
|
|
613
636
|
const data = this.getComponentsConfig("text");
|
614
|
-
data.name =
|
615
|
-
data.options.defaultValue =
|
637
|
+
data.name = titleDom.innerText;
|
638
|
+
data.options.defaultValue = titleDom.innerText;
|
616
639
|
data.options.hideLabel = true;
|
617
640
|
data.key = colKey;
|
618
641
|
data.model = "text_" + colKey;
|
@@ -742,14 +765,6 @@ export default {
|
|
742
765
|
handleDataChange(field, value, data) {
|
743
766
|
// console.log(field, value, data);
|
744
767
|
}
|
745
|
-
},
|
746
|
-
watch: {
|
747
|
-
widgetFormData: {
|
748
|
-
deep: true,
|
749
|
-
handler: function(val) {
|
750
|
-
// console.log(this.$refs.widgetForm);
|
751
|
-
}
|
752
|
-
}
|
753
768
|
}
|
754
769
|
};
|
755
770
|
</script>
|
@@ -3,17 +3,17 @@ import "./iconfont/iconfont.css";
|
|
3
3
|
import "./styles/cover.scss";
|
4
4
|
import "./styles/index.scss";
|
5
5
|
|
6
|
-
import
|
7
|
-
|
8
|
-
Vue.component(
|
6
|
+
import FormMaking from "./Container.vue";
|
7
|
+
FormMaking.install = function(Vue) {
|
8
|
+
Vue.component(FormMaking.name, FormMaking);
|
9
9
|
};
|
10
10
|
|
11
|
-
import
|
12
|
-
|
13
|
-
Vue.component(
|
11
|
+
import FormGenerate from "./GenerateForm.vue";
|
12
|
+
FormGenerate.install = function(Vue) {
|
13
|
+
Vue.component(FormGenerate.name, FormGenerate);
|
14
14
|
};
|
15
15
|
|
16
|
-
const components = [
|
16
|
+
const components = [FormMaking, FormGenerate];
|
17
17
|
const install = function(Vue) {
|
18
18
|
components.forEach(component => {
|
19
19
|
Vue.component(component.name, component);
|
@@ -24,10 +24,10 @@ if (typeof window !== "undefined" && window.Vue) {
|
|
24
24
|
install(window.Vue);
|
25
25
|
}
|
26
26
|
|
27
|
-
export { install,
|
27
|
+
export { install, FormMaking, FormGenerate };
|
28
28
|
|
29
29
|
export default {
|
30
30
|
install,
|
31
|
-
|
32
|
-
|
31
|
+
FormMaking,
|
32
|
+
FormGenerate
|
33
33
|
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import "normalize.css/normalize.css";
|
2
|
+
import "./iconfont/iconfont.css";
|
3
|
+
import "./styles/cover.scss";
|
4
|
+
import "./styles/index.scss";
|
5
|
+
import FormMaking from "./Container.vue";
|
6
|
+
FormMaking.install = function(Vue) {
|
7
|
+
Vue.component(FormMaking.name, FormMaking);
|
8
|
+
};
|
9
|
+
export default FormMaking;
|
package/packages/Row/index.vue
CHANGED
package/packages/index.js
CHANGED
@@ -36,7 +36,8 @@ import ImagePreview from "./ImagePreview/index.js";
|
|
36
36
|
import Row from "./Row/index.js";
|
37
37
|
import Col from "./Col/index.js";
|
38
38
|
import Upload from "./Upload/index.js";
|
39
|
-
import
|
39
|
+
import FormMaking from "./FormMaking/making.js";
|
40
|
+
import FormGenerate from "./FormMaking/generate.js";
|
40
41
|
// import Workflow from "../packages/Workflow/index.js";
|
41
42
|
|
42
43
|
const components = [
|
@@ -56,8 +57,8 @@ const components = [
|
|
56
57
|
Row,
|
57
58
|
Col,
|
58
59
|
Upload,
|
59
|
-
|
60
|
-
|
60
|
+
FormMaking,
|
61
|
+
FormGenerate
|
61
62
|
// Workflow
|
62
63
|
];
|
63
64
|
|
@@ -79,10 +80,29 @@ if (typeof window !== "undefined" && window.Vue) {
|
|
79
80
|
const version = require("../package.json").version;
|
80
81
|
export default {
|
81
82
|
version: version,
|
82
|
-
install
|
83
|
+
install,
|
84
|
+
Cell,
|
85
|
+
Icons,
|
86
|
+
Table,
|
87
|
+
TableAction,
|
88
|
+
TableSearch,
|
89
|
+
TableTools,
|
90
|
+
Empty,
|
91
|
+
Dialog,
|
92
|
+
Card,
|
93
|
+
CodeEditor,
|
94
|
+
Button,
|
95
|
+
Image,
|
96
|
+
ImagePreview,
|
97
|
+
Row,
|
98
|
+
Col,
|
99
|
+
Upload,
|
100
|
+
FormMaking,
|
101
|
+
FormGenerate
|
83
102
|
};
|
84
103
|
|
85
104
|
export {
|
105
|
+
install,
|
86
106
|
Cell,
|
87
107
|
Icons,
|
88
108
|
Table,
|
@@ -99,6 +119,6 @@ export {
|
|
99
119
|
Row,
|
100
120
|
Col,
|
101
121
|
Upload,
|
102
|
-
|
103
|
-
|
122
|
+
FormMaking,
|
123
|
+
FormGenerate
|
104
124
|
};
|