tianheng-ui 0.1.11 → 0.1.14
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/theme-chalk/js/axios.js +3 -2
- package/lib/theme-chalk/js/util.js +23 -0
- package/lib/theme-chalk/styles/feature.scss +15 -0
- package/lib/tianheng-ui.js +13 -14
- package/package.json +1 -1
- package/packages/FormMaking/GenerateForm.vue +6 -1
- package/packages/FormMaking/GenerateFormItem.vue +9 -5
- package/packages/FormMaking/GenerateFormItemH5.vue +1 -1
- package/packages/FormMaking/WidgetConfig.vue +39 -51
- package/packages/FormMaking/WidgetForm.vue +9 -10
- package/packages/FormMaking/WidgetFormItem.vue +2 -2
- package/packages/FormMaking/WidgetSelect.vue +0 -1
- package/packages/FormMaking/WidgetTools.vue +539 -0
- package/packages/FormMaking/config/index.js +6 -0
- package/packages/FormMaking/custom/config.js +21 -24
- package/packages/FormMaking/custom/configs/button.vue +25 -25
- package/packages/FormMaking/custom/configs/cascader.vue +7 -7
- package/packages/FormMaking/custom/configs/checkbox.vue +23 -22
- package/packages/FormMaking/custom/configs/color.vue +3 -3
- package/packages/FormMaking/custom/configs/date.vue +3 -3
- package/packages/FormMaking/custom/configs/input.vue +3 -3
- package/packages/FormMaking/custom/configs/number.vue +3 -3
- package/packages/FormMaking/custom/configs/radio.vue +23 -19
- package/packages/FormMaking/custom/configs/rate.vue +3 -3
- package/packages/FormMaking/custom/configs/select.vue +25 -20
- package/packages/FormMaking/custom/configs/slider.vue +3 -3
- package/packages/FormMaking/custom/configs/switch.vue +3 -3
- package/packages/FormMaking/custom/configs/tabs.vue +12 -17
- package/packages/FormMaking/custom/configs/textarea.vue +3 -3
- package/packages/FormMaking/custom/configs/time.vue +3 -3
- package/packages/FormMaking/custom/configs/upload.vue +5 -5
- package/packages/FormMaking/custom/items/button.vue +35 -1
- package/packages/FormMaking/custom/items/checkbox.vue +1 -1
- package/packages/FormMaking/custom/items/date.vue +1 -0
- package/packages/FormMaking/custom/items/grid_dev.vue +3 -3
- package/packages/FormMaking/custom/items/tableH5_dev.vue +3 -3
- package/packages/FormMaking/custom/items/table_dev.vue +3 -3
- package/packages/FormMaking/custom/items/tabs_dev.vue +3 -3
- package/packages/FormMaking/custom/mixins/index.js +12 -12
- package/packages/FormMaking/index.vue +93 -469
- package/packages/FormMaking/styles/index.scss +1 -21
- package/packages/FormMaking/util/index.js +24 -0
- package/packages/FormMaking/util/request.js +9 -12
- package/packages/TableMaking/WidgetTools.vue +246 -0
- package/packages/TableMaking/custom/config.js +110 -0
- package/packages/TableMaking/generateTable.vue +2 -2
- package/packages/TableMaking/index.vue +62 -157
- package/packages/TableMaking/util/index.js +54 -1
- package/packages/TableMaking/widgetConfig.vue +261 -178
- package/packages/TableMaking/widgetTable.vue +16 -46
- package/packages/index.js +5 -4
@@ -13,17 +13,21 @@
|
|
13
13
|
<div class="table-item-custom">隐藏</div>
|
14
14
|
</div>
|
15
15
|
<draggable
|
16
|
+
v-if="config.search"
|
16
17
|
class="search-content"
|
17
|
-
v-model="
|
18
|
+
v-model="config.search.options"
|
18
19
|
v-bind="{
|
19
20
|
group: 'people',
|
20
21
|
ghostClass: 'ghost',
|
21
22
|
animation: 200,
|
22
23
|
handle: '.drag-widget'
|
23
24
|
}"
|
24
|
-
@end="handleSearchMoveEnd"
|
25
25
|
>
|
26
|
-
<div
|
26
|
+
<div
|
27
|
+
v-for="item in config.search.options"
|
28
|
+
:key="item.prop"
|
29
|
+
class="table-item"
|
30
|
+
>
|
27
31
|
<div class="table-item-custom drag">
|
28
32
|
<i class="iconfont icon-drag drag-widget"></i>
|
29
33
|
</div>
|
@@ -67,6 +71,7 @@
|
|
67
71
|
</div>
|
68
72
|
</div>
|
69
73
|
</draggable>
|
74
|
+
<div v-else class="search-content"></div>
|
70
75
|
</div>
|
71
76
|
<div class="table-title">列表字段</div>
|
72
77
|
<div class="tableList" style="height: calc(100% - 240px);">
|
@@ -80,17 +85,21 @@
|
|
80
85
|
<div class="table-item-custom">隐藏</div>
|
81
86
|
</div>
|
82
87
|
<draggable
|
88
|
+
v-if="config.table"
|
83
89
|
class="table-content"
|
84
|
-
v-model="
|
90
|
+
v-model="config.table.options"
|
85
91
|
v-bind="{
|
86
92
|
group: 'people',
|
87
93
|
ghostClass: 'ghost',
|
88
94
|
animation: 200,
|
89
95
|
handle: '.drag-widget'
|
90
96
|
}"
|
91
|
-
@end="handleTableMoveEnd"
|
92
97
|
>
|
93
|
-
<div
|
98
|
+
<div
|
99
|
+
v-for="item in config.table.options"
|
100
|
+
:key="item.prop"
|
101
|
+
class="table-item"
|
102
|
+
>
|
94
103
|
<div class="table-item-custom drag">
|
95
104
|
<i class="iconfont icon-drag drag-widget"></i>
|
96
105
|
</div>
|
@@ -141,23 +150,10 @@ import Draggable from "vuedraggable";
|
|
141
150
|
export default {
|
142
151
|
components: { Draggable },
|
143
152
|
props: {
|
144
|
-
|
145
|
-
type: Array,
|
146
|
-
default: () => {
|
147
|
-
return [];
|
148
|
-
}
|
149
|
-
},
|
150
|
-
tableFields: {
|
151
|
-
type: Array,
|
152
|
-
default: () => {
|
153
|
-
return [];
|
154
|
-
}
|
155
|
-
}
|
153
|
+
config: Object
|
156
154
|
},
|
157
155
|
data() {
|
158
156
|
return {
|
159
|
-
searchData: this.searchFields,
|
160
|
-
tableData: this.tableFields,
|
161
157
|
componentOptions: [
|
162
158
|
{ label: "输入框", value: "input" },
|
163
159
|
{ label: "下拉框", value: "select" },
|
@@ -172,34 +168,8 @@ export default {
|
|
172
168
|
codeEditorValue: ""
|
173
169
|
};
|
174
170
|
},
|
175
|
-
watch: {
|
176
|
-
searchData: {
|
177
|
-
handler(val) {
|
178
|
-
this.$emit("update:searchFields", val);
|
179
|
-
},
|
180
|
-
deep: true
|
181
|
-
},
|
182
|
-
searchFields(val) {
|
183
|
-
this.searchData = val;
|
184
|
-
},
|
185
|
-
tableData: {
|
186
|
-
handler(val) {
|
187
|
-
this.$emit("update:tableFields", val);
|
188
|
-
},
|
189
|
-
deep: true
|
190
|
-
},
|
191
|
-
tableFields(val) {
|
192
|
-
this.tableData = val;
|
193
|
-
}
|
194
|
-
},
|
195
171
|
mounted() {},
|
196
172
|
methods: {
|
197
|
-
handleSearchMoveEnd(val) {
|
198
|
-
this.$emit("move", { type: "search", data: val });
|
199
|
-
},
|
200
|
-
handleTableMoveEnd(val) {
|
201
|
-
this.$emit("move", { type: "table", data: val });
|
202
|
-
},
|
203
173
|
handleStaticData(val) {
|
204
174
|
this.dialog = {
|
205
175
|
visible: true,
|
package/packages/index.js
CHANGED
@@ -75,9 +75,9 @@ const components = [
|
|
75
75
|
];
|
76
76
|
|
77
77
|
// 这一步判断window.Vue是否存在,因为直接引用vue.min.js, 它会把Vue绑到Window上,我们直接引用打包好的js才能正常跑起来。
|
78
|
-
if (typeof window !== "undefined" && window.Vue) {
|
79
|
-
|
80
|
-
}
|
78
|
+
// if (typeof window !== "undefined" && window.Vue) {
|
79
|
+
// window.Vue.component("v-drawer", components);
|
80
|
+
// }
|
81
81
|
|
82
82
|
const install = function(Vue, opts = {}) {
|
83
83
|
if (!opts.store) {
|
@@ -91,7 +91,8 @@ const install = function(Vue, opts = {}) {
|
|
91
91
|
Vue.component(component.name, component);
|
92
92
|
});
|
93
93
|
|
94
|
-
|
94
|
+
// 配置信息
|
95
|
+
Vue.prototype.$th_config = {
|
95
96
|
size: opts.size || "",
|
96
97
|
zIndex: opts.zIndex || 2000
|
97
98
|
};
|