chore: format code by eslint #222

This commit is contained in:
vben
2021-01-28 23:28:50 +08:00
parent b77b7c9d62
commit 9edc281322
149 changed files with 574 additions and 421 deletions

View File

@@ -1,16 +1,18 @@
<template>
<PageWrapper title="滚动组件函数示例" content="基于el-scrollbar">
<div class="my-4">
<a-button @click="scrollTo(100)" class="mr-2">滚动到100px位置</a-button>
<a-button @click="scrollTo(800)" class="mr-2">滚动到800px位置</a-button>
<a-button @click="scrollTo(0)" class="mr-2">滚动到顶部</a-button>
<a-button @click="scrollBottom()" class="mr-2">滚动到底部</a-button>
<a-button @click="scrollTo(100)" class="mr-2"> 滚动到100px位置 </a-button>
<a-button @click="scrollTo(800)" class="mr-2"> 滚动到800px位置 </a-button>
<a-button @click="scrollTo(0)" class="mr-2"> 滚动到顶部 </a-button>
<a-button @click="scrollBottom()" class="mr-2"> 滚动到底部 </a-button>
</div>
<div class="scroll-wrap">
<ScrollContainer class="mt-4" ref="scrollRef">
<ul class="p-3">
<template v-for="index in 100" :key="index">
<li class="p-2" :style="{ border: '1px solid #eee' }">{{ index }}</li>
<li class="p-2" :style="{ border: '1px solid #eee' }">
{{ index }}
</li>
</template>
</ul>
</ScrollContainer>
@@ -19,12 +21,11 @@
</template>
<script lang="ts">
import { defineComponent, ref, unref } from 'vue';
import { CollapseContainer } from '/@/components/Container/index';
import { ScrollContainer, ScrollActionType } from '/@/components/Container/index';
import { PageWrapper } from '/@/components/Page';
export default defineComponent({
components: { CollapseContainer, ScrollContainer, PageWrapper },
components: { ScrollContainer, PageWrapper },
setup() {
const scrollRef = ref<Nullable<ScrollActionType>>(null);
const getScroll = () => {