Comments (2)
可以试下颜色交给slot绑定的事件去改变,我是这样做的:
<vue-star>
<i slot="icon" class="fa fa-heart" ref="icon" @click="toggleFavourites"></i>
</vue-star>
toggleFavourites() {
......
this.$refs.icon.style.color = '#F05654'
}
from vuestar.
很棒的解决办法,不过如果多个按钮都需要这样设置的话会不会有点麻烦呢~
from vuestar.
Related Issues (19)
- 请问一下 是支持 vue.js 1.x, 还是2.0? HOT 1
- 想问下为什么使用animate的动画效果没反应
- 在手机网页端上展示,如何修改整体效果的size? HOT 2
- 可以用在mpvue项目中吗?
- 关于怎么判断是否是点赞动画
- Integration with vuefontawesome
- 在nuxt里面import引入用不了,页面一直在加载
- 有方法能控制成动画的执行么? HOT 1
- 可以每次点击的时候都触发动画吗? 而不是第二次才触发
- 怎么把图标指定为激活状态
- 为啥会一直显示在页面底部呢
- Vue3中使用该组件报错: TypeError: Cannot read properties of undefined (reading '_c') HOT 1
- 关于脱离文档流
- Nothing shown HOT 2
- VueStar__decoration--active初始化默认值如何控制? HOT 1
- 想要连续点赞 HOT 1
- 能不能用 属性值 去控制 点赞 而不是事件?
- Show animation without click on mounted()
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vuestar.