@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,6 +1,8 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import {
|
|
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
|
};
|
package/dist/runtime/light.js
CHANGED
|
@@ -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(".");
|