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

hahake-vue2-demo-ui

v0.1.2

Published

一个支持拟态风格的 Vue UI 组件

Downloads

6

Readme

demo-ui

简介

一个支持拟态风格的 Vue UI 组件

使用

  1. 安装
npm i demot-ui
  1. 全局注册
import DemoUI from 'demot-ui'
Vue.use(DemoUI)
  1. 按需导入
import DemoUI, { Button, Form } from 'demot-ui'
Vue.use(DemoUI, {
  components: [Button, Form]
})
  1. 导入样式
import 'demot-ui/dist/demot-ui.css'
  1. 导入 font-awesome 字体图标
import { library } from '@fortawesome/fontawesome-svg-core'
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'
import {
  faEnvelope,
  faStar,
  faEdit,
  faTrashAlt,
  faSmile,
  faTimesCircle,
  faEye
} from '@fortawesome/free-regular-svg-icons'

import { faCheck } from '@fortawesome/free-solid-svg-icons'

组件

按钮(Button)

| 属性 | 值 | 描述 | | -------- | ---------------- | -------------------------------------------------------------------- | | type | String | 按钮类型:primary,info,success,warning,danger | | plain | Boolean | 是否为朴素按钮,默认为 false | | mimicry | Boolean | 是否为拟态按钮,和 plain 不能同时设置,会被 plain 覆盖。默认为 false | | disabled | Boolean | 是否禁用按钮,默认为 false | | round | Boolean | 是否为圆角按钮,默认为 false | | circle | Boolean | 是否为圆形按钮,默认为 false | | icon | Array 或 Boolean | font-awesome 字体数组,默认为 false |

| 事件 | 值 | 描述 | | ----- | -------- | -------- | | click | Function | 点击事件 |


对话框(Dialog)

| 属性 | 值 | 描述 | | -------- | ------- | ---------------------------------- | | title | String | 对话框头部提示,默认为"提示" | | visiable | Boolean | 对话框可见状态,默认为 false | | mimicry | Boolean | 对话框是否为拟态风格,默认为 false | | width | String | 对话框宽度,默认为 60% | | top | String | 对话框距离顶部位置,默认为 15vh |

| 插槽 | 描述 | | ------ | ----------------------- | | title | Dialog 标题区的内容 | | footer | Dialog 按钮操作区的内容 |


输入框(Input)

| 属性 | 值 | 描述 | | ------------ | ------- | ---------------------------------- | | placeholder | String | 占位符,默认为空字符串 | | type | String | 表单类型,默认为'text' | | mimicry | Boolean | 对话框是否为拟态风格,默认为 false | | name | String | 表单命名,默认为空 | | value | String | 表单值,默认为空字符串 | | disabled | Boolean | 是否禁用,默认为 false | | clearable | Boolean | 是否可清空,默认为 false | | showPassword | Boolean | 是否显示密码可见,默认为 false |

切换(Switch)

| 属性 | 值 | 描述 | | ------------- | ------- | ---------------------------------- | | mimicry | Boolean | 对话框是否为拟态风格,默认为 false | | name | String | 表单命名,默认为空 | | value | String | 表单值,默认为空字符串 | | disabled | Boolean | 是否禁用,默认为 false | | activeColor | String | 激活状态颜色,默认为#dcdfe6 | | inactiveColor | String | 未激化状态颜色,默认为#dcdfe6 |

| 事件 | 值 | 描述 | | ------ | -------- | ---------------------------------- | | change | Function | 状态修改触发事件,返回修改后的状态 |


单选框(Radio)

| 属性 | 值 | 描述 | | ------- | ------------------------- | ---------------------------------- | | label | [String, Number, Boolean] | 单选框 label 值,默认为空字符串 | | mimicry | Boolean | 对话框是否为拟态风格,默认为 false | | name | String | 表单命名,默认为空 | | value | String | 表单值,默认为空字符串 | | color | String | 单选框选择时的颜色,默认为#409eff |

单选框组(RadioGroup)

用于包裹 radio,通过 v-model 指定组内所有的 radio 的 v-model


复选框(Checkbox)

| 属性 | 值 | 描述 | | ------- | ------------------------- | ---------------------------------- | | label | [String, Number, Boolean] | 单选框 label 值,默认为空字符串 | | mimicry | Boolean | 对话框是否为拟态风格,默认为 false | | name | String | 表单命名,默认为空 | | value | String | 表单值,默认为空字符串 | | color | String | 单选框选择时的颜色,默认为#409eff |

复选框组(CheckboxGroup)

用于包裹多个 checkbox,通过 v-model 指定组内所有的 checkout 的 v-model


表单项(Form-item)

| 属性 | 值 | 描述 | | ----- | ------ | ------------------------------- | | label | String | 单选框 label 值,默认为空字符串 |

表单(Form)

| 属性 | 值 | 描述 | | ----------- | ------ | -------------------- | | model | Object | 表单对象,必填 | | label-width | String | 标签宽度,默认"80px" |