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

@gdyfe/gdy-component-lib

v1.0.4

Published

广电云C端业务组件库

Downloads

21

Readme

gdy-component-lib

Introduction

广电云C端业务组件库,目前含有地址选择器弹窗,基础组件基于vant-ui

Setup

yarn add @gdyfe/gdy-component-lib -S
npm install @gdyfe/gdy-component-lib -S

import

全局引入

// main.js

import Vue from 'vue'
import GdyComponentLib from '@gdyfe/gdy-component-lib'
import '@gdyfe/gdy-component-lib/lib/index.css'

Vue.use(GdyComponentLib)

局部引入

demo.vue

<template>
	<!-- 在这里只是作为例子展示,实际使用过程必传参数不止这些 -->
	<AddressListPopup v-model="isShow"></AddressListPopup>
</template>

<script>
import { AddressListPopup } from '@gdyfe/gdy-component-lib'
import '@gdyfe/gdy-component-lib/lib/index.css'

export default {
  name: 'demo',
  data(){
    return {
      isShow: true
    }
  },
  components: {
    AddressListPopup
  }
}
</script>

API

AddressListPopup(地址列表弹窗)

Props

| 参数 | 说明 | 类型 | 默认值 | | ----------- | ----------------------------- | ---------------- | ---------- | | v-model | 控制窗口显隐(必填) | boolean | false | | uin | Uin(必填) | number | string | null | | title | 窗口标题 | string | "选择地址" | | checkable | 开启选中模式,可选择某个地址 | boolean | true | | leftArrow | 是否显示左侧返回按钮 | boolean | false | | leftText | 左侧显示文字 | string | "" | | defaultId | 默认选中地址的id | number | null | | createApi | 创建地址的api函数(必填) | function | null | | updateApi | 更新地址的api函数(必填) | function | null | | retrieveApi | 获取地址列表的api函数(必填) | function | null | | deleteApi | 删除地址的api函数(必填) | function | null |

Event

| 事件名 | 说明 | 回调参数 | | ------------- | ---------------------------------------------------------------- | ----------------------------- | | onSave | 当checkable为true且leftText、leftArrow均为非真值,弹窗关闭时触发 | value:所选中地址的对象或null | | onBackHandler | 当leftArrow或leftText为true时,点击左侧返回按钮或文字时触发 | value: 所选中地址的对象或null | | onClose | 当弹窗关闭时触发 | - |

AddressEditPopup(地址编辑弹窗)

Props

| 参数 | 说明 | 类型 | 默认值 | | ------- | -------------------------------------------------------------------------- | ------- | ------ | | v-model | 控制窗口显隐(必填) | boolean | false | | info | 所编辑地址的对象,对象中name,mobile,city,province,area,detail是必须的 | object | {} |

Event

| 事件名 | 说明 | 回调参数 | | ------------- | ---------------------------- | ------------------------------------------- | | onBackHandler | 当点击标题左侧返回按钮时触发 | - | | onConfirm | 当点击标题右侧保存按钮时触发 | value:传入的info和表单当前最新值的并集对象 |

AreaPicker(地区选取弹窗)

Props

| 参数 | 说明 | 类型 | 默认值 | | ------- | -------------------- | ------- | ------ | | v-model | 控制窗口显隐(必填) | boolean | false | | info | 暂未使用 | object | {} |

Event

| 事件名 | 说明 | 回调参数 | | --------- | ------------------------ | ----------------------------------- | | onCancel | 当点击左侧取消按钮时触发 | - | | onConfirm | 当点击右侧确定按钮时触发 | value:选取省、城市、县区的对象数组 |

SendRedPackPopup(红包发送弹窗)

Props

| 参数 | 说明 | 类型 | 默认值 | | -------------- | ------------------------------- | -------- | -------------------- | | v-model | 控制窗口显隐(必填) | boolean | false | | info | 改变表单数据(暂未使用) | object | {} | | getBlessingApi | 获取祝福语列表的api函数(必填) | function | null | | sendRedPackApi | 发送红包的api函数(必填) | function | null | | channelId | 直播间id(必填) | number | 0 | | uin | Uin(必填) | number | 0 | | backUrl | 支付完成返回的地址(必填) | string | window.location.href | | customerDomain | 转跳支付的域(必填) | string | web.guangdianyun.tv |

Event

| 事件名 | 说明 | 回调参数 | | --------- | -------------------------- | -------------------------------------------------------- | | onConfirm | 当点击“发送红包”按钮时触发 | value: 接口发送数据,及接口返回数据(在请求成功后触发) |