lw-cdp-ui 1.0.53 → 1.0.55

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.
@@ -8,6 +8,7 @@
8
8
  :label-width="config.labelWidth"
9
9
  :label-position="config.labelPosition"
10
10
  v-loading="loading"
11
+ :disabled="isView"
11
12
  element-loading-text="Loading...">
12
13
  <el-row :gutter="15">
13
14
  <template v-for="(item, index) in config.formItems"
@@ -185,6 +186,8 @@
185
186
  v-bind="{
186
187
  min: item?.options?.min !== undefined ? item.options.min : null,
187
188
  max: item?.options?.max !== undefined ? item.options.max : null,
189
+ step: item?.options?.step !== undefined ? item.options.step : null,
190
+ precision: item?.options?.precision !== undefined ? item.options.precision : null,
188
191
  placeholder: item?.options?.placeholder || ''
189
192
  }"
190
193
  controls-position="right"></el-input-number>
@@ -194,6 +197,8 @@
194
197
  v-bind="{
195
198
  min: item?.options?.min !== undefined ? item.options.min : null,
196
199
  max: item?.options?.max !== undefined ? item.options.max : null,
200
+ step: item?.options?.step !== undefined ? item.options.step : null,
201
+ precision: item?.options?.precision !== undefined ? item.options.precision : null,
197
202
  placeholder: item?.options?.placeholder || ''
198
203
  }"
199
204
  controls-position="right"></el-input-number>
@@ -324,6 +329,7 @@ export default {
324
329
  modelValue: { type: Object, default: () => { } },
325
330
  config: { type: Object, default: () => { } },
326
331
  loading: { type: Boolean, default: false },
332
+ isView: { type: Boolean, default: false },
327
333
  },
328
334
  data() {
329
335
  return {
@@ -7,7 +7,7 @@
7
7
  @contextmenu.prevent="openContextMenu($event, tag)">
8
8
  <router-link :to="tag">
9
9
  <span>{{ tag.meta.title }}</span>
10
- <el-icon v-if="!tag.meta.affix && tagList.length > 1"
10
+ <el-icon v-if="!tag.meta.affix"
11
11
  @click.prevent.stop='closeSelectedTag(tag)'><el-icon-close /></el-icon>
12
12
  </router-link>
13
13
  </li>
@@ -103,24 +103,18 @@ export default {
103
103
  methods: {
104
104
  // 初始化
105
105
  init() {
106
- var dashboardRoute = this.treeFind(this.menu, node => node.path == this.$config.DASHBOARD_URL)
107
- if (dashboardRoute) {
108
- dashboardRoute.fullPath = dashboardRoute.path
106
+ let tags = this.$tool.data.get('RouteTags') || []
107
+ if (tags.length > 0) {
109
108
 
110
- let tags = this.$tool.data.get('RouteTags') || []
111
- tags.forEach(tag => {
109
+ tags.forEach((tag, index) => {
112
110
  var isRoute = this.treeFind(this.menu, node => node.path == tag.path)
113
111
  if (isRoute) {
114
112
  this.addViewTags(tag)
115
113
  }
116
-
117
114
  })
118
- if (tags.length === 0) {
119
- this.addViewTags(dashboardRoute)
120
- this.addViewTags(this.$route)
121
- }
122
-
123
115
  }
116
+ this.addViewTags(this.$route)
117
+
124
118
  },
125
119
  //查找树
126
120
  treeFind(tree, func) {
@@ -157,12 +151,19 @@ export default {
157
151
  },
158
152
  //关闭tag
159
153
  closeSelectedTag(tag, autoPushLatestView = true) {
154
+ let item = this.menu[0]
155
+ if (item.children) {
156
+ item = item.children[0]
157
+ }
158
+ if (this.tagList.length == 1 && item.path == this.$route.fullPath) {
159
+ return false
160
+ }
160
161
  this.$store.commit("removeViewTags", tag)
161
162
  this.$store.commit("removeIframeList", tag)
162
163
  this.$store.commit("removeKeepLive", tag.name)
164
+ this.$tool.data.set('RouteTags', this.$store.state.viewTags.viewTags)
163
165
  if (autoPushLatestView && this.isActive(tag)) {
164
166
  const latestView = this.tagList.slice(-1)[0]
165
- this.$tool.data.set('RouteTags', this.$store.state.viewTags.viewTags)
166
167
  if (latestView) {
167
168
  this.$router.push(latestView)
168
169
  } else {
@@ -168,16 +168,12 @@ export default {
168
168
 
169
169
  const sizeChange = (val) => {
170
170
  props.searchParams.size = val
171
- const data = { ...props.searchParams }
172
- context.emit('getTableData', data)
171
+ context.emit('getTableData')
173
172
  }
174
173
 
175
174
  const currentChange = (page) => {
176
175
  props.searchParams.page = page - 1
177
176
 
178
- const data = { ...props.searchParams }
179
- if (!props.reserveSelection) {
180
- }
181
177
  context.emit('getTableData', props.searchParams.page)
182
178
  }
183
179
 
@@ -260,13 +260,11 @@
260
260
  <template #dropdown>
261
261
  <el-dropdown-menu>
262
262
  <el-dropdown-item
263
- command="mini">{{ $t('lwTable.tools.lineHeight.mini') }}</el-dropdown-item>
263
+ command="small">{{ $t('lwTable.tools.lineHeight.mini') }}</el-dropdown-item>
264
264
  <el-dropdown-item
265
- command="small">{{ $t('lwTable.tools.lineHeight.small') }}</el-dropdown-item>
265
+ command="medium">{{ $t('lwTable.tools.lineHeight.small') }}</el-dropdown-item>
266
266
  <el-dropdown-item
267
- command="medium">{{ $t('lwTable.tools.lineHeight.medium') }}</el-dropdown-item>
268
- <el-dropdown-item
269
- command="large">{{ $t('lwTable.tools.lineHeight.large') }}</el-dropdown-item>
267
+ command="large">{{ $t('lwTable.tools.lineHeight.medium') }}</el-dropdown-item>
270
268
  </el-dropdown-menu>
271
269
  </template>
272
270
  </el-dropdown>