Skip to content

Commit

Permalink
💄 优化提示
Browse files Browse the repository at this point in the history
  • Loading branch information
BTMuli committed Sep 5, 2023
1 parent 42f5003 commit efd4c67
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/components/overlay/to-calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@
</div>
</div>
</TOverlay>
<v-snackbar v-model="snackbar" :timeout="1500" color="error">
该 {{ itemType === "weapon" ? "武器" : "角色" }} 暂无详情
</v-snackbar>
</template>
<script setup lang="ts">
// vue
import { computed, ref } from "vue";
import { computed } from "vue";
import showSnackbar from "../func/snackbar";
import TOverlay from "../main/t-overlay.vue";
import TibCalendarItem from "../itembox/tib-calendar-item.vue";
import TibCalendarMaterial from "../itembox/tib-calendar-material.vue";
Expand Down Expand Up @@ -77,7 +75,6 @@ const visible = computed({
});
const itemType = computed(() => props.dataType);
const itemVal = computed<TGApp.App.Calendar.Item>(() => props.dataVal);
const snackbar = ref<boolean>(false);
const onCancel = (): void => {
visible.value = false;
Expand All @@ -86,7 +83,11 @@ const onCancel = (): void => {
function toDetail(item: TGApp.App.Calendar.Item): void {
if (item.contentId === 0) {
snackbar.value = true;
const itemType = item.itemType === "avatar" ? "角色" : "武器";
showSnackbar({
text: `[${itemType}] ${item.name} 暂无详情`,
color: "warn",
});
return;
}
const url = Mys.Api.Obc.replace("{contentId}", item.contentId.toString());
Expand Down

0 comments on commit efd4c67

Please sign in to comment.