GithubHelp home page GithubHelp logo

hhy5277 / vue-bloom-menu Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mingseng-w/vue-bloom-menu

0.0 1.0 0.0 1.79 MB

this is a menu based on vue

License: MIT License

JavaScript 46.96% HTML 1.13% Vue 41.18% CSS 10.73%

vue-bloom-menu's Introduction

vue-bloom-menu

inspired by blooming-menu
这是一个使用vue加css动画制作的menu,基于其他插件改写成vue的实现方式,可以用作菜单导航栏,后期加上vue-router,稍后把详细教程写在博客里

技术栈:vue+vue-router+webpack

在线演示地址


实例效果演示

  1. 点击menu的button之后的效果 菜单menu点击演示

  2. 点击item之后的效果

点击item之后的效果

3.left corner

left corner

4.加上vue-router之后的menu(pending)

get started


usage


模板部分
<template>
  <div>
    <Bloom-menu
      :iconImgArr="iconImgArr"
      :radius="radius"
      :startAngle="startAngle"
      :endAngle="endAngle"
      :itemNum="itemNum"
      :animationDuration="animationDuration"
      :itemAnimationDelay="itemAnimationDelay"
      class="menu-center-wrapper"
    >
    </Bloom-menu>
  </div>

</template>
css部分
@import 'common/stylus/menuConfig.styl'
1. 	配置参数
	*  radius:default为100px
	*  startAngle:defaut为0
	*  endAngle:default为315
	*  itemNum:default为8
	*  animationDuration:default为0.5s
	*  itemAnimationDelay:default为0.04s
	*  iconImgArr: 必选参数,该属性使用computed属性生成,是装icon的数组,方便使用自己的icon,元素为object,使用函数genarateIconObj生成
example:
	  import home from 'common/img/home.svg'
	  ....
	  computed: {
      iconImgArr () {
        let tmp = []
        tmp.push(this.genarateIconObj(home, 'home', '50'))
        return tmp
      }
    },
		 // 分别指定图标的url ,类名称, 以及background-size属性
      	 genarateIconObj (url, name, size)

key step


关键步骤写在博客里面了 简书

about author


  有问题请邮件联系我,email:[email protected],如果您觉得对您有帮助,请给我个star🙂

vue-bloom-menu's People

Contributors

mingseng-w avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.