lw-cdp-ui 1.1.11 → 1.1.12

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.
@@ -335,7 +335,9 @@
335
335
 
336
336
  <!-- 没有组件是component值 就是插槽名称 -->
337
337
  <template v-else>
338
- <slot :name="item.component" :itemCur="item" :formCur="form">
338
+ <slot :name="item.component"
339
+ :itemCur="item"
340
+ :formCur="form">
339
341
  <el-tag type="danger">[{{ item.component }}]
340
342
  没有这个默认组件也未自定义插槽内容</el-tag>
341
343
  </slot>
@@ -1,15 +1,15 @@
1
1
  <template>
2
- <el-skeleton v-if="renderLoading || Object.keys(form).length==0"
2
+ <el-skeleton v-if="renderLoading || Object.keys(form).length == 0"
3
3
  animated />
4
- <el-row :gutter="20"
4
+ <el-row :gutter="0"
5
5
  v-else>
6
6
  <template v-for="(item, index) in config.formItems">
7
7
  <template v-if="!hideHandle(item)">
8
8
  <template v-if="item.component == 'divider'">
9
9
  <el-col :span="item.span || 24"
10
- :class="{topPadding: index !== 0}">
10
+ :class="{ topPadding: index !== 0 }">
11
11
  <div class="top-title-body">
12
- <span class="title-name">{{ item.label }}</span>
12
+ <span class="lw-form-view-title-name">{{ item.label }}</span>
13
13
  <slot :name="item.options?.component"></slot>
14
14
  </div>
15
15
  </el-col>
@@ -19,7 +19,7 @@
19
19
  <div class="span-item"
20
20
  :class="[config.labelPosition]">
21
21
  <span v-if="item.label"
22
- :style="{minWidth: config.labelWidth}"
22
+ :style="{ minWidth: config.labelWidth }"
23
23
  class="title-item">
24
24
  {{ item.label }}
25
25
  <el-tooltip v-if="item.tips"
@@ -29,7 +29,7 @@
29
29
  </span>
30
30
  <!-- input -->
31
31
  <template
32
- v-if="item.component=='input' || item.component=='number'">
32
+ v-if="item.component == 'input' || item.component == 'number'">
33
33
  <template v-if="item?.options?.name">
34
34
  <textToPassword v-model="form[item.name][item.options.name]"
35
35
  :width="config.labelWidth"
@@ -41,7 +41,7 @@
41
41
  </template>
42
42
  </template>
43
43
  <!-- upload -->
44
- <template v-else-if="item.component=='upload'">
44
+ <template v-else-if="item.component == 'upload'">
45
45
  <el-col v-for="(_item, _index) in item.options.items"
46
46
  :key="_index">
47
47
  <template v-if="item.name">
@@ -58,7 +58,7 @@
58
58
  </el-col>
59
59
  </template>
60
60
  <!-- checkbox -->
61
- <template v-else-if="item.component=='checkbox'">
61
+ <template v-else-if="item.component == 'checkbox'">
62
62
  <template v-if="item.name">
63
63
  {{ form[item.name][_item.name] }}
64
64
  </template>
@@ -67,11 +67,11 @@
67
67
  </template>
68
68
  </template>
69
69
  <!-- checkboxGroup -->
70
- <template v-else-if="item.component=='checkboxGroup'">
70
+ <template v-else-if="item.component == 'checkboxGroup'">
71
71
  {{ form[item.name] }}
72
72
  </template>
73
73
  <!-- switch -->
74
- <template v-else-if="item.component=='switch'">
74
+ <template v-else-if="item.component == 'switch'">
75
75
  <template v-if="item?.options?.name">
76
76
  {{ form[item.name][item.options.name] ? item.options.true || '是' : item.options.false || '否' }}
77
77
  </template>
@@ -81,16 +81,16 @@
81
81
  </template>
82
82
  <!-- select -->
83
83
  <template
