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 🙏

© 2026 – Pkg Stats / Ryan Hefner

flag-ui-sendcontent

v0.0.27

Published

send content

Readme

发送内容通用组件

针对一信通平台发送短信内容的通用组件

安装

npm install --save flag-ui-sendcontent

依赖

 1. vue
 2. element-ui
 3. vue的prototype上需要注入$http(axios)提供接口调用
 4. vue的prototype上需要注入$alert(element UI)

使用说明

引入

import SendContent from 'flag-ui-sendcontent'

组件概况

组件参数说明

|传入参数 | 类型 |是否必填|默认 | 说明 | |:-------------------|:-------|:-----:|:------:|:----------------------------------------| |config |Object |是 |基本信息配置 |发送内容基本信息具体见下表 | |tpldata |Object |否 |null |发送模板对象需要.sync双向绑定,具体对象内容看下表 | |urls |Object |否 |null |请求路径对象 | |fileUrl |Object |是 |null |动态发送时,所上传的动态数据表的模版下载 |

详细参数说明

{
	//基本信息
	config: {
		title: '发送内容(控件label)',
		spSign: '[企业签名]',
		isLongText: false, //是否长短信,
        disableEdit: true //是否将输入框置灰,默认为true
	},
	//模板内容
	tpldata: {
		id: '模板id',
		text: '模板内容'
	},
	//请求的url参数
	urls: {
		sensitive: '敏感词url',
		dynDataUpload: 'http://10.0.0.194:8085/dynamicdata/upload',
        dynDataTplDownload: '/notexist'
	},
	//动态模版下载url
	fileUrls: {
		//文件导入
    	import: API_SERVER + '/mdn/mdn-file/import',
		//下载导入文件模版CSVG格式,TXT格式,Xls格式,Xlsx格式
		downloadTplCsv: API_SERVER + '/common/download-file?filePath=/ext/smms/dynDataTemplate.csv',
		downloadTplTxt: API_SERVER + '/common/download-file?filePath=/ext/smms/dynDataTemplate.txt',
		downloadTplXls: API_SERVER + '/common/download-file?filePath=/ext/smms/dynDataTemplate.xls',
		downloadTplXlsx: API_SERVER + '/common/download-file?filePath=/ext/smms/dynDataTemplate.xlsx',
		//下载前缀downloadPrefix: API_SERVER + '/common/download-file?filePath='
	}
}

传出参数说明

|参数 | 类型 | 是否必填 |默认 | 说明 | |:-------------:|:-------:|:-----------:|:--------:|:------------------| |v-model |Object |是 |{} |双向绑定传出内容对象 |


	{
		text: '内容',
		isValid: true,
		dynData: {},
        sensitiveMatchList: [{type:'匹配类型:1 提醒类 2 禁止类', word:'敏感词'}],
		textTemplateId: '如果选中的是模板编辑传出模板id',
		sendNum: '发送条数'
	}

组件事件说明

|参数 | 类型 | 是否必填 |默认 | 说明 | |:-------------:|:-------:|:-----------:|:--------:|:------------------| |preview |Event |否 | |预览事件 | |chooseTpl |Event |否 | |选择模板事件 |

事例

<template>
	<div>
		<SendContent v-model="ctx" :config="config" @preview="preview" @chooseTpl="chooseTpl" :urls="{sensitive:'/sensitive-word/match'}"
        						 :tpldata.sync="tplData" :fileUrls="fileUrl"></SendContent>
	</div>
</template>
<script>
	import SendContent from 'flag-ui-sendcontent'

	export default {
		data() {
			return {
				ctx: {
					text:'这个是发送内容'
				},
				config: {
					title:'发送内容',
					spSign: '[xxdfd]',
					isLongText: false
				},
				tplData:{
					id: '10136654637'
					text:'您好,{姓名,5}!您的{手机号码,11}正在进行验证验证码是:{验证码,4}'
				}
			}
		},
		components: {
			SendContent
		}
	}
</script>

组件变更记录

2017-08-28
  • 修改动态数据插入,敏感词提示
  • 添加预览功能,样式修改
2017-09-04
  • 预览长短信增加分条显示- 增加过滤内容中的空格选项
  • 模版输入框最大长度限制
2017-10-18 v0.0.19

动态文件bugfix

2017-10-25 v0.0.23

新增参数config.disableEdit,控制textarea置灰

  • v0.0.24 bugfix
2018-01-29 v0.0.27