types: optimization type

This commit is contained in:
xiaoxian521 2021-09-19 19:41:38 +08:00
parent 8458d5d37b
commit feb1498d29
5 changed files with 9 additions and 8 deletions

View File

@ -1,8 +1,8 @@
<script setup lang="ts">
import { ref, watch, Ref } from "vue";
import { ref, watch } from "vue";
import { useRoute, useRouter, RouteLocationMatched } from "vue-router";
const levelList: Ref<RouteLocationMatched[]> = ref([]);
const levelList = ref([]);
const route = useRoute();
const router = useRouter();

View File

@ -219,7 +219,7 @@ class EnclosureHttp {
return new Promise((resolve, reject) => {
EnclosureHttp.axiosInstance
.request(config)
.then((response: EnclosureHttpResoponse) => {
.then((response: undefined) => {
resolve(response);
})
.catch((error: any) => {

View File

@ -1,12 +1,12 @@
<script setup lang="ts">
import { ref, unref } from "vue";
import { ref, reactive, unref } from "vue";
import { templateRef } from "@vueuse/core";
import SeamlessScroll from "/@/components/ReSeamlessScroll";
// eslint-disable-next-line no-undef
const scroll = templateRef<ElRef | null>("scroll", null);
let listData = ref<Array<Object>>([
let listData = ref<ForDataType<undefined>>([
{
title: "无缝滚动第一行无缝滚动第一行!!!!!!!!!!"
},
@ -36,11 +36,12 @@ let listData = ref<Array<Object>>([
}
]);
let classOption = ref<Object>({
let classOption = reactive({
direction: "top"
});
function changeDirection(val) {
// @ts-ignore
unref(scroll).reset();
unref(classOption).direction = val;
}

View File

@ -3,7 +3,7 @@ import { ref } from "vue";
import Selector from "/@/components/ReSelector";
let selectRange = ref<string>("");
let dataLists = ref<Array<Object>>([
let dataLists = ref<ForDataType<undefined>>([
{
title: "基本使用",
echo: [],

View File

@ -65,5 +65,5 @@ module.exports = {
{ severity: "warning" }
]
},
ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts"]
ignoreFiles: ["**/*.js", "**/*.jsx", "**/*.tsx", "**/*.ts", "**/*.json"]
};