84
- v-else-if="item.component=='select' || item.component=='radio'">
84
+ v-else-if="item.component == 'select' || item.component == 'radio'">
85
85
  <template v-if="item?.options?.name">
86
- {{getKeyToLabel(form[item.name][item.options.name], item.options.items)}}
86
+ {{ getKeyToLabel(form[item.name][item.options.name], item.options.items) }}
87
87
  </template>
88
88
  <template v-else>
89
- {{getKeyToLabel(form[item.name], item.options.items)}}
89
+ {{ getKeyToLabel(form[item.name], item.options.items) }}
90
90
  </template>
91
91
  </template>
92
92
  <!-- cascader -->
93
- <template v-else-if="item.component=='cascader'">
93
+ <template v-else-if="item.component == 'cascader'">
94
94
  <template v-if="item?.options?.name">
95
95
  <el-cascader v-model="form[item.name][item.options.name]"
96
96
  :options="item.options.items"
@@ -103,9 +103,10 @@
103
103
  </template>
104
104
  </template>
105
105
  <!-- date -->
106
- <template v-else-if="item.component=='date'">
106
+ <template v-else-if="item.component == 'date'">
107
107
  <template v-if="item?.options?.name">
108
- {{ dayjs(form[item.name][item.options.name]).format(item.options.valueFormat || 'YYYY-MM-DD HH:mm:ss') }}
108
+ {{ dayjs(form[item.name][item.options.name]).format(item.options.valueFormat || 'YYYY-MM-DD HH:mm:ss')
109
+ }}
109
110
 
110
111
  </template>
111
112
  <template v-else>
@@ -114,7 +115,7 @@
114
115
 
115
116
  </template>
116
117
  <!-- color -->
117
- <template v-else-if="item.component=='color'">
118
+ <template v-else-if="item.component == 'color'">
118
119
  <template v-if="item?.options?.name">
119
120
  <el-color-picker disabled
120
121
  v-model="form[item.name][item.options.name]" />
@@ -126,7 +127,7 @@
126
127
 
127
128
  </template>
128
129
  <!-- rate -->
129
- <template v-else-if="item.component=='rate'">
130
+ <template v-else-if="item.component == 'rate'">
130
131
  <template v-if="item?.options?.name">
131
132
  <el-rate disabled
132
133
  v-model="form[item.name][item.options.name]"></el-rate>
@@ -137,7 +138,7 @@
137
138
  </template>
138
139
  </template>
139
140
  <!-- slider -->
140
- <template v-else-if="item.component=='slider'">
141
+ <template v-else-if="item.component == 'slider'">
141
142
  <template v-if="item?.options?.name">
142
143
  <el-slider disabled
143
144
  v-model="form[item.name][item.options.name]"
@@ -152,7 +153,7 @@
152
153
  </template>
153
154
 
154
155
  <!-- tags -->
155
- <template v-else-if="item.component=='tags'">
156
+ <template v-else-if="item.component == 'tags'">
156
157
  <div class="tags-list">
157
158
  <template v-if="item?.options?.name">
158
159
  <el-tag v-for="tag in form[item.name][item?.options?.name]"
@@ -175,12 +176,12 @@
175
176
  <template v-else>
176
177
  <slot :name="item.component">
177
178
  <el-tag type="danger">
178
- [{{item.component}}]
179
+ [{{ item.component }}]
179
180
  没有这个默认组件也未自定义插槽内容</el-tag>
180
181
  </slot>
181
182
  </template>
182
183
  <div v-if="item.message"
183
- class="el-form-item-msg">{{item.message}}</div>
184
+ class="el-form-item-msg">{{ item.message }}</div>
184
185
  </div>
185
186
  </el-col>
186
187
  </template>
