mirror of
https://github.com/apache/skywalking-booster-ui.git
synced 2025-10-14 20:01:28 +00:00
types: optimize data types (#254)
This commit is contained in:
@@ -47,6 +47,7 @@ limitations under the License. -->
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
import { ElMessage } from "element-plus";
|
||||
|
||||
/*global Indexable */
|
||||
const { t } = useI18n();
|
||||
const appStore = useAppStoreWithOut();
|
||||
const route = useRoute();
|
||||
@@ -65,7 +66,7 @@ limitations under the License. -->
|
||||
appStore.setDuration(timeFormat(dates));
|
||||
}
|
||||
|
||||
function changeTimeRange(val: Date[] | any) {
|
||||
function changeTimeRange(val: Date[]) {
|
||||
timeRange.value = val[1].getTime() - val[0].getTime() > 60 * 24 * 60 * 60 * 1000 ? 1 : 0;
|
||||
if (timeRange.value) {
|
||||
return;
|
||||
@@ -86,7 +87,7 @@ limitations under the License. -->
|
||||
}
|
||||
}
|
||||
function resetDuration() {
|
||||
const { duration }: any = route.params;
|
||||
const { duration }: Indexable = route.params;
|
||||
if (duration) {
|
||||
const d = JSON.parse(duration);
|
||||
|
||||
|
@@ -74,6 +74,7 @@ limitations under the License. -->
|
||||
import Icon from "@/components/Icon.vue";
|
||||
import { useAppStoreWithOut } from "@/store/modules/app";
|
||||
|
||||
/*global Recordable*/
|
||||
const appStore = useAppStoreWithOut();
|
||||
const { t } = useI18n();
|
||||
const name = ref<string>(String(useRouter().currentRoute.value.name));
|
||||
@@ -95,7 +96,7 @@ limitations under the License. -->
|
||||
const changePage = (menu: RouteRecordRaw) => {
|
||||
theme.value = ["VirtualMachine", "Kubernetes"].includes(String(menu.name)) ? "light" : "black";
|
||||
};
|
||||
const filterMenus = (menus: any[]) => {
|
||||
const filterMenus = (menus: Recordable[]) => {
|
||||
return menus.filter((d) => d.meta && !d.meta.notShow);
|
||||
};
|
||||
function setCollapse() {
|
||||
|
Reference in New Issue
Block a user