New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

frontmessageplugin

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

frontmessageplugin

前端message组件

latest
npmnpm
Version
1.0.15
Version published
Maintainers
1
Created
Source


🥇
frontmessageplugin



npm packagetemp demos demos

Translations: 🇨🇳 汉语
# 极简的message插件

有黑夜白天两种背景模式

使用示例

网页使用

<script type="module">
    	//背景是黑色的时候用
        import {createToast} from "https://cdn.jsdelivr.net/npm/frontmessageplugin@latest/messageDark.js"
        //背景是白色的时候用
        //import {createToast} from "https://cdn.jsdelivr.net/npm/frontmessageplugin@latest/messageLight.js"
		createToast("info","你好",3000)   
        请求类型:success error info warning 
    </script>

npm 使用

npm install frontmessageplugin
接着

import {createToast} from "frontmessageplugin/messageDark.js"
或者
import {createToast} from "frontmessageplugin/messageLight.js"
createToast("info","你好",3000)  

createToast传参说明

第一个参数是message的类型。支持四种形式 info success warn error
第二个参数是文本
第三个参数是持续时间

ver0.0.7 添加自定义类名,解决vue类名冲突的问题

ver0.0.1 修复显示的toast 不消失的问题

Keywords

message

FAQs

Package last updated on 19 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts