quasar-ui-danx 0.4.22 → 0.4.23
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/danx.es.js +889 -877
- package/dist/danx.es.js.map +1 -1
- package/dist/danx.umd.js +16 -16
- package/dist/danx.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ActionTable/Form/Fields/LabelValueBlock.vue +3 -1
- package/src/components/ActionTable/listControls.ts +16 -6
- package/src/helpers/formats.ts +7 -1
package/package.json
CHANGED
@@ -364,7 +364,7 @@ export function useListControls(name: string, options: ListControlsOptions): Act
|
|
364
364
|
|
365
365
|
const latestNextIndex = latestCallOnly("getNextItem", async () => {
|
366
366
|
if (!pagedItems.value?.data) return -1;
|
367
|
-
|
367
|
+
|
368
368
|
// Load the previous page if the offset is before index 0
|
369
369
|
if (nextIndex < 0) {
|
370
370
|
if (pagination.value.page > 1) {
|
@@ -439,11 +439,21 @@ export function useListControls(name: string, options: ListControlsOptions): Act
|
|
439
439
|
*/
|
440
440
|
function updateRouteParams(params: AnyObject) {
|
441
441
|
const vueRouter = getVueRouter();
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
442
|
+
let { name: routeName } = vueRouter.currentRoute.value;
|
443
|
+
routeName = Array.isArray(routeName) ? routeName[0] : routeName;
|
444
|
+
|
445
|
+
if (!routeName) {
|
446
|
+
console.error("No route name found for list controls", name);
|
447
|
+
return;
|
448
|
+
}
|
449
|
+
|
450
|
+
const newRoutePath = vueRouter.resolve({ name: routeName, params }).href;
|
451
|
+
const currentRoutePath = vueRouter.currentRoute.value.fullPath;
|
452
|
+
|
453
|
+
// Only update the route if the route is different (or the currentRoutePath is a child of the newRoutePath)
|
454
|
+
if (currentRoutePath !== newRoutePath && !currentRoutePath.startsWith(newRoutePath)) {
|
455
|
+
vueRouter.push({ name: routeName, params });
|
456
|
+
}
|
447
457
|
}
|
448
458
|
|
449
459
|
function setPanelFromRoute(params: RouteParams, meta: AnyObject) {
|
package/src/helpers/formats.ts
CHANGED
@@ -234,7 +234,13 @@ export function fShortSize(value: string | number) {
|
|
234
234
|
return Math.round(n / div) + " " + power.unit;
|
235
235
|
}
|
236
236
|
|
237
|
-
export function fBoolean(value?: boolean) {
|
237
|
+
export function fBoolean(value?: boolean | string | any) {
|
238
|
+
switch (value) {
|
239
|
+
case "Yes":
|
240
|
+
case "No":
|
241
|
+
return value;
|
242
|
+
}
|
243
|
+
|
238
244
|
return (value === undefined || value === null) ? "-" : (value ? "Yes" : "No");
|
239
245
|
}
|
240
246
|
|