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

grainrain-dg-ui

v0.1.4

Published

## Project setup

Downloads

4

Readme

fire-ui-component

Project setup

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

vue 基础语法涉及

  • 组件基本语法
  • 组件通讯
  • 插槽的使用
  • props 校验
  • 过渡与动画处理
  • 计算属性和监听属性
  • v-model 语法糖
  • vue 插件机制
  • npm 发布

掌握封装组件的技巧和语法

  • 学会造轮子,了解 element-ui 组件库的实现原理
  • 搭建和积累自己的 UI 组件库

封装组件

  • 组件通信
  • 组件插槽
  • props 校验

封装 button

type:primary success danger warning plain round 是否是圆角 boolean 默认 false circle 是否是原型 boolean 默认 false disabled 是否禁用 boolean 默认 false icon 是否有 icon

dialog

  • vue 过渡动画
  • sync 修饰符:是一个语法糖
  • 具名插槽 v-slot
  • 插槽构成 header 、body、footer
  • 控制 dialog 显示、隐藏
  • scoped 的作用 1.给样式选择器添加一个随机属性选择器 2.给元素添加一个 data 属性
  • ::v-deep .one-button:first-child{}

    // 老语法
    <template slot="title"></template>
    // 新语法
    <template v-slot:title>

    </template>

input 组件封装

  • 属性 1.type 2.placeholder 3.disabled 4.清空 value 5.密码框是否可见

  • 事件 1.change 2.blur 3.focus

  • 基本结构

switch

  • 开关颜色

vue 打包构建成库并部署到 npm

  1. vue-cli-service build --target lib packages/index.js

前端代码规范

如何让一个前端项目变得更加规范?

参考文档和视频

哔哩哔哩组件封装

vue 官方文档 vue-cli 文档