1.0.2 • Published 1 year ago

@xxltestlib/share v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

teachee-share

分享组件: @yy/teachee-share

使用方法:

- 安装
npm install --save @yy/teachee-share
-引入
  import Vue from 'vue'

  import ShareSheet from '@yy/teachee-share'
  import '@yy/teachee-share/dist/share.css'

  Vue.use(ShareSheet)
  增加最新展示
-使用
<share-sheet
    :is-touch="show"
    :link-text="'222'"
    :show-popup.sync="false"
    :share-list="shareList"
    :share-course-type="1"
    :show-text="true"
    :show-edit="false"
    @sharePop="shareClick"
    :share-link="'123'">
</share-sheet>

shareClick () {
  this.show = true
}

可配置的参数:

1、 shareList:Array 分享渠道,需要严格按照下面的格式传递

  • 例子
    { logo: require('@/assets/share/icon-whatsapp.png'), shareText: 'Whatsapp',id:1 },
    { logo: require('@/assets/share/icon-Facebook.png'), shareText: 'Facebook' ,id:2},
    { logo: require('@/assets/share/icon-Link.png'), shareText: 'Copy Link',id:3 },
    { logo: require('@/assets/share/icon-KakaoTalk.png'), shareText: 'KakaoTalk', id: 4 },

1.2版本支持三种分享渠道:whatsApp Facebook 复制链接

    shareText:'Whatsapp'
    shareText: 'Facebook'
    shareText: 'Copy Link'

1.1.11版本支持四种种分享渠道:whatsApp Facebook 复制链接,KakaoTalk,渠道根据ID判断,所以不可写错

shareText: 'KakaoTalk'

1.1.11版本 teacheeCountry增加国家区分:支持INDIA(印度)、KR(韩国),默认INDIA,可根据此字段切换文案

teacheeCountry:'INDIA' || 'KR'

1.1.11 layout 支持平铺布局(tiled),默认弹窗形式(Pop-ups)

 平铺布局样式参考学生端公开课或者分销列表以及课程详情页
layout:'Pop-ups' || 'tiled'
上述字段不可更改,logo可动态更换

2、 shareLink:String - 分享的完整链接;

  • 例子:
shareLink: "https://dsy.teachee-dev.com/student/center/store/detail?id=xxx"

3、 showPopup:Boolean 默认弹窗是否展示

   showPopup:false

4、 showEdit:Boolean 分享链接内容是否可编辑

  showEdit:false

5、 showBtn:Boolean 是否展示分享icon

  showBtn:true

6、 showText:Boolean 是否展示share字段

  showText:false

7、 shareCourseType:number 课程类型,用来定义弹窗title 分享自定义内容content

  • title:
  0: 'Share the Product',
  1: 'Share the Course',
  2: 'Share the Mock Test',
  3: 'Share the Package',
  4: 'Share the Batch',
  5: 'Share the Landing Page',
  6: 'Share the Open Course'
  • content:
  0: 'Come and check this amazing product!',
  1: 'Come and check this amazing course!',
  2: 'Come and check this amazing mock test! ',
  3: 'Come and check this amazing course package! ',
  4: 'Come and check this amazing Batch! ',
  5: 'Come and view this amazing page! ',
  6: 'Come and check this amazing open course! '

8、 linkText:string 课程分享自定义文案,跟在分享自定义内容content之后(属于通用文案,如果设置了这个字段就不要再设置specialCopy)

 linkText:''

9、 isTouch:Boolean 是否用在移动端

  isTouch:false

9、 specialCopy:Object 动态文案

 specialCopy:{
   whatsApp:'',
   FbText:''
 }

 支持个性化文案传递,支持个性化设置fb文案和whatsapp文案,这个时候通用文案不再生效,复制文案会读whatsApp的文案