npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vue-chat-ui

v0.1.0

Published

a simple chat ui in mobile with vue

Downloads

6

Readme

ChatUI

image

Build Setup

# install dependencies
npm install

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

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 |