# yn-ui

> A Vue Component Demo!

Latest version **1.0.8** (published 2018-09-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install yn-ui
pnpm add yn-ui
yarn add yn-ui
bun add yn-ui
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.8 |
| Published | 2018-09-26 |
| First published | 2018-09-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | yanhao201314 |
| Maintainers | yanhao201314 |

## Links

- npm: https://www.npmjs.com/package/yn-ui
- npm.io page: https://npm.io/package/yn-ui

## Dependencies (3)

- [vue](https://npm.io/package/vue.md) ^2.5.11
- [stylus](https://npm.io/package/stylus.md) ^0.54.5
- [stylus-loader](https://npm.io/package/stylus-loader.md) ^3.0.2

## Recent versions

- 1.0.8 (latest) — 2018-09-26
- 1.0.7 — 2018-09-26
- 1.0.6 — 2018-09-26
- 1.0.5 — 2018-09-26
- 1.0.4 — 2018-09-25
- 1.0.3 — 2018-09-25
- 1.0.2 — 2018-09-25
- 1.0.1 — 2018-09-24
- 1.0.0 — 2018-09-22

## README

# component

> Vue component封装测试

## Build Setup

## 安装
``` bash
npm i yn-ui
```

## 引入
```bash
// main.js

import Vue from 'vue'
import App from './App.vue'
import demoUI from 'yn-ui'

Vue.use(demoUI)

new Vue({
  el: '#app',
  render: h => h(App)
})

```

## 使用
```bash
// app.vue

<template>
  <div id="app">
    <yn-side-layout :isShow="flg" @maskClick="maskClick">
      <div slot="sideLeftMenu">left menu</div>
      <div slot="sideContent">
        <i class="fa fa-list header-fa" @click="maskClick"> 侧滑案例演示</i>
        <yn-menu-nav :options="options" @menuNavChange="menuNavChange"></yn-menu-nav>

        <img src="./assets/logo.png">

        <yn-bottom-nav :option="options1" v-on:footerNavChange="footerNavChange"></yn-bottom-nav>
      </div>
    </yn-side-layout>


  </div>
</template>

<script>

export default {
  name: 'app',
  data () {
    return {
      flg: false,
      options: {
        style: {
          fontSize: '.8rem',
          color: '#999',
          activeColor: '#000',
          lineHeight: '2rem'
        },
        list: [
          {name: '统计', to: '/msg/main'},
          {name: '最新', to: '/msg/new'},
          {name: '待办', to: '/msg/wait'}
        ]
      },
      options1: {
        index: 0,
        list: [
          {id: 0, name: '消息', icon: 'fa-commenting'},
          {id: 1, name: '日程', icon: 'fa-calendar'},
          {id: 2, name: '通讯录', icon: 'fa-address-book-o'},
          {id: 3, name: '应用', icon: 'fa-th-list'}
        ]
      }
    }
  },
  methods: {
    maskClick () {
      this.flg = !this.flg
    },
    menuNavChange (idx) {
      console.log(`设计时为了尽量让组件解耦，所有组件都不进行跳转等操作。这些操作请在此回调函数中完成。`)
      console.log(`PS: 点击事件回调返回传入的list 下标 ， 当前index为： ${idx}`)
    },
    footerNavChange (idx) {
      console.log(`设计时为了尽量让组件解耦，所有组件都不进行跳转等操作。这些操作请在此回调函数中完成。`)
      console.log(`PS: 点击事件回调返回传入的list 下标 ， 当前index为： ${idx}`)
    }
  }
}
</script>

<style lang="scss">
  .header-fa {
    margin: 1rem;
  }
</style>


```

---
_Source: https://npm.io/package/yn-ui · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
