@hostlink/nuxt-light 1.24.2 → 1.25.0

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.2",
4
+ "version": "1.25.0",
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 { useRouter } from "vue-router";
2
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
  };
@@ -2,7 +2,7 @@
2
2
  import { type FormKitInputs } from '@formkit/inputs';
3
3
  import { useRouter, useRoute } from "vue-router";
4
4
  import { useQuasar } from "quasar";
5
- import { model } from "#imports"
5
+ import { computed, model } from "#imports"
6
6
 
7
7
  const route = useRoute();
8
8
  const router = useRouter();
@@ -90,12 +90,16 @@ if (!props.context.onSubmit) {
90
90
 
91
91
  }
92
92
 
93
+ const isNoDirtyCheck = computed(() => {
94
+ return props.context.attrs["no-dirty-check"] !== undefined;
95
+ });
93
96
 
94
97
  </script>
95
98
  <template>
96
99
  <form v-bind="context.attrs">
97
100
 
98
101
 
102
+ {{ isNoDirtyCheck }}
99
103
  <l-card :bordered="bordered">
100
104
  <q-card-section>
101
105
  <div :class="`q-gutter-${gutter}`">
@@ -105,7 +109,7 @@ if (!props.context.onSubmit) {
105
109
 
106
110
  <q-card-actions align="right" v-if="context.actions">
107
111
  <l-btn icon="sym_o_check" :label="context.submitLabel ?? 'Submit'" @click="onSubmit"
108
- :disabled="!context.state.dirty" :loading="context.state.loading"></l-btn>
112
+ :disabled="!isNoDirtyCheck && !context.state.dirty" :loading="context.state.loading"></l-btn>
109
113
  </q-card-actions>
110
114
  </l-card>
111
115
  </form>
@@ -25,6 +25,7 @@ declare module '@formkit/inputs' {
25
25
  type: 'l-form';
26
26
  gutter?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
27
27
  bordered?: boolean;
28
+ noDirtyCheck?: boolean;
28
29
  },
29
30
  lSelect: {
30
31
  type: 'l-select';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.24.2",
3
+ "version": "1.25.0",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": {
6
6
  "type": "git",