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

sparta-ui

v3.21.2

Published

网易支付PC组件库

Downloads

327

Readme

sparta-ui

NPM version

介绍

命名由来

此组件库叫Sparta名字的由来,是因为一部名为《斯巴达300勇士》。 因为目前市面上,针对IE9的完全兼容的组件库几乎是没有了。而对于网易支付来说,IE9的用户占比还是不少,为了更好地服务用户,Sparta从此而生。

特性

  • 开箱即用的高质量 Vue 组件。
  • 全链路开发和设计工具体系。
  • 为数不多的支持IE9的组件库。

贡献者开发时注意

写md的时候,代码之间不能有换行,否则无法编译通过!!!

安装

npm install sparta-ui --save

快速上手

引入

在js入口文件中引入sparta-ui的脚本和样式。

跨境主题

// epay主题
import SpartaUI from 'sparta-ui/lib/globalpay/index.js'
import 'sparta-ui/lib/globalpay/index.css'
Vue.use(SpartaUI)

epay主题

import SpartaUI from 'sparta-ui/lib/epay/index.js'
import 'sparta-ui/lib/epay/index.css'
Vue.use(SpartaUI)

使用

使用<sp-*>即可调用sparta组件,如:

<sp-button type="primary">按钮</sp-button>

按需引入

为了组件库在项目中不会过于庞大,所以支持了按需引入。

跨境主题

import 'sparta-ui/lib/globalpay/style/index.css'
import 'sparta-ui/lib/globalpay/button/index.css'
import Button from 'sparta-ui/lib/globalpay/button/index.js'
// 初始化配置,$SPARTA 默认值是:{ THEME: 'globalpay' }
Vue.prototype.$SPARTA = {
  THEME: 'globalpay', // 主题的初始类型,目前有:globalpay、epay
  zIndex: 3000, // 弹窗的初始zIndex,默认为2000
  ... // 其它
}
// TODO,编写插件简化引入写法
Vue.use(Button)

epay主题

import 'sparta-ui/lib/epay/style/index.css'
import 'sparta-ui/lib/epay/button/index.css'
import Button from 'sparta-ui/lib/epay/button/index.js'
// 初始化配置,$SPARTA 默认值是:{ THEME: 'epay' }
Vue.prototype.$SPARTA = {
  THEME: 'epay', // 主题的初始类型,目前有:globalpay、epay
  zIndex: 3000, // 弹窗的初始zIndex,默认为2000
  ... // 其它
}
// TODO,编写插件简化引入写法
Vue.use(Button)