style: format code for all

This commit is contained in:
LZHD
2021-07-06 01:01:42 +08:00
committed by 踏学吾痕
parent e1200f2dbe
commit 77a1a47110
114 changed files with 7068 additions and 1068 deletions

View File

@@ -5,20 +5,51 @@
<div class="card-header">
<span>无缝滚动示例</span>
<el-button class="button" type="text" @click="changeDirection('top')">
<span :style="{color: classOption.direction === 'top' ? 'red' : ''}">向上滚动</span>
<span
:style="{ color: classOption.direction === 'top' ? 'red' : '' }"
>向上滚动</span
>
</el-button>
<el-button class="button" type="text" @click="changeDirection('bottom')">
<span :style="{color: classOption.direction === 'bottom' ? 'red' : ''}">向下滚动</span>
<el-button
class="button"
type="text"
@click="changeDirection('bottom')"
>
<span
:style="{
color: classOption.direction === 'bottom' ? 'red' : ''
}"
>向下滚动</span
>
</el-button>
<el-button class="button" type="text" @click="changeDirection('left')">
<span :style="{color: classOption.direction === 'left' ? 'red' : ''}">向左滚动</span>
<el-button
class="button"
type="text"
@click="changeDirection('left')"
>
<span
:style="{ color: classOption.direction === 'left' ? 'red' : '' }"
>向左滚动</span
>
</el-button>
<el-button class="button" type="text" @click="changeDirection('right')">
<span :style="{color: classOption.direction === 'right' ? 'red' : ''}">向右滚动</span>
<el-button
class="button"
type="text"
@click="changeDirection('right')"
>
<span
:style="{ color: classOption.direction === 'right' ? 'red' : '' }"
>向右滚动</span
>
</el-button>
</div>
</template>
<SeamlessScroll ref="scroll" :data="listData" :class-option="classOption" class="warp">
<SeamlessScroll
ref="scroll"
:data="listData"
:class-option="classOption"
class="warp"
>
<ul class="item">
<li v-for="(item, index) in listData" :key="index">
<span class="title" v-text="item.title"></span>
@@ -29,7 +60,7 @@
</el-space>
</template>
<script lang='ts'>
<script lang="ts">
import { ref, unref } from "vue";
import { templateRef } from "@vueuse/core";
@@ -39,6 +70,7 @@ export default {
SeamlessScroll
},
setup() {
// eslint-disable-next-line no-undef
const scroll = templateRef<ElRef | null>("scroll", null);
let listData = ref([