@finema/core 2.17.2 → 2.17.3
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/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -94,9 +94,15 @@ const displayData = computed(() => {
|
|
|
94
94
|
return props.options.isEnableInfiniteScroll ? innerRawData.value : props.options.rawData;
|
|
95
95
|
});
|
|
96
96
|
const to = (page2) => {
|
|
97
|
+
const params = props.options?.pageOptions?.request?.params || {};
|
|
98
|
+
const cleanParams = Object.fromEntries(
|
|
99
|
+
Object.entries(params).filter(
|
|
100
|
+
([key, value]) => value !== null && value !== void 0 && value !== ""
|
|
101
|
+
)
|
|
102
|
+
);
|
|
97
103
|
return {
|
|
98
104
|
query: {
|
|
99
|
-
...
|
|
105
|
+
...cleanParams,
|
|
100
106
|
page: page2
|
|
101
107
|
}
|
|
102
108
|
};
|
|
@@ -126,9 +126,15 @@ const router = useRouter();
|
|
|
126
126
|
const theme = computed(() => useUiConfig(tableTheme, "table")());
|
|
127
127
|
const q = ref(props.options?.pageOptions.search ?? "");
|
|
128
128
|
const to = (page2) => {
|
|
129
|
+
const params = props.options?.pageOptions?.request?.params || {};
|
|
130
|
+
const cleanParams = Object.fromEntries(
|
|
131
|
+
Object.entries(params).filter(
|
|
132
|
+
([key, value]) => value !== null && value !== void 0 && value !== ""
|
|
133
|
+
)
|
|
134
|
+
);
|
|
129
135
|
return {
|
|
130
136
|
query: {
|
|
131
|
-
...
|
|
137
|
+
...cleanParams,
|
|
132
138
|
page: page2
|
|
133
139
|
}
|
|
134
140
|
};
|
|
@@ -144,8 +150,14 @@ useWatchChange(() => props.options?.pageOptions?.currentPage, (value) => {
|
|
|
144
150
|
});
|
|
145
151
|
useWatchChange(() => props.options?.pageOptions?.request?.params, () => {
|
|
146
152
|
if (props.options?.isPreventRouteChange) return;
|
|
153
|
+
const params = props.options?.pageOptions?.request?.params || {};
|
|
154
|
+
const cleanParams = Object.fromEntries(
|
|
155
|
+
Object.entries(params).filter(
|
|
156
|
+
([key, value]) => value !== null && value !== void 0 && value !== ""
|
|
157
|
+
)
|
|
158
|
+
);
|
|
147
159
|
router.replace({
|
|
148
|
-
query:
|
|
160
|
+
query: cleanParams
|
|
149
161
|
});
|
|
150
162
|
});
|
|
151
163
|
const pageBetween = computed(() => {
|