Your Name
2022-06-27 0a3027eccd3b0bb6542e5fc831f7e02740dcfc95
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<template>
    <div class="preview-container">
        <el-card shadow="hover" header="波浪指令效果(v-waves)作用于 btn">
            <el-row class="mb10" style="color: #808080">可选参数 v-waves=" |light|red|orange|purple|green|teal"</el-row>
            <div class="flex-warp">
                <div class="flex-warp-item">
                    <div class="flex-warp-item-box">
                        <el-button size="default" v-waves>
                            <SvgIcon name="iconfont icon-bolangnengshiyanchang" />
                            默认效果
                        </el-button>
                    </div>
                </div>
                <div class="flex-warp-item">
                    <div class="flex-warp-item-box">
                        <el-button type="primary" size="default" v-waves="'light'">
                            <SvgIcon name="iconfont icon-bolangnengshiyanchang" />
                            light 效果
                        </el-button>
                    </div>
                </div>
                <div class="flex-warp-item">
                    <div class="flex-warp-item-box">
                        <el-button type="success" size="default" v-waves="'red'">
                            <SvgIcon name="iconfont icon-bolangnengshiyanchang" />
                            red 效果
                        </el-button>
                    </div>
                </div>
                <div class="flex-warp-item">
                    <div class="flex-warp-item-box">
                        <el-button type="info" size="default" v-waves="'orange'">
                            <SvgIcon name="iconfont icon-bolangnengshiyanchang" />
                            orange 效果
                        </el-button>
                    </div>
                </div>
                <div class="flex-warp-item">
                    <div class="flex-warp-item-box">
                        <el-button type="warning" size="default" v-waves="'purple'">
                            <SvgIcon name="iconfont icon-bolangnengshiyanchang" />
                            purple 效果
                        </el-button>
                    </div>
                </div>
                <div class="flex-warp-item">
                    <div class="flex-warp-item-box">
                        <el-button type="danger" size="default" v-waves="'green'">
                            <SvgIcon name="iconfont icon-bolangnengshiyanchang" />
                            green 效果
                        </el-button>
                    </div>
                </div>
                <div class="flex-warp-item">
                    <div class="flex-warp-item-box">
                        <el-button type="primary" size="default" v-waves="'teal'">
                            <SvgIcon name="iconfont icon-bolangnengshiyanchang" />
                            teal 效果
                        </el-button>
                    </div>
                </div>
            </div>
        </el-card>
        <el-card shadow="hover" header="波浪指令效果(v-waves)作用于 div" class="mt15">
            <div class="waterfall-first">
                <div class="waterfall-first-item" v-for="v in 12" :key="v" v-waves>
                    <div class="w100 h100 flex">
                        <span class="flex-margin">{{ v }}</span>
                    </div>
                </div>
            </div>
        </el-card>
    </div>
</template>
 
<script lang="ts">
import { toRefs, reactive, defineComponent } from 'vue';
 
export default defineComponent({
    name: 'pagesWaves',
    setup() {
        const state = reactive({});
        return {
            ...toRefs(state),
        };
    },
});
</script>
 
<style scoped lang="scss">
.preview-container {
    .flex-warp {
        display: flex;
        flex-wrap: wrap;
        align-content: flex-start;
        margin: 0 -5px;
        .flex-warp-item {
            padding: 5px;
            .flex-warp-item-box {
                width: 100%;
                height: 100%;
            }
        }
    }
    .waterfall-first {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
        grid-gap: 0.25em;
        grid-auto-flow: row dense;
        grid-auto-rows: 20px;
        .waterfall-first-item {
            width: 100%;
            background: var(--el-color-primary);
            color: var(--el-color-white);
            transition: all 0.3s ease;
            border-radius: 3px;
            &:nth-of-type(3n + 1) {
                grid-row: auto / span 5;
            }
            &:nth-of-type(3n + 2) {
                grid-row: auto / span 6;
            }
            &:nth-of-type(3n + 3) {
                grid-row: auto / span 8;
            }
            &:hover {
                box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
                transition: all 0.3s ease;
                cursor: pointer;
            }
        }
    }
}
</style>