当前位置:网站首页>Assemblage stylisé de cartes de commutation auto - encapsulées
Assemblage stylisé de cartes de commutation auto - encapsulées
2022-07-19 01:30:00 【Taitchan】
Tableau des effets:
Code:
<template>
<div class="card" :class="isOpen?type:'off'">
<el-row style="position:relative">
<i :class="icon" style="font-size: 40px;font-weight: 100" />
<div style="position: absolute;top: 0;right: 0;padding-top: 10px">
<ct-switch
v-model="isOpen"
:circle-color="isOpen?activeColors[type]:'#fff'"
active-color="#FDFDFD"
inactive-color="#8A88B7"
active-text="ON"
inactive-text="OFF"
/>
</div>
</el-row>
<el-row style="height: 40px;position: relative">
<span style="font-size: 16px;font-weight: 600;position: absolute;bottom: 0;left:0;letter-spacing: 1px">{
{
name }}</span>
</el-row>
</div>
</template>
<script>
import CtSwitch from './ct-switch'
export default {
name: 'CtCard',
components: {
CtSwitch },
props: {
type: {
type: String,
default: 'off'
},
icon: {
type: String,
default: 'el-icon-coffee-cup'
},
name: {
type: String,
default: 'taitChan'
}
},
data() {
return {
isOpen: true,
activeColors: {
success: '#2BAA5D', danger: '#F2946D', primary: '#0077F4', warning: '#7230F9' }
}
}
}
</script>
<style scoped>
.card{
border-radius: 20px;
width: 200px;
height: 120px;
margin: 0 20px 20px 0;
display: inline-block;
padding: 20px;
color: white;
}
.success{
background-image: linear-gradient(to bottom right, #33C8B4, #2CAD66);
}
.primary{
background-color: #0082F6;
}
.danger{
background-image: linear-gradient(to right, #FA7D74 , #F94E39);
}
.warning{
background-color: #7A40F2;
}
.off{
box-shadow: 0 0 20px rgba(138, 136, 183,0.8);
}
</style>
Section de commutation(ct-switch) Ça a changé. , Le changement est assez grossier .
边栏推荐
- (六)test命令
- jsx 编译
- es可选链
- The C Programming Language (2nd)--笔记--1.7
- ModelArts-图像分类and物体检测
- About foreign key references, cross domain headers, and ref usage
- C Programming Language (2nd Edition)--读书笔记--1.5.2
- Text indent in uniapp doesn't work, and the indentation in the first line of uniapp doesn't work. How to solve it?
- extern和static的区别
- Gateway Kong route adding instructions
猜你喜欢

Maker-HarmonyOS应用开发培训笔记01

Record a bug that failed to pass the authentication of calling feign interface in the scheduled task

uniapp中text-indent不起作用,uniapp首行缩进不管用如何解决?

Day05-Cookie,Session,Csrf

NodeJS 跨域 CORS

ModelArts-人声检测and文本分类

Summary of XML external entity injection (xxE target recurrence)

使用bat自动执行cmd命令(多个命令或单个命令)

cmake的基本使用

Day06 ORM field and operation
随机推荐
tp-watermark.js网页添加水印插件
The C Programming Language(2nd)--笔记--1.10
【专题】用ST表解决RMQ刷题总结
(七)流程控制
使用bat自动执行cmd命令(多个命令或单个命令)
uniapp中text-indent不起作用,uniapp首行缩进不管用如何解决?
Understand PHP from [Fifth space 2021] easycleanup_ session
XSS simple summary
es可选链
单页面应用 SPA 和多页面应用 MPA
替换URL中的特殊字符(%E2%80%8B)
两表连接进行增删改查
使用leaflet仿原神提瓦特大地图制作日记
(三)传递参数
Fundamentals of IOT development
wget 警告: 无法验证
Day06-ORM字段及操作
C Programming Language(2nd Edition)--读书笔记--1.5.1
If the website is hacked, what if you jump to other websites through Baidu / Sogou and other search keywords?
NodeJS 跨域 CORS