npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vmc

v1.2.37

Published

Mobile components for [email protected]+

Downloads

28

Readme

VMC

Mobile components for [email protected]+.

View Demos

特性介绍

VMC是一套针对移动端开发的组件库,适用于[email protected]+

  • 将使用频度高的组件全局化,直接注册到Vue实例化对象上;
  • 全部样式基于LESS,并允许通过覆盖LESS变量的方式快速初始化组件样式;
  • 同时,你也可以选择使用SASS,我们同样提供了基于SCSS的样式表;
  • 可以通过属性来单独定义每个组件的样式(写到style上,这样便能覆盖在LESS中定义的全局样式);
  • 自定义的Child元素,可以实现按需插入元素,同时给予预定义样式;
  • 自定义的SlotItem元素,可以方便地自定义循环型组件(如轮播图)中显示的内容。

如何引用

基于webpack的SPA模式

安装与引用

$ npm install vmc --save

注册全局组件

在入口文件中添加以下内容:

import VMC from 'vmc/install';

Vue.use(VMC);

引入组件样式

通过LESS变量覆盖,可以自定义组件的一些初始样式,因此,需要手动引入LESS文件。

@import "vmc/src/styles/vmc.less";
@import "assets/less/vmc.custom.less";      // 自定义变量覆盖,参考styles/base/variable.less

或者使用SASS变量覆盖,来自定义组件的一些初始样式,同样需要手动引入SCSS文件。

@import "assets/scss/vmc.custom.scss";      // 自定义变量覆盖,参考scss/base/variable.scss
@import "vmc/src/scss/vmc.scss";

引用组件

import { Navbar } from 'vmc';

普通标签方式引用

安装与引用

直接下载dist目录下的vmc.cssvmc.js两个文件。

<link rel="stylesheet" href="vmc.css">

<div id="app">
    <v-button type="success" @click="$Alert('Hello world!')">按钮</v-button>
</div>

<script src="vue.js"></script>
<script src="vmc.js"></script>

<script>
    new Vue({
        el: '#app'
    });
</script>

注册全局组件

这种方式会自动注册全局组件,同时自动注册所有组件,无需额外操作。

组件列表

CSS组件

JS组件

开发与编译

开发

$ npm run dev

命令执行之后会自动跑examples目录下的文件,用于开发调试。

发布

$ npm run release

命令执行之后会将vmc发布到dist目录下。

编译

$ npm run build

命令执行之后会自动将examples目录下的文件打包到docs目录下。

预览

$ npm run docs

命令执行之后会将docs目录作为一个静态的文档服务器资源,可以从浏览器直接访问。

License

MIT