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

sf-alert.vue

v0.1.4

Published

<!-- 该 README.md 根据 api.yaml 和 docs/*.md 自动生成,为了方便在 GitHub 和 NPM 上查阅。如需修改,请查看源文件 -->

Downloads

13

Readme

SfAlert sf提示

sf-alert

这是一个sf-alert的组件

示例

基本用法

props

| 参数 | 默认值 | 是否是必填 | 类型 |可选值 |名称| |----- |------------------|------- |-------------------|------ |----| | type | info | false| String | info warning danger success | 类型 其中info会读取环境的 $--color-primary变量| | title | - | false| String | - | 标题 | | showIcon | true | false| Boolean | true false | 是否显示左侧icon | | icon | prompt-filling | false| Boolean | notificationcrymehsmilehelppromptsuccesstimewarning | 显示左侧icon,如需要填充类型,可在类型后面加上-filling | |iconSize |20px| false| String Number | - | 左侧icon的大小 | |content|-|false| String |-|内容区域|

slot

| 参数 | 名称 | |-----|------------------------------------------------| |title| 如果存在titleslot 则导入的参数title 不会生效,slot会顶掉title部分 | |content|如果存在contentslot 则导入的参数content 不会生效,slot会顶掉content部分|

event

| 函数名 | 名称 | |-------|----------------| | close | alert 关闭的触发的函数 |


<sf-alert type='info' title="这里是标题 这里是标题">
    <div class="self-title" slot="title">这是slot传入的标题</div>
</sf-alert>
<sf-alert type='warning' :showIcon='false' title="不显示左侧icon"></sf-alert>
<sf-alert type='danger' icon='prompt' title='这是标题' content='这是内容区域' ></sf-alert>
<sf-alert type='success' icon="smile-filling" title="这个alert 是content slot">
    <div slot="content">
        <i class="iconfont icon-notification"></i>
        <i class="iconfont icon-notification-filling"></i>
        <i class="iconfont icon-cry"></i>
        <i class="iconfont icon-cry-filling"></i>
        <i class="iconfont icon-meh"></i>
        <i class="iconfont icon-meh-filling"></i>
        <i class="iconfont icon-smile"></i>
        <i class="iconfont icon-smile-filling"></i>
        <i class="iconfont icon-help"></i>
        <i class="iconfont icon-help-filling"></i>
        <i class="iconfont icon-prompt"></i>
        <i class="iconfont icon-prompt-filling"></i>
        <i class="iconfont icon-success"></i>
        <i class="iconfont icon-success-filling"></i>
        <i class="iconfont icon-time"></i>
        <i class="iconfont icon-time-filling"></i>
        <i class="iconfont icon-warning"></i>
        <i class="iconfont icon-warning-filling"></i>
    </div>
</sf-alert>

API

Props/Attrs

| Prop/Attr | Type | Options | Default | Description | | --------- | ---- | ------- | ------- | ----------- | | type | string | 'info''warning''danger''success' | 'info' | 类型 其中info会读取环境的 $--color-primary变量 | | title | string | | '' | 标题 | | showIcon | Boolean | truefalse | true | 是否显示左侧icon | | icon | string | 'notification''cry''meh''smile''help''prompt''success''time''warning' | '' | 显示左侧icon,如需要填充类型,可在类型后面加上-filling | | iconSize | string,number | | '20px' | 左侧icon大小 | | content | String | | '' | 内容区域 |

Slots

title

插入的title,优先级比prop的title高。

content

插入的content,优先级比prop的content高。

Events

@close

关闭时触发