Coder Social home page Coder Social logo

weex-hello-web's Introduction

weex-hello

This is a demonstrating extension for weex-html5, which is a self defined component to display a 'hello xxx' infomation panel in the weex page.

specs

This is a definition of this weex-hello component. It suggests what attributes the components should take, what special style names it support, and what events it can listen to.

attr

  • value: the displaying content after 'Hello'.

style

  • txt-color: the color of the displaying message.
  • bg-color: the background color of the displaying message.

event

  • click: will parse the current 'value' to the event object in the event handler.

how to use

Just place the tag <weex-hello> no matter where you like to display the info. For example, You want to play a msg 'hello WEEX', and when click on it, you want to display a alert message to show the component's value attribute. Then you can use the weex-hello component to do it.

<template>
  <div>
    <weex-hello style="txt-color:#fff;bg-color:green" value="WEEX" onclick="handleClick"></weex-hello>
  </div>
</template>

<script>
  module.exports = {
    methods: {
      handleClick (e) {
        alert('e.value : ' + e.value)
      }
    }
  }
</script>

where to publish

We suggest you publish the component on npm, with the name of weex-xxx. For this project, we published the weex-hello component to npm, so anyone can just require and use it by require('weex-hello').

help

what is Weex ?

Weex is a project for developers to write code once with web technologies and run it everywhere. site

how to extend Weex with self defined components and APIs ?

weex-hello is a example for extending components. The document for extending weex components and APIs is here: extend to web

weex-hello-web's People

Contributors

mrraindrop avatar

Stargazers

Luis Ángel Maciel avatar  avatar  avatar Lichun Dai avatar 悟了个空 avatar guoyuhua avatar coderyi avatar

Watchers

James Cloos avatar

weex-hello-web's Issues

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.