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

feedback-dialog

v0.2.3

Published

服务反馈对话框

Downloads

5

Readme

feedback-dialog

服务反馈对话框

Install

npm install feedback-dialog --save

Simple Usage


render() {
    return (
        <div>
            <FeedbackDialog
                locale={'zh_CN'}/*zh_CN en_US 非必填*/
                className={'xxx'}/*非必填*/
                show={true}/*非必填*/
                position={'leftBottom'}/*非必填*/
                iconId={'feedback-server'}/*非必填*/
                iconFill={'#666'}/*非必填*/
                iconWidth={'32'}/*非必填*/
                iconHeight={'32'}/*非必填*/
                appCode={'AC1398'}/*非必填*/
                workUser={'23976'}/*非必填*/
                params={{'key1':'value1','key2':'value2'}}/*非必填*/
                extensionParams={{'module':'用车'}}/*非必填*/
                submitParamKeysFromUploadScreen={['authKey']}/*非必填*/
                uploadScreenUrl={'http://localhost:3000/feedback/uploadScreenshotWithBase64.json'}/*必填*/
                submitUrl={'http://localhost:3000/feedback/feedbackInfo.json'}/*必填*/
                onUploadScreenSuccess={t.handleUploadScreenSuccess.bind(t)}/*非必填*/
                onUploadScreenError={t.handleUploadScreenError.bind(t)}/*非必填*/
                onSubmitSuccess={t.handleSubmitSuccess.bind(t)}/*非必填*/
                onSubmitError={t.handleSubmitError.bind(t)}/*非必填*/
                />
                />
        </div>
    )
}

备注:在非React项目中使用,请参见index.html

Props

locale

  • 描述:国际化(包括 zh_CN, en_US)
  • 类型:String
  • 默认:zh_CN
  • 必选:否

className

  • 描述:自定义样式的class名称
  • 类型:String
  • 默认:''
  • 必选:否

show

  • 描述:是否显示服务反馈图标
  • 类型:Boolean
  • 默认:true
  • 必选:否

position

  • 描述:反馈图标初始停靠位置,'LEFTTOP'、'RIGHTTOP'、'LEFT'、'LEFTBOTTOM'、'RIGHTBOTTOM'、'RIGHT'
  • 类型:String
  • 默认:``
  • 必选:否

iconId

  • 描述:反馈图标svg-symbol的id
  • 类型:String
  • 默认:feedback-server
  • 必选:否

iconFill

  • 描述:反馈图标的颜色
  • 类型:String
  • 默认:#666
  • 必选:否

iconWidth

  • 描述:反馈图标的宽度,单位px
  • 类型:Number
  • 默认:32
  • 必选:否

iconHeight

  • 描述:反馈图标的的高度,单位px
  • 类型:Number
  • 默认:32
  • 必选:否

appCode

  • 描述:应用编码
  • 类型:String
  • 默认:``
  • 必选:否

workUser

  • 描述:用户工号
  • 类型:String
  • 默认:``
  • 必选:否

params

  • 描述:自选参数和值
  • 类型:JSON Object
  • 默认:``
  • 必选:否

extensionParams

  • 描述:设置到extension参数中的参数和值
  • 类型:JSON Object
  • 默认:``
  • 必选:否

submitParamKeysFromUploadScreen

  • 描述:上传截屏图片成功后,从返回结果中传到提交反馈信息URL的参数名称
  • 类型:Array
  • 默认:``
  • 必选:否

uploadScreenUrl

  • 描述:上传截屏图片的URL
  • 类型:String
  • 默认:''
  • 必选:是
  • 备注:该接口参数名为imgData

submitUrl

  • 描述:提交反馈信息的URL
  • 类型:String
  • 默认:''
  • 必选:是
  • 备注:该接口参数名为content

onUploadScreenSuccess

  • 描述:上传截屏图片成功的回调函数
  • 类型:function
  • 默认:null
  • 必选:否
  • 参数:res 成功信息详情

onUploadScreenError

  • 描述:上传截屏图片失败的回调函数
  • 类型:function
  • 默认:null
  • 必选:否
  • 参数:err 失败信息详情

onSubmitSuccess

  • 描述:提交反馈信息成功的回调函数
  • 类型:function
  • 默认:null
  • 必选:否
  • 参数:res 成功信息详情

onSubmitError

  • 描述:提交反馈信息失败的回调函数
  • 类型:function
  • 默认:null
  • 必选:否
  • 参数:err 失败信息详情

Links