mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-11-21 14:13:36 +08:00
style: format code for all
This commit is contained in:
@@ -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([
|
||||
|
||||
Reference in New Issue
Block a user