three-trees-ui 1.1.7 → 1.1.8

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": "three-trees-ui",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "publicPath": "/ui",
5
5
  "author": "hotent",
6
6
  "private": false,
@@ -306,7 +306,10 @@
306
306
  text-overflow: ellipsis;
307
307
  white-space: nowrap;
308
308
  text-align: left;
309
+ display: flex;
310
+ align-items: center;
309
311
  > span {
312
+ flex: 1;
310
313
  display: inline-block;
311
314
  max-width: 100%;
312
315
  font-size: 14px;
@@ -233,7 +233,7 @@ const Formulas = {
233
233
  },
234
234
  LARGE: (array, index) => {
235
235
  index = Formulas.parseNumber(index)
236
- return array.sort(function(a, b) {
236
+ return array.sort(function (a, b) {
237
237
  return b - a
238
238
  })[index - 1]
239
239
  },
@@ -300,7 +300,7 @@ const Formulas = {
300
300
  },
301
301
  SMALL: (array, index) => {
302
302
  array = Formulas.parseNumberArray(array)
303
- return array.sort(function(a, b) {
303
+ return array.sort(function (a, b) {
304
304
  return a - b
305
305
  })[index - 1]
306
306
  },
@@ -479,7 +479,17 @@ const Formulas = {
479
479
  DATEDELTA: (string, days) => {
480
480
  let timestamp = new Date(string).getTime()
481
481
  timestamp += days * 86400000
482
- return Formulas.DATE(timestamp)
482
+ let date = Formulas.parseDate(timestamp)
483
+ if (date == 'Invalid Date') {
484
+ Notification.error({
485
+ title: '错误',
486
+ message: '无效日期',
487
+ })
488
+ return
489
+ }
490
+ return date.format(
491
+ utils.isMobile() ? 'yyyy/MM/dd HH:mm:ss' : 'yyyy-MM-dd HH:mm:ss'
492
+ )
483
493
  },
484
494
  HALFDAY: (startDate, endDate) => {
485
495
  let half = 0.5
@@ -2390,7 +2390,7 @@ export default {
2390
2390
  .then(() => {
2391
2391
  let s = []
2392
2392
  for (let i = 0; i < this.tableData.selectRows.length; i++) {
2393
- s.push(this.tableData.selectRows[i][this.templateInfo.pkField])
2393
+ s.push(this.tableData.selectRows[i][this.templateInfo.pkField ? this.templateInfo.pkField : 'id_'])
2394
2394
  }
2395
2395
  let data = {
2396
2396
  ids: s.join(','),