Skip to content

Commit

Permalink
fix: type
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed Mar 29, 2024
1 parent 29c40e1 commit 1008119
Show file tree
Hide file tree
Showing 5 changed files with 356 additions and 418 deletions.
4 changes: 2 additions & 2 deletions apps/admin/src/pages/chat/components/ChatPanel/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ defineOptions({
name: "ChatPanel",
});
const chatWrapperRef = ref();
const toolbarRef = ref();
const chatWrapperRef = resolveRef(null);
const toolbarRef = resolveRef(null);
const { height: wrapperHeight } = useElementSize(chatWrapperRef);
const { height: toolbarHeight } = useElementSize(toolbarRef);
Expand Down
2 changes: 1 addition & 1 deletion apps/admin/src/pages/dashboard/components/DataOverview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function tooltipItemsHtmlString(items: ToolTipFormatterParams[]) {
el.color
}" class="tooltip-item-icon"></span><span>${el.seriesName}</span>
</p>
<span class="tooltip-value">${el.value.toLocaleString()}</span>
<span class="tooltip-value">${el.value?.toLocaleString()}</span>
</div>`,
)
.reverse()
Expand Down
6 changes: 2 additions & 4 deletions apps/admin/src/pages/internal/iframe/IframePage.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<script setup lang="ts">
withDefaults(defineProps<{
iframeLink?: string;
width?: number;
height?: number;
}>(), {
iframeLink: "",
width: 0,
height: 0,
});
const frameRef = ref<HTMLIFrameElement | null>();
const width = defineModel("width", { default: 0 });
const height = defineModel("height", { default: 0 });
const loading = ref(true);
function finishLoading() {
loading.value = false;
Expand Down
9 changes: 3 additions & 6 deletions packages/web/hooks/src/useLoading.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { useToggle } from "@vueuse/core";

export function useLoading(initValue = false) {
const [value, toggle] = useToggle(initValue);
const loading = ref(initValue);
const setLoading = (loadingValue: boolean) => {
value.value = loadingValue;
loading.value = loadingValue;
};
return {
loading: value,
loading,
setLoading,
toggle,
};
}
Loading

0 comments on commit 1008119

Please sign in to comment.