@newview/ui 1.1.97 → 1.1.99
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/README.md +3 -2
- package/dist/newview-ui.js +19 -6
- package/dist/newview-ui.umd.cjs +1 -1
- package/package.json +1 -1
- package/types/Grid.d.ts +5 -0
package/README.md
CHANGED
package/dist/newview-ui.js
CHANGED
|
@@ -33009,7 +33009,11 @@ let GridColumnInstance$1 = class GridColumnInstance2 extends BaseInstance {
|
|
|
33009
33009
|
return e;
|
|
33010
33010
|
});
|
|
33011
33011
|
} else if (filter3.type == "daterange") {
|
|
33012
|
-
|
|
33012
|
+
if ((filter3 == null ? void 0 : filter3.defaultFilteringTimeRange) && (filter3 == null ? void 0 : filter3.defaultFilteringTimeRange.length) >= 2) {
|
|
33013
|
+
return [{ data: filter3.defaultFilteringTimeRange }];
|
|
33014
|
+
} else {
|
|
33015
|
+
return [{ data: ["", ""] }];
|
|
33016
|
+
}
|
|
33013
33017
|
} else if (filter3.type == "numberrange") {
|
|
33014
33018
|
return [{ data: ["", ""] }];
|
|
33015
33019
|
} else {
|
|
@@ -33626,6 +33630,11 @@ const _sfc_main$l = defineComponent({
|
|
|
33626
33630
|
const { column } = params;
|
|
33627
33631
|
const option = column.filters[0];
|
|
33628
33632
|
filterDateRangeVal.option = option;
|
|
33633
|
+
if (option.data && option.data.length >= 2) {
|
|
33634
|
+
const { $panel } = params;
|
|
33635
|
+
const checked = option.data[0] && option.data[1];
|
|
33636
|
+
$panel.changeOption(null, checked, toRaw(option));
|
|
33637
|
+
}
|
|
33629
33638
|
}
|
|
33630
33639
|
};
|
|
33631
33640
|
const changeOptionEvent = (datevalue) => {
|
|
@@ -33763,7 +33772,9 @@ const CreatGridRenderer$1 = () => {
|
|
|
33763
33772
|
},
|
|
33764
33773
|
// 重置筛选复原方法(当未点击确认时,该选项将被恢复为默认值)
|
|
33765
33774
|
filterRecoverMethod({ option }) {
|
|
33766
|
-
option.data
|
|
33775
|
+
if (!(option.data && option.data.length >= 2)) {
|
|
33776
|
+
option.data = ["", ""];
|
|
33777
|
+
}
|
|
33767
33778
|
}
|
|
33768
33779
|
});
|
|
33769
33780
|
}
|
|
@@ -58682,8 +58693,9 @@ let GridInstance$1 = class GridInstance2 extends BaseInstance {
|
|
|
58682
58693
|
}
|
|
58683
58694
|
break;
|
|
58684
58695
|
case "daterange":
|
|
58685
|
-
|
|
58686
|
-
|
|
58696
|
+
let startDate = this.utilities.format(value[0], "yyyy-MM-DD");
|
|
58697
|
+
let EndDate = this.utilities.format(value[1], "yyyy-MM-DD");
|
|
58698
|
+
_queryWrapper.between(`date_format(${key2},'%Y-%m-%d')`, startDate, EndDate);
|
|
58687
58699
|
break;
|
|
58688
58700
|
case "numberrange":
|
|
58689
58701
|
if (!this.utilities.isNull(value[0])) {
|
|
@@ -241265,8 +241277,9 @@ class GridInstance extends BaseInstance {
|
|
|
241265
241277
|
}
|
|
241266
241278
|
break;
|
|
241267
241279
|
case "daterange":
|
|
241268
|
-
|
|
241269
|
-
|
|
241280
|
+
let startDate = this.utilities.format(value[0], "yyyy-MM-DD");
|
|
241281
|
+
let EndDate = this.utilities.format(value[1], "yyyy-MM-DD");
|
|
241282
|
+
_queryWrapper.between(`date_format(${key2},'%Y-%m-%d')`, startDate, EndDate);
|
|
241270
241283
|
break;
|
|
241271
241284
|
case "numberrange":
|
|
241272
241285
|
if (!this.utilities.isNull(value[0])) {
|