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

vue-stone

v1.0.1

Published

vue component

Downloads

105

Readme

vue-stone

npm npm GitHub issues npm

A components library for vue2.x. 一个基于 vue2.x 的组件库

安装

npm install --save vue-stone

使用

本项目版本号规定

在本项目发布 1.0.0 版本之前,第二位版本号的更新将不向下兼容,第三位版本号向下兼容,通常为优化或 BUG 修复更新。

因此请注意这里:将 package.json 中 dependencies 字段下 "vue-stone": "^0.4.0" 版本号前面的 "^" 更改为 "~",暨 "vue-stone": "~0.4.0"。这样再执行 npm install 时,将只会安装第三位版本号的最新版。

使用前注意

本项目采用了 rem 布局方案,因此在引入该组件库前请在 HTML 文件 head 标签內添加下面一段 script:

<script>
  (function() {
    var baseFontSize = 100;
    var baseWidth = 375;

    var set = function() {
      var clientWidth = document.documentElement.clientWidth || window.innerWidth;

      var rem = 100;
      if (clientWidth != baseWidth) {
        rem = Math.floor(clientWidth / baseWidth * baseFontSize);
      }

      document.querySelector('html').style.fontSize = rem + 'px';
    }
    set();

    window.addEventListener('resize', set);
  }());
</script>

开始使用

Import vue-stone and register components

import Stone from 'vue-stone';
import 'vue-stone/dist/vue-stone.css';

// 如果你需要使用组件库中字体图标,请单独引入字体图标的 CSS 文件
// import 'vue-stone/dist/iconfonts.css';

import Vue from 'vue';

Vue.use(Stone);   // register components

按需打包组件

受 webpack 打包策略所限,我们目前并没有将按需打包做的很简练,但至少目前还是做到了,具体步骤请查阅 按需加载组件

如果你有更好的 idea,欢迎你为 vue-stone 贡献出一份力量。

文档

vue-stone 组件库提供了下述组件,每个组件都带有详细的文档,组件展示可参考 example

Contribute

贡献代码请遵循代码贡献规范

Release Notes

查看更新内容