@hostlink/nuxt-light 1.24.1 → 1.24.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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.24.1",
4
+ "version": "1.24.3",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "0.8.4",
7
7
  "unbuild": "2.0.0"
@@ -1,6 +1,8 @@
1
1
  <script setup lang="ts">
2
- import { type QBtnProps } from "quasar";
2
+ import { useRouter } from "vue-router";
3
+ import type { QBtnProps } from "quasar";
3
4
  import { useQuasar } from "quasar";
5
+ const router = useRouter();
4
6
 
5
7
  export interface LBtnProps extends QBtnProps {
6
8
  permission?: string;
@@ -27,9 +29,11 @@ const onClick = function () {
27
29
  cancel: "No",
28
30
  }).onOk(() => {
29
31
  props.onClick?.apply(null, args);
32
+ props.to && router.push(props.to);
30
33
  });
31
34
  } else {
32
35
  props.onClick?.apply(null, args);
36
+ props.to && router.push(props.to);
33
37
  }
34
38
 
35
39
  };
@@ -219,6 +219,7 @@ const light = reactive({
219
219
  },
220
220
  isGranted(right) {
221
221
  if (right === void 0) return true;
222
+ if (right === "") return true;
222
223
  if (light.permissions.includes("*")) return true;
223
224
  if (light.permissions.includes(right)) return true;
224
225
  const parts = right.split(".");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.24.1",
3
+ "version": "1.24.3",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",