1.0.3 • Published 2 months ago

@gdyfe/gdy-component-lib v1.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

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控制窗口显隐(必填)booleanfalse
uinUin(必填)number | stringnull
title窗口标题string"选择地址"
checkable开启选中模式,可选择某个地址booleantrue
leftArrow是否显示左侧返回按钮booleanfalse
leftText左侧显示文字string""
defaultId默认选中地址的idnumbernull
createApi创建地址的api函数(必填)functionnull
updateApi更新地址的api函数(必填)functionnull
retrieveApi获取地址列表的api函数(必填)functionnull
deleteApi删除地址的api函数(必填)functionnull
Event
事件名说明回调参数
onSave当checkable为true且leftText、leftArrow均为非真值,弹窗关闭时触发value:所选中地址的对象或null
onBackHandler当leftArrow或leftText为true时,点击左侧返回按钮或文字时触发value: 所选中地址的对象或null
onClose当弹窗关闭时触发-

AddressEditPopup(地址编辑弹窗)

Props
参数说明类型默认值
v-model控制窗口显隐(必填)booleanfalse
info所编辑地址的对象,对象中name,mobile,city,province,area,detail是必须的object{}
Event
事件名说明回调参数
onBackHandler当点击标题左侧返回按钮时触发-
onConfirm当点击标题右侧保存按钮时触发value:传入的info和表单当前最新值的并集对象

AreaPicker(地区选取弹窗)

Props
参数说明类型默认值
v-model控制窗口显隐(必填)booleanfalse
info暂未使用object{}
Event
事件名说明回调参数
onCancel当点击左侧取消按钮时触发-
onConfirm当点击右侧确定按钮时触发value:选取省、城市、县区的对象数组

SendRedPackPopup(红包发送弹窗)

Props
参数说明类型默认值
v-model控制窗口显隐(必填)booleanfalse
info改变表单数据(暂未使用)object{}
getBlessingApi获取祝福语列表的api函数(必填)functionnull
sendRedPackApi发送红包的api函数(必填)functionnull
channelId直播间id(必填)number0
uinUin(必填)number0
backUrl支付完成返回的地址(必填)stringwindow.location.href
customerDomain转跳支付的域(必填)stringweb.guangdianyun.tv
Event
事件名说明回调参数
onConfirm当点击“发送红包”按钮时触发value: 接口发送数据,及接口返回数据(在请求成功后触发)
1.0.3

2 months ago

1.0.2

2 months ago

1.0.1

2 months ago

1.0.0

8 months ago

0.4.4

1 year ago

0.4.3

1 year ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago