Socket
Book a DemoInstallSign in
Socket

wepy-sticker

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wepy-sticker

sticker for wechat mini program, 微信小程序表情包组件

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

wepy-sticker

小程序表情包组件

screenshot

Install 安装

$ npm i wepy-sticker -S

Usage 使用

// index.wpy

<style lang="less">
  .page-container {
    width: 750rpx;
    height: 400rpx;
    border: 1px solid rgba(0,0,0,.3);
    box-sizing: border-box;
  }

  .input {
    width: 750rpx;
    border: 1px solid #000;
  }
</style>

<template>
  <view>
    <input class="input" value="{{inputValue}}"/>
  </view>
  <view class="page-container">
    <sticker :config.sync="stickerConfig"></sticker>
  </view>
</template>

<script>
  import wepy from 'wepy'
  import Sticker from 'wepy-sticker'
  import stickerDefaultConfig from 'wepy-sticker/defaultConfig'

  export default class Index extends wepy.page {
    data = {
      stickerConfig: stickerDefaultConfig,
      inputValue: ''
    }

    components = {
      sticker: Sticker
    }

    events = {
      'wepy-sticker-tap': (stickerObj) => {
        console.log(stickerObj)
        this.inputValue += stickerObj.wrappedKey
      }
    }
  }
</script>

Events 事件


events = {
    'wepy-sticker-tap': (stickerObj) => {

    }
}

License

MIT

Keywords

wechat

FAQs

Package last updated on 13 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts