tianheng-ui 0.1.68 → 0.1.70

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 (45) hide show
  1. package/lib/theme-chalk/js/axios.js +1 -1
  2. package/lib/theme-chalk/styles/dialog.scss +56 -40
  3. package/lib/theme-chalk/styles/feature.scss +7 -0
  4. package/lib/theme-chalk/styles/icon.css +8 -2
  5. package/lib/tianheng-ui.js +13 -13
  6. package/package.json +1 -1
  7. package/packages/Dialog/index.vue +18 -9
  8. package/packages/FormMaking/GenerateForm.vue +40 -49
  9. package/packages/FormMaking/GenerateFormItem.vue +10 -26
  10. package/packages/FormMaking/WidgetFormItem.vue +9 -7
  11. package/packages/FormMaking/WidgetGuide.vue +86 -0
  12. package/packages/FormMaking/WidgetSelect.vue +2 -2
  13. package/packages/FormMaking/WidgetTools.vue +10 -7
  14. package/packages/FormMaking/config/index.js +2 -0
  15. package/packages/FormMaking/custom/config.js +7 -36
  16. package/packages/FormMaking/custom/configs/grid.vue +17 -9
  17. package/packages/FormMaking/custom/configs/list.vue +89 -8
  18. package/packages/FormMaking/custom/configs/radio.vue +2 -5
  19. package/packages/FormMaking/custom/configs/table.vue +12 -9
  20. package/packages/FormMaking/custom/configs/tabs.vue +69 -55
  21. package/packages/FormMaking/custom/index.js +1 -1
  22. package/packages/FormMaking/custom/items/grid_dev.vue +5 -8
  23. package/packages/FormMaking/custom/items/list_dev.vue +19 -23
  24. package/packages/FormMaking/custom/items/list_pro.vue +109 -6
  25. package/packages/FormMaking/custom/items/table_dev.vue +13 -12
  26. package/packages/FormMaking/custom/items/table_pro.vue +5 -5
  27. package/packages/FormMaking/custom/items/tabs_dev.vue +4 -7
  28. package/packages/FormMaking/custom/items/tabs_pro.vue +7 -9
  29. package/packages/FormMaking/custom/items/upload.vue +3 -1
  30. package/packages/FormMaking/index.vue +72 -78
  31. package/packages/FormMaking/lang/zh-CN.js +2 -2
  32. package/packages/FormMaking/network/axios.js +88 -0
  33. package/packages/FormMaking/styles/index.scss +3 -3
  34. package/packages/FormMaking/util/Log.js +99 -0
  35. package/packages/FormMaking/util/generateCode.js +2 -2
  36. package/packages/TableMaking/config/index.js +8 -0
  37. package/packages/TableMaking/generateTable.vue +10 -3
  38. package/packages/TableMaking/index.vue +18 -3
  39. package/packages/TableMaking/network/axios.js +88 -0
  40. package/packages/TableMaking/util/Log.js +99 -0
  41. package/packages/TableMaking/widgetGuide.vue +122 -58
  42. package/packages/FormMaking/custom/configs/tableH5.vue +0 -98
  43. package/packages/FormMaking/custom/items/tableH5_dev.vue +0 -112
  44. package/packages/FormMaking/custom/items/tableH5_pro.vue +0 -119
  45. package/packages/FormMaking/util/request.js +0 -25
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tianheng-ui",
3
3
  "description": "A Vue.js project",
4
- "version": "0.1.68",
4
+ "version": "0.1.70",
5
5
  "author": "shu lang <403732931@qq.com>",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -1,7 +1,8 @@
1
1
  <template>
2
2
  <el-dialog
3
- class="th-dialog"
4
- :class="[customClass]"
3
+ :class="
4
+ `th-dialog ${customClass} ${showFooter ? '' : 'th-dialog_hideFooter'}`
5
+ "
5
6
  :visible.sync="visible"
6
7
  :width="width"
7
8
  :top="top"
@@ -15,18 +16,24 @@
15
16
  :before-close="handleBeforeClose"
16
17
  :destroy-on-close="destroyOnClose"
17
18
  >
18
- <div slot="title" class="th-dialog__header">
19
- <div class="th-dialog__title">{{ title }}</div>
20
- <div class="th-dialog__action">
19
+ <div slot="title" class="th-dialog_header">
20
+ <div
21
+ :class="
22
+ `th-dialog_title ${titleCenter ? 'th-dialog_title__center' : ''}`
23
+ "
24
+ >
25
+ {{ title }}
26
+ </div>
27
+ <div class="th-dialog_action">
21
28
  <i
22
29
  v-if="showFullscreen"
23
- class="th-dialog__action_item"
30
+ class="th-dialog_action_item fullscreen th-animation_button__hover"
24
31
  :class="fullscreenIcon"
25
32
  @click="handleFullscreenChange"
26
33
  ></i>
27
34
  <i
28
35
  v-if="showClose"
29
- class="th-dialog__action_item "
36
+ class="th-dialog_action_item close th-animation_button__hover"
30
37
  :class="closeIcon"
31
38
  @click="handleBeforeClose"
32
39
  ></i>
@@ -41,11 +48,12 @@
41
48
  <el-button
42
49
  v-if="showAffirm"
43
50
  type="primary"
51
+ size="small"
44
52
  :loading="affirmLoading"
45
53
  @click="handleAffirm"
46
54
  >{{ affirmText }}</el-button
47
55
  >
48
- <el-button v-if="showCancel" @click="handleClose">{{
56
+ <el-button v-if="showCancel" size="small" @click="handleClose">{{
49
57
  cancelText
50
58
  }}</el-button>
51
59
  </template>
@@ -61,8 +69,9 @@ export default {
61
69
  },
62
70
  props: {
63
71
  visible: Boolean,
64
- title: { type: String, default: "" },
65
72
  width: { type: String, default: "800px" },
73
+ title: { type: String, default: "" },
74
+ titleCenter: { type: Boolean, default: false },
66
75
  fullscreen: { type: Boolean, default: false },
67
76
  top: { type: String, default: "15vh" },
68
77
  modal: { type: Boolean, default: true },
@@ -4,11 +4,11 @@
4
4
  class="generateForm"
5
5
  :class="{ isHideLabel: formConfig.config.hideLabel }"
6
6
  :style="{ width: formConfig.config.width }"
7
- :label-suffix="formConfig.config.labelSuffix"
8
- :size="formConfig.config.size"
9
7
  :model="models"
8
+ :label-suffix="formConfig.config.labelSuffix"
10
9
  :label-position="formConfig.config.labelPosition"
11
10
  :label-width="formConfig.config.labelWidth + 'px'"
11
+ :size="formConfig.config.size"
12
12
  ref="generateForm"
13
13
  >
14
14
  <genetate-form-item
@@ -36,9 +36,10 @@
36
36
  </template>
37
37
 
38
38
  <script>
39
- import * as Axios from "lib/theme-chalk/js/axios";
40
- import { deepClone, getProperty, setProperty } from "./util/index";
41
39
  import GenetateFormItem from "./GenerateFormItem";
40
+ import * as Axios from "./network/axios";
41
+ import appConfig from "./config/index";
42
+ import { deepClone, getProperty, setProperty } from "./util/index";
42
43
 
43
44
  export default {
44
45
  name: "thFormGenerate",
@@ -95,18 +96,21 @@ export default {
95
96
  console.log("watch models =>", this.models);
96
97
  }
97
98
  },
98
- created() {
99
- localStorage.setItem("_TH_OauthConfig", JSON.stringify(this.oauthConfig));
100
- this.axios = Axios.init(this.oauthConfig);
101
- },
99
+ created() {},
102
100
  mounted() {
101
+ sessionStorage.setItem(
102
+ appConfig.storageKeys.oauthConfig,
103
+ JSON.stringify(this.oauthConfig)
104
+ );
105
+ this.axios = Axios.init(this.oauthConfig);
106
+
103
107
  this.generateModle(this.formConfig.list, this.models);
104
108
  console.log("mounted models =>", this.models);
105
109
  this.handleMountedRemotData();
106
110
  this.showForm = true;
107
111
  },
108
112
  methods: {
109
- generateModle(genList, modelObj, pModel) {
113
+ generateModle(genList, modelObj) {
110
114
  if (!genList) return;
111
115
  genList.map(item => {
112
116
  if (item.type === "grid") {
@@ -130,28 +134,25 @@ export default {
130
134
  dic[item2.value] = {};
131
135
  this.generateModle(item2.list, dic[item2.value]);
132
136
  });
133
- } else if (item.type === "table" || item.type === "tableH5") {
134
- const arr = item.options.defaultValue
135
- ? JSON.parse(item.options.defaultValue)
136
- : "";
137
- const dic = {};
138
- modelObj[item.model] = arr || [dic];
139
-
140
- this.generateModle(item.options.columns, dic);
141
- } else if (item.type === "blank") {
142
- const value = eval(`this.value.${item.model}`);
143
- const defaultValue = { String: "", Object: {}, Array: [] }[
144
- item.options.defaultType
145
- ];
146
- modelObj[item.model] = value || defaultValue;
137
+ } else if (item.type === "table" || item.type === "list") {
138
+ !item.options.defaultValue && (item.options.defaultValue = []);
139
+ modelObj[item.model] = deepClone(item.options.defaultValue);
140
+ this.generateModle(item.options.columns);
141
+ } else if (item.type === "blank" && modelObj) {
142
+ const value =
143
+ getProperty(this.value, item.model) ||
144
+ { String: "", Object: {}, Array: [] }[item.options.defaultType];
145
+ // setProperty(modelObj, item.model, value);
146
+ this.$set(modelObj, item.model, value);
147
+ this.generateRules(item);
148
+ } else if (modelObj) {
149
+ const value =
150
+ getProperty(this.value, item.model) ||
151
+ JSON.parse(JSON.stringify(item.options.defaultValue));
152
+ // setProperty(modelObj, item.model, value);
153
+ this.$set(modelObj, item.model, value);
147
154
  this.generateRules(item);
148
155
  } else {
149
- // const value = this.value ? eval(`this.value.${item.model}`) : "";
150
- const value = this.value[item.model];
151
- const defaultValue = JSON.parse(
152
- JSON.stringify(item.options.defaultValue)
153
- );
154
- this.$set(modelObj, item.model, value || defaultValue);
155
156
  this.generateRules(item);
156
157
  }
157
158
  });
@@ -168,13 +169,13 @@ export default {
168
169
  item.rules = [];
169
170
  }
170
171
  // 配置必填项校验
171
- if (item.options.required) {
172
- item.rules.push({
173
- required: true,
174
- message: "必需项",
175
- trigger: "change"
176
- });
177
- }
172
+ // if (item.options.required) {
173
+ // item.rules.push({
174
+ // required: true,
175
+ // message: "必需项",
176
+ // trigger: "change"
177
+ // });
178
+ // }
178
179
  this.hendleElementRemoteData(item);
179
180
  },
180
181
  // 获取组件的远端数据
@@ -298,7 +299,9 @@ export default {
298
299
  initParams(item.children);
299
300
  } else {
300
301
  const value =
301
- item.defaultValue || getProperty(this.models, item.pAlias) || null;
302
+ item.defaultValue ||
303
+ getProperty(this.models, item.pAlias) ||
304
+ null;
302
305
  setProperty(params, item.pAlias, value);
303
306
  }
304
307
  });
@@ -380,17 +383,5 @@ export default {
380
383
  margin-left: 0 !important;
381
384
  }
382
385
  }
383
-
384
- .tableH5 {
385
- // 操作按钮布局
386
- .tableH5-item > div {
387
- display: flex;
388
-
389
- .actions {
390
- align-items: center;
391
- justify-content: right;
392
- }
393
- }
394
- }
395
386
  }
396
387
  </style>
@@ -8,7 +8,7 @@
8
8
  :label="widget.options.hideLabel ? '' : widget.name"
9
9
  :label-width="labelWidth"
10
10
  :prop="pModel ? `${pModel}.${widget.model}` : widget.model"
11
- :rules="widget.rules"
11
+ :rules="getRules"
12
12
  :ref="widget.model"
13
13
  >
14
14
  <component
@@ -31,9 +31,7 @@
31
31
 
32
32
  <script>
33
33
  import { deepClone } from "./util/index";
34
- import { VueEditor } from "vue2-editor";
35
34
  import compsData from "./custom/register";
36
- import FmUpload from "./Upload";
37
35
 
38
36
  export default {
39
37
  name: "generate-form-item",
@@ -46,12 +44,10 @@ export default {
46
44
  "config",
47
45
  "componentsData"
48
46
  ],
49
- components: { FmUpload, VueEditor },
50
47
  data() {
51
48
  return {
52
49
  compsData: deepClone(compsData),
53
50
  dataModel: this.model
54
- // dataModel: this.models[this.widget.model]
55
51
  };
56
52
  },
57
53
  watch: {
@@ -60,26 +56,7 @@ export default {
60
56
  },
61
57
  dataModel(val) {
62
58
  this.$emit("update:model", val);
63
- },
64
- // dataModel: {
65
- // deep: true,
66
- // handler(val) {
67
- // console.log("watch dataModel =>", val);
68
- // this.models[this.widget.model] = val;
69
- // this.$emit("update:models", {
70
- // ...this.models,
71
- // [this.widget.model]: val
72
- // });
73
- // this.$emit("input-change", val, this.widget.model);
74
- // }
75
- // },
76
- // models: {
77
- // deep: true,
78
- // handler(val) {
79
- // console.log("watch models =>", val);
80
- // this.dataModel = val[this.widget.model];
81
- // }
82
- // }
59
+ }
83
60
  },
