An open API service indexing awesome lists of open source software.

https://github.com/savoygu/vue-star-plus

升级版 vue-star
https://github.com/savoygu/vue-star-plus

star vue vue-star vue-star-plus

Last synced: 6 months ago
JSON representation

升级版 vue-star

Awesome Lists containing this project

README

          

# vue-star-plus



Version


Version

| Feature | [vue-star](https://github.com/OYsun/VueStar) | vue-star-plus |
| -------------- | -------------------------------------------- | ------------- |
| Icon | ✅ | ✅ |
| Animation | ✅ | ✅ |
| Image | ❌ | ✅ |
| Default Active | ❌ | ✅ |

## Install

### Vue3

```bash
npm install vue-star-plus
```

```javascript
import { createApp } from 'vue'
import VueStarPlus from 'vue-star-plus'
import 'vue-star-plus/style.css'
const app = createApp()
// Global register
app.component('VueStarPlus', VueStarPlus)
```

### Vue2

```bash
npm install vue-star-plus@2
```

```javascript
import Vue from 'vue'
import VueStarPlus from 'vue-star-plus' // same with vue3 version
import 'vue-star-plus/style.css' // same with vue3 version
// Global register
Vue.component('VueStarPlus', VueStarPlus)
```

## Usage

[DEMO](https://savoygu.github.io/vue-star-plus/)

### Basic Usage

```javascript



const active = ref(false)

```

### Background Image

```javascript





const active = ref(false)

.vsp__bgi {
display: block;
width: 36px;
height: 36px;
background: url("/src/assets/inactive.png") no-repeat;
background-size: contain;
}
.vsp__bgi.is-active {
background-image: url("/src/assets/active.png");
}

```

### Animated

```javascript



const active = ref(false)

@import 'animate.css';

```

## License

The vue-star-plus package is also open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).