Giter VIP home page Giter VIP logo

message-flow-component's Introduction

message-flow-component

消息流处理

演示

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

test.png

说明

全局注册几个渲染不同消息类型的组件,在 vue 原型链上绑定$sendMessage(options)方法,根据 options 传参的不同,实例化不同组件,添加到 dom 上。

方法入参对象说明

键值 值类型 说明 默认值
type String 发送的消息类型,可选值:theText/theImg/theSystemInfo(值为 vue 组件的 name)
from String 发送消息的位置,可选值:left/right
message String type 为 theText 可用,发送的消息内容
imgSrc String type 为 theImg 可用,发送的图片地址
systemInfo String type 为 theSystemInfo 可用,发送的系统通知

message-flow-component's People

Contributors

wyboom avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.