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,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: [],