All Projects → xandeer → vue-circle-choice

xandeer / vue-circle-choice

Licence: MIT license
A circle color choice and navigation with Vue.js

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects
shell
77523 projects
HTML
75241 projects
CSS
56736 projects

Projects that are alternatives of or similar to vue-circle-choice

vue-burger-button
🍔 vue-burger-button is a functional component, which is faster than a regular component, and is pretty small (JS min+gzip is lower than 700b and CSS min+gzip is lower than 400b).
Stars: ✭ 41 (+105%)
Mutual labels:  vue-component
ui-nuclear-mobile
A configurable Mobile UI based on Antd Mobile and Vue
Stars: ✭ 61 (+205%)
Mutual labels:  vue-component
v-owl-carousel
🦉 VueJS wrapper for Owl Carousel
Stars: ✭ 46 (+130%)
Mutual labels:  vue-component
xcrop
Mobile image cropping component - Vue React 移动端裁剪组件
Stars: ✭ 27 (+35%)
Mutual labels:  vue-component
unique-ui
一个用于Vue2.x的移动端组件库
Stars: ✭ 43 (+115%)
Mutual labels:  vue-component
vstx-data-table
A data table component for the Vue Stacks Ecosystem
Stars: ✭ 34 (+70%)
Mutual labels:  vue-component
vue-pagination-minemine
使用 vue2.0 实现一个简洁的分页组件
Stars: ✭ 52 (+160%)
Mutual labels:  vue-component
vue-odometer
Vue.js(v2.x+) component wrap for Odometer.js
Stars: ✭ 63 (+215%)
Mutual labels:  vue-component
shadow
Shadow dom support for Vue
Stars: ✭ 46 (+130%)
Mutual labels:  vue-component
vue-input-contenteditable
The same features you expect from `<input type="text">` but in a `contenteditable` Vue component
Stars: ✭ 19 (-5%)
Mutual labels:  vue-component
vue-collapse
A simple collapse component for Vue.js
Stars: ✭ 34 (+70%)
Mutual labels:  vue-component
vue-img-orientation-changer
A vue plugin that can help you display image in correct orientation.
Stars: ✭ 38 (+90%)
Mutual labels:  vue-component
vue-share-it
A Vue.js component for sharing links to social networks
Stars: ✭ 21 (+5%)
Mutual labels:  vue-component
vue-crop
[举个例子]https://codesandbox.io/s/910ro8ym9r [演示链接(戳我直达)]http://www.wwwwxy.top/html/blg/
Stars: ✭ 38 (+90%)
Mutual labels:  vue-component
vue-drag-zone
Drag Zone component for @vuejs
Stars: ✭ 127 (+535%)
Mutual labels:  vue-component
vue-cute-rate
Simple to use and very cute rate component for Vue.js.
Stars: ✭ 43 (+115%)
Mutual labels:  vue-component
vue-snowf
Snowfall component for Vue.js, let it snow on your page! ❄ demo: https://fuxy526.github.io/snowf/
Stars: ✭ 38 (+90%)
Mutual labels:  vue-component
vue-loading
Loading bar for Vue.js apps using axios
Stars: ✭ 19 (-5%)
Mutual labels:  vue-component
vue-pattern-input
Use RegExp to limit input
Stars: ✭ 25 (+25%)
Mutual labels:  vue-component
vue-eva-input
A beautiful input component based on Eva Design System and Vue.
Stars: ✭ 17 (-15%)
Mutual labels:  vue-component

vue-circle-choice

A circular color choice and navigation with Vue.js

Demo

可以在 dev 分支查看详细示例,在线 Demo

安装

npm install vue-circle-choice --save

引入

作为全局组件使用

// 在项目入口文件
import Vue from 'vue';
// 圆环型取色盘
import choiceColor from 'vue-circle-choice';
// 半圆型导航
import circularNav from 'vue-circle-choice';

Vue.component('choiceColor', choiceColor);
Vue.component('circularNav', circularNav);

作为局部组件使用

// 在某个组件中
import choiceColor from 'vue-circle-choice';
import circularNav from 'vue-circle-choice';

export default {
  components: {
    choiceColor,
    circularNav,
  },
};

API

choice-color

Props

参数 类型 说明
colors Array 圆环各部分背景色
radius String 圆环半径

Events

事件名 参数 说明
updateColor { index, color } index: 按钮的索引; color: 按下按钮的颜色

示例

使用 pug 代码:

choice-color(:colors='colors', radius="10em", @updateColor='updateColor')

使用 html 代码:

<choice-color :colors='colors' radius='10em' @updateColor='updateColor'></choice-color>

组件数据及自定义事件:

const colors = [
  '#1ba6cc',
  '#189ba7',
  '#98c6ae',
  '#45a270',
  '#7cb325',
  '#eb9826',
];

data() {
  return {
    colors,
    index: 0,
    color: this.colors[0],
  };
},
methods: {
  updateColor({ index, color }) {
    this.index = index;
    this.color = color;
  },
}

circular-nav

Props

参数 类型 说明
color String 圆环背景色
radius String 圆环半径
navs Array[Object] 各项导航设置,都是可选,具体如下
href href 属性,默认为 javascript:void(0)
label 导航名称
icon 字体图标类名,已添加 iconfont

Events

事件名 参数 说明
updateNav index 导航的索引

示例

使用 pug 代码:

circular-nav(:navs='navs', :color='color', radius="8em", @updateNav='updateNav')

使用 html 代码:

<circular-nav :color='color' radius='8em' :navs='navs' @updateNav='updateNav'></circular-nav>

组件数据及自定义事件:

const navs = [{
  label: 'Discover',
  href: 'javascript:void(0)',
  icon: 'icon-discover',
}, {
  label: 'Home',
  href: 'javascript:void(0)',
  icon: 'icon-home',
}, {
  label: 'My',
  href: 'javascript:void(0)',
  icon: 'icon-my',
}];

data() {
  return {
    index: 0,
    color: '#1ba6cc',
    navs,
  };
},
methods: {
  updateNav(index) {
    this.index = index;
  },
}

bug和建议

如果在使用中遇到问题或者建议,欢迎提issues

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].