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

antd-mobile-vue

v0.4.3

Published

基于Vue和ant-desing的及PC端综合组件库

Downloads

97

Readme

如有问题可添加个人微信(wuhao1200),欢迎共同交流

该项目原本为公司内部项目,现放到github上开源,发布个时候项目名称改为antd-mobile-vue

查看文档

antd-mobile-vue

基于 Vue 的组件库,代码由antd-mobile转为Vue版本,目前已具备antd-mobile的绝大部分组件

部分组件的示例已和 ant design mobile 官网同步

与antd-mobile的组件对比

antd-mobile 共有 47个组件,本项目截至现在移植了44个, 组件完成度达到95%

另外新增组件

组件名称|用途 ---|--- Chart| 图表组件

与ant design mobile的组件比较

组件名称 | antd-mobile | antd-mobile-vue | 示例移植 |说明 --- | :---: | :---: | :---: | --- Accordion | √ | √ | √ ActionSheet | √ | √ ActivityIndicator | √ | √ Badge | √ | √ | √ Button | √ | √ | √ Calendar | √ | √ | √ Card | √ | √ | √ Carousel | √ | √ | √ Chart | [无] | √ Checkbox | √ | √ | √ DatePicker | √ | √ | √ DatePickerView | √ | √ Drawer | √ | √ | √ Flex | √ | √ | √ Grid | √ | √ Icon | √ | √ ImagePicker | √ | √ | √ InputItem | √ | √ | √ List | √ | √ | √ ListView | √ | [无] Menu | √ | √ | √ Modal | √ | √ | √ NavBar | √ | √ | √ NoticeBar | √ | √ | √ Pagination | √ | √ | √ Picker | √ | √ | √ PickerView | √ | √ Popover | √ | √ | √ Progress | √ | √ Radio | √ | √ | √ PullToRefresh | √ | √ Result | √ | √ SearchBar | √ | √ SegmentedControl | √ | √ | √ Slider | √ | √ Range | √ | √ Stepper | √ | √ Steps | √ | √ SwipeAction | √ | [无] Switch | √ | √ TabBar | √ | √ | √ Tabs | √ | √ | √ Tag | √ | √ TextareaItem | √ | √ Toast | √ | √ | √ WhiteSpace | √ | √ | √ WingBlank | √ | √ | √ LocaleProvider | √ | [无]

安装

 npm i antd-mobile-vue -S

使用

完整引入

import AntdMobile from 'antd-mobile-vue'
Vue.use(AntdMobile)

按需引入

按需加载需要借助babel-plugin-import, 这样就可以只引入需要的组件,以减小项目体积

npm i babel-plugin-import -D

将babel.config.js修改为:

module.exports = {
  presets: ['@vue/app'],
  plugins: [
    [
      'import',
      {
        libraryName: 'antd-mobile-vue',
        libraryDirectory: 'es',
        style: true
      },
      'antd-mobile-vue'
    ]
  ]
};

引入组件

import { Alert } from "antd-mobile-vue";
@Component({
  components: {
    Alert
  }
})

cdn引入

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/vue.js"></script>
<link rel="stylesheet" href="https://public-file.aegis-info.com/antd-mobile-vue/0.3.0/antdm.css.gz">
<script src="https://public-file.aegis-info.com/antd-mobile-vue/<version>/antdm.umd.min.js.gz"></script>

cdn没有打包vue,因此需要独立引入vue的cdn资源

开发环境启动

npm run dev 

创建组件

npm run create <name> <cn-name> <type> 
  • name为组件名称,格式要求如下:
    • 命名统一使用小写单词,多个单词之间以-分隔
    • vue指令或工具类组件按实际作用命名
  • cn-name为组件的中文名称
  • type 可选ui(ui组件)、directive(vue指令)、tool(工具)

自动生成文档

npm run docs

代码检查

npm run lint

生成库文件

npm run lib

打包后的文件可以在html中直接引用

生产环境打包

npm run build

用于部署,如果发布到npm仓库则不需要执行

删除组件

npm run remove <name>
  • name:要删除的组件名称

发布到npm仓库

npm publish