Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

这是一个参考了fanbox粉丝卡而重新实现的卡片~!特别适合来做会员卡之类的展示卡片工作。【This is a card reimplemented with reference to the fanbox fan card~! It feels especially suitable for displaying cards such as membership cards.】

License

NotificationsYou must be signed in to change notification settings

komariyui/fanbox-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

输入图片说明


介绍

这是一个参考了fanbox粉丝卡而重新实现的卡片~!感觉特别适合来做会员卡之类的展示卡片工作。

特性

1.还原了fanbox卡片的彩色光膜效果
2.卡片透视
3.简单易用

演示

演示demo


快速开始

原生JS

必须有一个dom来装载卡片,在这里是useBox,并且创建实例前传入id。

<divid="useBox"></div><scriptsrc="./js/classMain.js"></script><script>window.onload=function(){constfanBoxCardFun=newfanBoxCard({entry:"useBox",image:"./images/card-image.jpeg"})}</script>

在vue中使用(--vue3)


#vue3项目npm i vue-fanbox-card
//全局引入import{createApp}from'vue'importAppfrom'./App.vue'importfanboxCardfrom"vue-fanbox-card";//引入核心import"vue-fanbox-card/lib/fanboxCard.css"//引入fanbox的css样式constapp=createApp(App);app.use(fanboxCard);//全局使用fanboxCardapp.mount('#app');
  1. (.VUE )
<template><button@click="miao = true">打开模态框</button><fanboxCard:show="miao":image="require('../card-image.jpeg')"@click="miao = false"></fanboxCard></template><script>exportdefault {data(){return{      miao:false    }  },}</script>
  1. (.JSX/.TSX)
exportdefaultdefineComponent({setup(){constmiaomiao=ref(false);return()=>(<div><buttononClick={()=>openMiao()}>打开模态框</button><fanboxCardshow={miaomiao.value}image={require('../card-image.jpeg')}onClick={()=>{miaomiao.value=false}}></fanboxCard></div>)},});

参数简介:

参数名数据类型是否可选描述
showBoolean是否显示图片模态框
imageString/(require)卡片需要使用到的图片

License

MIT
Copyright (c) 2022-present 由白子

About

这是一个参考了fanbox粉丝卡而重新实现的卡片~!特别适合来做会员卡之类的展示卡片工作。【This is a card reimplemented with reference to the fanbox fan card~! It feels especially suitable for displaying cards such as membership cards.】

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp