ol-base-components 2.0.0 → 2.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ol-base-components",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "private": false,
5
5
  "main": "src/package/index.js",
6
6
  "scripts": {
@@ -284,10 +284,7 @@ export default {
284
284
  },
285
285
  data() {
286
286
  return {
287
- findTableSearch:
288
- this.formSearchData.tableSearch.length > this.tableSearchSlice
289
- ? this.formSearchData.tableSearch.slice(0, this.tableSearchSlice)
290
- : this.formSearchData.tableSearch,
287
+ findTableSearch: {},
291
288
  expend: !this.formSearchData.expendShow,
292
289
  formSearch: {
293
290
  ...this.formSearchData.value,
@@ -351,26 +348,32 @@ export default {
351
348
  }
352
349
  })
353
350
 
354
- // 单独处理创建时间 就是BeginTime,EndTime
355
- const requiredNames = ['BeginTime', 'EndTime'];
356
- const hseCreatedTime = requiredNames.every(name =>
357
- swaggersearchColumns.some(item => item.name === name)
358
- );
359
- if (hseCreatedTime) {
360
- this.formSearchData.tableSearch.push({
361
- label: "创建时间",
362
- value: "createdTime",
363
- inputType: "picker",
364
- props: {
365
- type: "datetimerange",
366
- startPlaceholder: "开始时间",
367
- endPlaceholder: "结束时间",
368
- placeholder: "选择时间范围",
369
- valueFormat: "yyyy-MM-dd HH:mm:ss",
370
- format: "yyyy/MM/dd HH:mm:ss"
371
- }
372
- })
351
+ const tableHasCreatedTime = this.formSearchData.tableSearch.some((e) => e.value === 'createdTime')
352
+ if (!tableHasCreatedTime) {
353
+ // 单独处理创建时间 就是BeginTime,EndTime
354
+ const requiredNames = ['BeginTime', 'EndTime'];
355
+ const hseCreatedTime = requiredNames.every(name =>
356
+ swaggersearchColumns.some(item => item.name === name)
357
+ );
358
+ if (hseCreatedTime) {
359
+ this.formSearchData.tableSearch.push({
360
+ label: "创建时间",
361
+ value: "createdTime",
362
+ inputType: "picker",
363
+ props: {
364
+ type: "datetimerange",
365
+ startPlaceholder: "开始时间",
366
+ endPlaceholder: "结束时间",
367
+ placeholder: "选择时间范围",
368
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
369
+ format: "yyyy/MM/dd HH:mm:ss"
370
+ }
371
+ })
372
+ }
373
373
  }
374
+ this.findTableSearch = this.formSearchData.tableSearch.length > this.tableSearchSlice
375
+ ? this.formSearchData.tableSearch.slice(0, this.tableSearchSlice)
376
+ : this.formSearchData.tableSearch
374
377
  console.log(`\x1b[36m\x1b[4mol插件-搜索框渲染`, this.formSearchData.tableSearch)
375
378
  },
376
379
  // 树形下拉