vue2-client 1.8.406 → 1.8.407
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
|
@@ -516,7 +516,7 @@ export default {
|
|
|
516
516
|
this.scrollXWidth = totalWidth
|
|
517
517
|
// 加载筛选列完成
|
|
518
518
|
this.columnSelectLoaded = true
|
|
519
|
-
this.setQueryForm(form || {})
|
|
519
|
+
this.setQueryForm(form || {}, createdQuery)
|
|
520
520
|
},
|
|
521
521
|
// 操作面板按钮渲染
|
|
522
522
|
buttonRendering (button) {
|
|
@@ -591,9 +591,11 @@ export default {
|
|
|
591
591
|
/**
|
|
592
592
|
* 为表格附加查询条件
|
|
593
593
|
*/
|
|
594
|
-
setQueryForm (form = {}) {
|
|
594
|
+
setQueryForm (form = {}, createdQuery = true) {
|
|
595
595
|
this.form = form
|
|
596
|
-
|
|
596
|
+
if (createdQuery) {
|
|
597
|
+
this.refresh(true)
|
|
598
|
+
}
|
|
597
599
|
},
|
|
598
600
|
/**
|
|
599
601
|
* 表格重新加载方法
|
|
@@ -660,6 +662,19 @@ export default {
|
|
|
660
662
|
format (date, format) {
|
|
661
663
|
return formatDate(date, format)
|
|
662
664
|
},
|
|
665
|
+
/**
|
|
666
|
+
* 格式化数字
|
|
667
|
+
* @param number string 或者 number
|
|
668
|
+
* @param decimalPlaces 小数位数
|
|
669
|
+
*/
|
|
670
|
+
numberFormat (number, decimalPlaces = 2) {
|
|
671
|
+
const value = parseFloat(number)
|
|
672
|
+
if (!isNaN(value)) {
|
|
673
|
+
return value.toFixed(decimalPlaces)
|
|
674
|
+
} else {
|
|
675
|
+
return ''
|
|
676
|
+
}
|
|
677
|
+
},
|
|
663
678
|
/**
|
|
664
679
|
* 获取主键列名称
|
|
665
680
|
*/
|