@7365admin1/layer-common 1.11.41 → 1.11.43

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.
@@ -1,11 +1,6 @@
1
1
  <!-- LayoutNavigationDrawer.vue -->
2
2
  <template>
3
- <v-navigation-drawer
4
- v-model="drawer"
5
- permanent
6
- floating
7
- class="bg-primary"
8
- >
3
+ <v-navigation-drawer v-model="drawer" permanent floating class="bg-primary">
9
4
  <v-list>
10
5
  <v-list-item>
11
6
  <v-list-item-title class="text-h6 text-white">
@@ -24,11 +19,17 @@
24
19
  >
25
20
  <template #activator="{ props: tooltipProps }">
26
21
  <div v-bind="tooltipProps">
27
- <NavigationItem :title="item.title" :icon="item.icon" :route="item.route" :link="item.link"
28
- :children="item.children" :class="{
29
- 'opacity-50 pointer-events-none': item.disabled
30
- }" @click="() => handleClick(item)" />
31
-
22
+ <NavigationItem
23
+ :title="item.title"
24
+ :icon="item.icon"
25
+ :route="item.route"
26
+ :children="item.children"
27
+ :link="item.link"
28
+ :class="{
29
+ 'opacity-50 pointer-events-none': item.disabled,
30
+ }"
31
+ @click="() => handleClick(item)"
32
+ />
32
33
  </div>
33
34
  </template>
34
35
 
@@ -44,16 +45,16 @@
44
45
  <script setup lang="ts">
45
46
  const props = defineProps({
46
47
  navigationItems: { type: Array, required: true },
47
- title: { type: String, default: "" }
48
- })
48
+ title: { type: String, default: "" },
49
+ });
49
50
 
50
- const emit = defineEmits(['navigate'])
51
+ const emit = defineEmits(["navigate"]);
51
52
 
52
- const { drawer } = useLocal()
53
- const { APP_NAME } = useRuntimeConfig().public
53
+ const { drawer } = useLocal();
54
+ const { APP_NAME } = useRuntimeConfig().public;
54
55
 
55
56
  const handleClick = (item: any) => {
56
- if (item.disabled) return
57
- emit('navigate', item)
58
- }
57
+ if (item.disabled) return;
58
+ emit("navigate", item);
59
+ };
59
60
  </script>
@@ -49,9 +49,9 @@
49
49
  class="w-100"
50
50
  >
51
51
  <v-tab
52
- v-for="tab in tabOptions"
52
+ v-for="(tab, i) in tabOptions"
53
53
  :value="tab.status"
54
- :key="tab.status"
54
+ :key="i"
55
55
  class="text-capitalize"
56
56
  >
57
57
  {{ tab.name }}
@@ -356,7 +356,7 @@ function toRoute(status: any) {
356
356
  page.value = 1;
357
357
  navigateTo({
358
358
  name: routeName,
359
- params: setRouteParams(normalizedRouteParams.value, { status: obj.status }),
359
+ params: setRouteParams(normalizedRouteParams.value, { status }),
360
360
  });
361
361
  }
362
362
 
@@ -366,25 +366,26 @@ watch(
366
366
  if (status && status !== selectedStatus.value) {
367
367
  selectedStatus.value = status;
368
368
  }
369
- }
369
+ },
370
+ { immediate: true }
370
371
  );
371
372
 
372
373
  const {
373
374
  data: getAllReq,
374
375
  refresh: getAll,
375
376
  status: getAllReqStatus,
376
- } = useLazyAsyncData(
377
- "get-all-members",
377
+ } = useAsyncData(
378
+ () => `get-all-members-${props.status}-${props.orgId}`,
378
379
  () =>
379
380
  _getAll({
380
- status: currentStatus.value,
381
+ status: props.status,
381
382
  org: props.orgId,
382
383
  search: headerSearch.value,
383
384
  page: page.value,
384
385
  type: props.type,
385
386
  }),
386
387
  {
387
- watch: [page, currentStatus],
388
+ watch: [() => props.status, headerSearch],
388
389
  }
389
390
  );
390
391
 
@@ -398,10 +399,6 @@ watchEffect(() => {
398
399
  }
399
400
  });
400
401
 
401
- watch(headerSearch, () => {
402
- getAll();
403
- });
404
-
405
402
  const confirmDialog = ref(false);
406
403
  const selectedMemberId = ref<string | null>(null);
407
404
  const updateLoading = ref(false);
@@ -5,7 +5,7 @@
5
5
  <v-row no-gutters>
6
6
  <slot name="actions">
7
7
  <v-col cols="12">
8
- <v-row no-gutters>
8
+ <v-row no-gutters class="ga-2">
9
9
  <v-btn
10
10
  v-if="canCreate"
11
11
  class="text-none"