vue-app-components

0.1.2 • Public • Published

vue-app-components

npm version npm GitHub

基于 vue 2.6 是 H5应用的 简单ui组件库。

安装

npm install vue-app-components --save

包含组件

  • 全局 api 实现Toast
  • 全局 api 实现Dialog
  • 仿 APP 横向 Tab 标签页

使用


vaToast

在项目的 main.js 中使用 Vue.use() 注册组件

import appComponents from 'vue-app-components'
import 'vue-app-components/lib/vue-app-components.css'
 
Vue.use(appComponents)

然后再所需要的view页面中可以直接通过 this.$vaToast(msg, options) 来调用。其中的 options 是非必须参数。

this.$vaToast('这是通过vue-app-components组件的toast', {
    position: '50vh'
});

参数说明

prop value remark
position 'bottom'(default)/
'top'/
'middle'/
'50vh'/
'50px'
用于控制toast在屏幕的位置。
如果自定义距离,
则是相对于屏幕顶部的位置

vaDialog

TODO

Package Sidebar

Install

npm i vue-app-components

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

532 kB

Total Files

21

Last publish

Collaborators

  • liang1599515