Giter Site home page Giter Site logo

chatui's Introduction

ChatUI

Install

npm install vue-chat-ui --save

Code Organization

├── build                      
├── config           
├── preview                      // project preview image
├── src                          // the source files
│   ├── assets                   // static image resource
│   ├── components        
│   │   ├── chat_area.vue        // provide chatting view
│   │   ├── chat_cell.vue        // a cell include contact simple data
│   │   ├── chat_dialog.vue      // pop dialog
│   │   ├── chat_group.vue       // chat-cell group
│   │   ├── chat_header.vue      // top header
│   │   └── chat_pop_bubble.vue  // small bubble clickable
│   ├── pages 
│   │   ├── chat.vue             // chat-each-other view
│   │   ├── index.vue            // contact list
│   │   ├── overview.vue         // contact profile view
│   │   ├── page_transition.vue  // page transition animate
│   │   ├── pay.vue              // pay for VIP
│   │   └── theme.vue            // change theme
│   ├── router
│   │   └── index.js             // vue router setting
│   ├── scripts                  // scripts resource
│   ├── styles                   // css resource
│   ├── App.vue                  // page entry file
│   └── main.js                  // program entry file, load components
├── .babelrc
├── .gitigore
├── data.json                    // analog data of back end
├── index.html                   // entry html
├── LICENSE
├── package-lock.json
├── package.json
└── README.md

Components

ChatArea

Provide the conversation view and the message sender of each chatting.

Menu props

props Introductions type default
height Chatting area height. Number 300
contactAvatar URL of other avartar, display on the left. String -
ownerAvatar URL of own avartar, display on the right. String -
oriData Chat message, once at start time. Array []

Menu events

events Introductions return
on-avatar-click Triggered when a avatar is clicked. Which avatar was clicked (0: own, 1: other).
load-more Drag to top and get more data. A function callback contains success status and data.
on-msg-send Triggered when the message to be sent is ready and the sending button is clicked. The message of sending.

When you received a new message, use this.$bus.emit('new-chat-data', message)with vue-bus on parent to provide the new message to this component.

ChatCell

A cell include contact avatar, nickname, last massage and time.

Menu props

props Introductions type default
avatar Avartar URL. String ''
nickname Nickname or display name. String ''
msg The last message. String ''
time The sent time of last message. String ''
circle-avatar Display the avatar in circle or not. Boolean false

ChatGroup

The contacts list container, each info including other's avatar, the last message of the chat, the last time. Consists of the chat-cell component.

Menu props

props Introductions type default
data Contacts list data. Array []

Menu events

events Introductions return
on-cell-click A item is clicked. click index, content.

ChatDialog

Pop a dialog in custom.

Menu props

props Introductions type default
type Dialog type (text dialog or input dialog). Number 0
show Dialog display. Boolean false
title Dialog title. String false
content Dialog content. String ''
positive-btn Display text on positive button. String 'Confirm'
negative-btn Display text on negative button. String 'Cancel'

Menu events

events Introductions return
positive-btn-click When the positive button is pressed. content
negative-btn-click When the nagative button is pressed. -

ChatHeader

The top header.

Menu props

props Introductions type default
height The height occupied by the header. Number 50
back Display the back option. Boolean true
title The content of the header. String ''
fixed The position of the header use fixed or not. Boolean false

chatui's People

Contributors

stuffish avatar

Stargazers

shin avatar  avatar  avatar Andy avatar 张剑™ avatar 无心戈 avatar  avatar www avatar Gustavo León Tramontin avatar

Watchers

 avatar

Forkers

wwppkr athiwatp

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.