Giter Club home page Giter Club logo

vue-component's Introduction

vue-component

write some components on my own

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

成果

成果

参考资料

项目搭建(起步)

项目使用是vue-cli脚手架,开始的项目搭建这么来

思路

vue分页组件思路

静态页面 v-for props有:总页数、当前页码、页码改变事件 data:显示页码数字个数、当前页 setCurrent设置当前页码,调用页码改变事件 mounted方法内,设置第一页为当前页码

对话框

  • 写静态页面
  • slot:父组件传内容给子组件
  • 写交互
    • beforeclose钩子函数 props watch visible visible.sync: 点击右上角的x图标,this.$emit('update:visible', false)
    • 蒙层点击,添加事件 @click.self

轮播图组件

  • props:传图片地址
  • data: activeIndex
  • 静态页面
  • v-for放图片
  • mounted下获取图片
    • init方法内递归,实现轮播
  • 点击点,再调用init方法

vue-component's People

Contributors

eddieeddieeddiejones avatar

Watchers

 avatar  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.