84
61
  computed: {
85
62
  labelWidth() {
@@ -88,13 +65,20 @@ export default {
88
65
  return `${this.widget.options.labelWidth}px`;
89
66
 
90
67
  return "";
68
+ },
69
+ getRules() {
70
+ return this.widget.options.required
71
+ ? [
72
+ ...this.widget.rules,
73
+ { required: true, message: "必需项", trigger: "change" }
74
+ ]
75
+ : this.widget.rules;
91
76
  }
92
77
  },
93
78
  created() {
94
79
  const proComponentsPath = {
95
80
  grid: "grid_pro",
96
81
  table: "table_pro",
97
- tableH5: "tableH5_pro",
98
82
  list: "list_pro",
99
83
  tabs: "tabs_pro",
100
84
  blank: "blank_pro"
@@ -61,7 +61,7 @@ export default {
61
61
  return {
62
62
  compsData: deepClone(compsData),
63
63
  selectWidget: this.select,
64
- layoutElements: ["grid", "tabs", "table", "tableH5", "list", "alliance"]
64
+ layoutElements: ["grid", "tabs", "table", "list", "alliance"]
65
65
  };
66
66
  },
67
67
  watch: {
@@ -88,7 +88,6 @@ export default {
88
88
  const devComponentsPath = {
89
89
  grid: "grid_dev",
90
90
  table: "table_dev",
91
- tableH5: "tableH5_dev",
92
91
  list: "list_dev",
93
92
  tabs: "tabs_dev",
94
93
  blank: "blank_dev"
@@ -128,12 +127,11 @@ export default {
128
127
  const key = `${Date.parse(new Date().toString())}_${Math.ceil(
129
128
  Math.random() * 99999
130
129
  )}`;
131
-
132
130
  item.key = key;
133
131
  item.model = `${item.type}_${key}`;
134
132
 
135
- if (["table", "tableH5"].includes(item.type)) {
136
- item.list.forEach(element => {
133
+ if (["table", "list"].includes(item.type)) {
134
+ item.options.columns.forEach(element => {
137
135
  initKey(element);
138
136
  });
139
137
  }
@@ -154,8 +152,12 @@ export default {
154
152
  };
155
153
  initKey(data);
156
154
 
157
- this.widgetArray.splice(this.widgetIndex, 0, data);
158
- this.selectWidget = data;
155
+ // 追加在最后
156
+ this.widgetArray.push(data);
157
+
158
+ // 追加在当前组件前
159
+ // this.widgetArray.splice(this.widgetIndex, 0, data);
160
+ // this.selectWidget = data;
159
161
  }
160
162
  }
161
163
  };
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <div class="widgetGuide">
3
+ <el-steps :active="step" finish-status="success" simple>
4
+ <el-step title="表单配置" icon="el-icon-s-operation" description="">
5
+ </el-step>
6
+ <el-step title="按钮配置" icon="el-icon-set-up" description=""></el-step>
7
+ </el-steps>
8
+ <div class="content">
9
+ <div v-show="step === 0">
10
+ <div>你好</div>
11
+ <div>让我们来了解一些基本信息</div>
12
+ </div>
13
+ <div v-show="step === 1"></div>
14
+ </div>
15
+ <div class="footer">
16
+ <div></div>
17
+ <div class="stepView">
18
+ <el-button
19
+ type="primary"
20
+ icon="el-icon-back"
21
+ size="small"
22
+ :disabled="step === 0"
23
+ @click="handleBack"
24
+ >上一步</el-button
25
+ >
26
+ <el-button type="primary" size="small" @click="handleNext"
27
+ >下一步<i class="el-icon-right el-icon--right"></i
28
+ ></el-button>
29
+ </div>
30
+ </div>
31
+ </div>
32
+ </template>
33
+
34
+ <script>
35
+ export default {
36
+ props: { visible: { type: Boolean, default: true } },
37
+ data() {
38
+ return {
39
+ show: this.visible,
40
+ step: 0
41
+ };
42
+ },
43
+ watch: {
44
+ visible(val) {
45
+ this.show = val;
46
+ },
47
+ show(val) {
48
+ this.$emit("update:visible", val);
49
+ }
50
+ },
51
+ created() {},
52
+ mounted() {},
53
+ methods: {
54
+ handleBack() {
55
+ this.step--;
56
+ },
57
+ handleNext() {
58
+ this.step++;
59
+ },
60
+ handleClose() {
61
+ this.show = !this.show;
62
+ }
63
+ }
64
+ };
65
+ </script>
66
+
67
+ <style lang="scss" scoped>
68
+ .widgetGuide {
69
+ width: 100%;
70
+ height: 100%;
71
+
72
+ .content {
73
+ height: calc(100% - 50px);
74
+ }
75
+ .footer {
76
+ height: 50px;
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: space-between;
80
+ box-sizing: border-box;
81
+
82
+ .stepView {
83
+ }
84
+ }
85
+ }
86
+ </style>
@@ -7,7 +7,7 @@
7
7
  'grid',
8
8
  'tabs',
9
9
  'table',
10
- 'tableH5',
10
+ 'list',
11
11
  'alliance'
12
12
  ].includes(widget.type)
13
13
  }"
@@ -74,7 +74,7 @@ export default {
74
74
  item.key = key;
75
75
  item.model = `${item.type}_${key}`;
76
76
 
77
- if (["table", "tableH5"].includes(item.type)) {
77
+ if (["table", "list"].includes(item.type)) {
78
78
  item.list.forEach(element => {
79
79
  initKey(element);
80
80
  });
@@ -176,8 +176,10 @@
176
176
  </div>
177
177
  </generate-form>
178
178
  <template slot="footer">
179
- <el-button type="primary" @click="handleGetData">获取数据</el-button>
180
- <el-button @click="handleReset">重置</el-button>
179
+ <el-button type="primary" size="small" @click="handleGetData"
180
+ >获取数据</el-button
181
+ >
182
+ <el-button size="small" @click="handleReset">重置</el-button>
181
183
  </template>
182
184
  </template>
183
185
  <template v-if="dialog.action === 'previewH5'">
@@ -198,8 +200,10 @@
198
200
  </generate-form>
199
201
  </div>
200
202
  <template slot="footer">
201
- <el-button type="primary" @click="handleGetData">获取数据</el-button>
202
- <el-button @click="handleReset">重置</el-button>
203
+ <el-button type="primary" size="small" @click="handleGetData"
204
+ >获取数据</el-button
205
+ >
206
+ <el-button size="small" @click="handleReset">重置</el-button>
203
207
  </template>
204
208
  </template>
205
209
  </th-dialog>
@@ -224,7 +228,6 @@
224
228
  <script>
225
229
  import { deepClone } from "./util/index";
226
230
  import * as XLSX from "xlsx/xlsx.mjs";
227
- import request from "./util/request";
228
231
  import generateCode from "./util/generateCode.js";
229
232
  import GenerateForm from "./GenerateForm";
230
233
  export default {
@@ -478,11 +481,11 @@ export default {
478
481
  item.options.columns.forEach(e => {
479
482
  initList(e.list);
480
483
  });
481
- } else if (item.type === "table" || item.type === "tableH5") {
484
+ } else if (item.type === "table" || item.type === "list") {
482
485
  initList(item.options.columns);
483
486
  } else if (item.type === "workflow") {
484
487
  initList(item.options.buttons);
485
- } else if (item.options.remote?.open || item.options.remote?.api) {
488
+ } else if (item.options.remote?.open || item.options.remote?.api) {
486
489
  fieldsApi[item.model || item.name] = item.options.remote.api;
487
490
  }
488
491
  }
@@ -1,4 +1,6 @@
1
1
  export default {
2
+ title: "FormMaking",
3
+ logo: '',
2
4
  version: "1.0.0",
3
5
  storageKeys: {
4
6
  oauthConfig: "_TH_OauthConfig"
@@ -254,7 +254,7 @@ export const basicComponents = [
254
254
  rules: []
255
255
  },
256
256
  {
257
- name: "下拉选择框",
257
+ name: "下拉选择器",
258
258
  type: "select",
259
259
  icon: "icon-select",
260
260
  options: {
@@ -597,12 +597,12 @@ export const basicComponents = [
597
597
 
598
598
  export const advanceComponents = [
599
599
  {
600
- name: "子表单",
600
+ name: "子表格",
601
601
  type: "table",
602
602
  icon: "th-icon-insertrowabove",
603
603
  options: {
604
604
  height: "",
605
- defaultValue: "",
605
+ defaultValue: [],
606
606
  columns: [],
607
607
  customClass: "",
608
608
  labelWidth: 100,
@@ -628,41 +628,12 @@ export const advanceComponents = [
628
628
  events: {},
629
629
  rules: []
630
630
  },
631
- {
632
- name: "子表单H5",
633
- type: "tableH5",
634
- icon: "th-icon-insertrowleft",
635
- options: {
636
- defaultValue: "",
637
- columns: [],
638
- customClass: "",
639
- labelWidth: 100,
640
- isLabelWidth: false,
641
- dataBind: true,
642
- validatorCheck: false,
643
- validator: "",
644
- paging: false,
645
- pageSize: 5,
646
- tableColumn: false,
647
- hidden: false,
648
- hideLabel: false,
649
- disabled: false,
650
- required: false,
651
- isAdd: true,
652
- addButtonText: "新增",
653
- isDelete: true,
654
- deleteButtonText: "删除",
655
- deleteIndex: 0 // 可删除的最小索引
656
- },
657
- events: {},
658
- rules: []
659
- },
660
631
  {
661
632
  name: "子列表",
662
633
  type: "list",
663
- icon: "th-icon-orderedlist",
634
+ icon: "th-icon-insertrowleft",
664
635
  options: {
665
- defaultValue: "",
636
+ defaultValue: [],
666
637
  columns: [],
667
638
  customClass: "",
668
639
  labelWidth: 100,
@@ -825,7 +796,7 @@ export const businessComponents = [
825
796
  {
826
797
  name: "描述列表",
827
798
  type: "descriptions",
828
- icon: "th-icon-layout",
799
+ icon: "th-icon-detail",
829
800
  options: {
830
801
  border: false,
831
802
  column: 1,
@@ -925,7 +896,7 @@ export const businessComponents = [
925
896
  {
926
897
  name: "流程节点",
927
898
  type: "workflow",
928
- icon: "th-icon-layout",
899
+ icon: "th-icon-apartment",
929
900
  options: {
930
901
  reverse: false,
931
902
  placement: "right",
@@ -6,10 +6,12 @@
6
6
  </el-form-item>
7
7
 
8
8
  <el-form-item label="栅格间隔">
9
- <el-input
10
- type="number"
11
- v-model.number="widget.options.gutter"
12
- ></el-input>
9
+ <el-input-number
10
+ style="width:100%"
11
+ v-model="widget.options.gutter"
12
+ controls-position="right"
13
+ :min="0"
14
+ ></el-input-number>
13
15
  </el-form-item>
14
16
 
15
17
  <el-form-item label="列配置项">
@@ -28,7 +30,13 @@
28
30
  :key="index"
29
31
  >
30
32
  <i class="drag"><i class="iconfont icon-icon_bars"></i></i>
31
- <el-input v-model.number="item.span" type="number"> </el-input>
33
+ <el-input-number
34
+ style="width:100%"
35
+ v-model="item.span"
36
+ controls-position="right"
37
+ :min="0"
38
+ :max="24"
39
+ ></el-input-number>
32
40
  <el-button
33
41
  class="delete"
34
42
  circle
@@ -39,12 +47,12 @@
39
47
  ></el-button>
40
48
  </div>
41
49
  </draggable>
42
- <div style="margin-left: 22px;text-align: right;">
50
+ <div style="margin-left: 22px;">
43
51
  <el-button type="text" @click="handleAddOption">添加列</el-button>
44
52
  </div>
45
53
  </el-form-item>
46
54
 
47
- <el-form-item label="水平排列方式">
55
+ <el-form-item label="水平排列">
48
56
  <el-select v-model="widget.options.justify">
49
57
  <el-option value="start" label="左对齐"></el-option>
50
58
  <el-option value="end" label="右对齐"></el-option>
@@ -54,7 +62,7 @@
54
62
  </el-select>
55
63
  </el-form-item>
56
64
 
57
- <el-form-item label="垂直排列方式">
65
+ <el-form-item label="垂直排列">
58
66
  <el-select v-model="widget.options.align">
59
67
  <el-option value="top" label="顶部对齐"></el-option>
60
68
  <el-option value="middle" label="居中"></el-option>
@@ -107,7 +115,7 @@ export default {
107
115
  display: flex;
108
116
  align-items: center;
109
117
 
110
- .el-input {
118
+ .el-input-number {
111
119
  margin: 0 5px;
112
120
  }
113
121