@@ -337,16 +338,21 @@ export default {
337
338
  </script>
338
339
  <style lang="scss" scoped>
339
340
  .topPadding {
340
- margin-top: 20px;
341
+ border-top: 2px solid #f7f8fa;
342
+ margin-top: 30px;
343
+ padding-top: 30px;
341
344
  }
345
+
342
346
  .top-title-body {
343
347
  display: flex;
344
348
  justify-content: space-between;
349
+ align-items: center;
345
350
  width: 100%;
346
- .title-name {
351
+ height: 30px;
352
+ margin-bottom: 5px;
353
+ .lw-form-view-title-name {
347
354
  font-size: 18px;
348
355
  font-weight: bold;
349
- margin-bottom: 10px;
350
356
  }
351
357
  }
352
358
 
@@ -359,14 +365,17 @@ export default {
359
365
  line-height: 24px;
360
366
  font-size: 14px;
361
367
  width: 100%;
368
+
362
369
  &.top {
363
370
  flex-direction: column;
364
371
  }
372
+
365
373
  &.right {
366
374
  .title-item {
367
375
  text-align: right;
368
376
  }
369
377
  }
378
+
370
379
  .title-item {
371
380
  color: #7c7c7c;
372
381
  display: inline-block;
@@ -293,7 +293,6 @@ export default {
293
293
  data() {
294
294
  return {
295
295
  settingDialog: false,
296
- changeMenu: false,
297
296
  menu: [],
298
297
  nextMenu: [],
299
298
  pmenu: {},
@@ -314,13 +313,6 @@ export default {
314
313
  return this.$store.state.global.menuIsCollapse
315
314
  }
316
315
  },
317
- beforeCreate() {
318
- // 挂载菜单订阅
319
- this.$bus.$on('setMenu', (menu) => {
320
- this.changeMenu = true
321
- this.menu = this.filterUrl(menu)
322
- })
323
- },
324
316
  async created() {
325
317
  // 标识当前项目
326
318
  let isCombined = this.$tool.data.get("MENUCOMBINED")
@@ -330,13 +322,16 @@ export default {
330
322
 
331
323
  this.onLayoutResize();
332
324
  window.addEventListener('resize', this.onLayoutResize);
333
- this.getUserInfo();
334
- if (!this.changeMenu) {
335
- var menu = this.$router.sc_getMenu();
336
- this.menu = this.filterUrl(menu);
337
- }
325
+ await this.getUserInfo();
326
+ var menu = this.$router.sc_getMenu();
327
+ this.menu = this.filterUrl(menu);
338
328
  this.showThis()
339
329
  this.$store.commit("LOAD_USER_FROM_LOCAL_STORAGE")
330
+
331
+ // 挂载菜单订阅
332
+ this.$bus.$on('setMenu', (menu) => {
333
+ this.menu = this.filterUrl(menu)
334
+ })
340
335
  },
341
336
  watch: {
342
337
  async $route() {
@@ -396,7 +391,6 @@ export default {
396
391
  },
397
392
  //转换外部链接的路由
398
393
  filterUrl(map) {
399
-
400
394
  var newMap = []
401
395
  map && map.forEach(item => {
402
396
  item.meta = item.meta ? item.meta : {};
@@ -414,8 +408,6 @@ export default {
414
408
  }
415
409
  newMap.push(item)
416
410
  })
417
-
418
- this.changeMenu = false
419
411
  return newMap;
420
412
  },
421
413
  //退出最大化
@@ -1165,7 +1165,6 @@ const iframeView = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_ren
1165
1165
  data() {
1166
1166
  return {
1167
1167
  settingDialog: !1,
1168
- changeMenu: !1,
1169
1168
  menu: [],
1170
1169
  nextMenu: [],
1171
1170
  pmenu: {},
@@ -1186,17 +1185,12 @@ const iframeView = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_ren
1186
1185
  return this.$store.state.global.menuIsCollapse;
1187
1186
  }
1188
1187
  },
1189
- beforeCreate() {
1190
- this.$bus.$on("setMenu", (o) => {
1191
- this.changeMenu = !0, this.menu = this.filterUrl(o);
1192
- });
1193
- },
1194
1188
  async created() {
1195
- if (this.$tool.data.get("MENUCOMBINED") && this.$tool.data.set("MENUCOMBINEDNMAE", this.$config.APP_NAME), this.onLayoutResize(), window.addEventListener("resize", this.onLayoutResize), this.getUserInfo(), !this.changeMenu) {
1196
- var l = this.$router.sc_getMenu();
1197
- this.menu = this.filterUrl(l);
1198
- }
1199
- this.showThis(), this.$store.commit("LOAD_USER_FROM_LOCAL_STORAGE");
1189
+ this.$tool.data.get("MENUCOMBINED") && this.$tool.data.set("MENUCOMBINEDNMAE", this.$config.APP_NAME), this.onLayoutResize(), window.addEventListener("resize", this.onLayoutResize), await this.getUserInfo();
1190
+ var l = this.$router.sc_getMenu();
1191
+ this.menu = this.filterUrl(l), this.showThis(), this.$store.commit("LOAD_USER_FROM_LOCAL_STORAGE"), this.$bus.$on("setMenu", (r) => {
1192
+ this.menu = this.filterUrl(r);
1193
+ });
1200
1194
  },
1201
1195
  watch: {
1202
1196
  async $route() {
@@ -1244,7 +1238,7 @@ const iframeView = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_ren
1244
1238
  if (r.meta = r.meta ? r.meta : {}, r.meta.hidden || r.meta.type == "button")
1245
1239
  return !1;
1246
1240
  r.meta.type == "iframe" && (r.path = `/i/${r.name}`), r.children && r.children.length > 0 && (r.children = this.filterUrl(r.children)), l.push(r);
1247
- }), this.changeMenu = !1, l;
1241
+ }), l;
1248
1242
  },
1249
1243
  //退出最大化
1250
1244
  exitMaximize() {
@@ -6107,7 +6101,7 @@ function _sfc_render$6(o, l, r, m, i, p) {
6107
6101
  [T, r.loading]
6108
6102
  ]);
6109
6103
  }
6110
- const lwForm = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-0ba6beb1"]]), config$1 = {
6104
+ const lwForm = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render$6], ["__scopeId", "data-v-9e248ff8"]]), config$1 = {
6111
6105
  icons: [
6112
6106
  {
6113
6107
  name: "默认",
@@ -7582,7 +7576,7 @@ const textToPassword = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc
7582
7576
  },
7583
7577
  dayjs
7584
7578
  }
7585
- }, _hoisted_1$1 = { class: "top-title-body" }, _hoisted_2$1 = { class: "title-name" }, _hoisted_3 = {
7579
+ }, _hoisted_1$1 = { class: "top-title-body" }, _hoisted_2$1 = { class: "lw-form-view-title-name" }, _hoisted_3 = {
7586
7580
  key: 12,
7587
7581
  class: "tags-list"
7588
7582
  }, _hoisted_4 = {
@@ -7596,7 +7590,7 @@ function _sfc_render$1(o, l, r, m, i, p) {
7596
7590
  animated: ""
7597
7591
  })) : (openBlock(), createBlock(oe, {
7598
7592
  key: 1,
7599
- gutter: 20
7593
+ gutter: 0
7600
7594
  }, {
7601
7595
  default: withCtx(() => [
7602
7596
  (openBlock(!0), createElementBlock(Fragment, null, renderList(r.config.formItems, (_, G) => (openBlock(), createElementBlock(Fragment, null, [
@@ -7786,7 +7780,7 @@ function _sfc_render$1(o, l, r, m, i, p) {
7786
7780
  _: 3
7787
7781
  }));
7788
7782
  }
7789
- const lwFormView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-0c2eb1e0"]]), _sfc_main = {
7783
+ const lwFormView = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1], ["__scopeId", "data-v-021cd72b"]]), _sfc_main = {
7790
7784
  name: "lwCronSelect",
7791
7785
  props: {
7792
7786
  disabled: {