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

@extscreen/es-protocal-dialog

v1.0.28

Published

npm config set access public ————— 设置为公共库 rollup -c rollup.config.js —————— 生成dist 文件,这步报错提示不能使用import就在package 里加 "type": "module" npm publish —————— 发布 Vue2项目集成 1、引入依赖 ``` "@extscreen/es-protocal-dialog": "1.0.24" ``` 2、在App.vue中引入组件 ```vue //协议弹窗组件 imp

Downloads

447

Readme

npm config set access public ————— 设置为公共库 rollup -c rollup.config.js —————— 生成dist 文件,这步报错提示不能使用import就在package 里加 "type": "module" npm publish —————— 发布 Vue2项目集成 1、引入依赖

"@extscreen/es-protocal-dialog": "1.0.24"

2、在App.vue中引入组件

//协议弹窗组件
import {EsProtocolDialog} from '@extscreen/es-protocal-dialog';
import '@extscreen/es-protocal-dialog/dist/index.css';

export default {
components: {
EsProtocolDialog
},
data:{
protocolDialogProps:{
//协议配置接口地址,可以为空,默认请求正式环境
domain:'',
//快应用包名
packageName:BuildConfig.packageName,
//快应用名称
appName:__CONFIG__.esAppName,
//用于控制何时显示
initFinish:false,
//控制是否展示
hidden:false,
//牌照方编码
bcCode:'',
//协议跳转的路由地址
webViewRouter:'load_web_view'
}
}
}

3、集成组件,替换原先的协议弹窗

<template>
...
<es-protocol-dialog
:domain="protocolDialogProps.domain"
:packageName="protocolDialogProps.packageName"
:appName="protocolDialogProps.appName"
:initFinish="protocolDialogProps.initFinish"
:hidden="protocolDialogProps.hidden"
:bcCode="protocolDialogProps.bcCode"
:webViewRouter="protocolDialogProps.webViewRouter"
@onNoProtocol="onNoProtocol"
@onAgreeClick="onAgreeClick"
/>
...
</template>
<script>
export default{
  methods:{
    onESCreate(params){
      
      //在需要协议弹窗显示的位置,初始化数据
      // 需要赋值bcCode,domain,等可能变化的参数,domain不含/api/,如果无特殊需要,可以不传
      // 组件内部有默认值https://api.extscreen.com/extscreenapi
      const baseUrl=BuildConfig.TEST_ENV ? __CONFIG__.baseTestUrl :BuildConfig.hostUrl
      this.protocolDialogProps.domain=baseUrl.replace(/\/api$/g,'')
      this.protocolDialogProps.bcCode=BuildConfig.bcCode
      //由于协议跳转是拉起快应用实现,下面的逻辑必须写上,否则协议会无法跳转
      this.protocolDialogProps.hidden=params.params?.isHideXieYi==1
      this.protocolDialogProps.initFinish=true
    },
    onNoProtocol(){
      //无协议弹窗时出触发的内容,例如弹消息弹窗
    },
    onAgreeClick(){
      //有协议弹窗,点确定触发的内容
    }
  }
}
</script>