• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<element name="hi">
2    <template>
3        <div><text class="hi">{{hi}}</text></div>
4    </template>
5
6    <style>
7    .hi {
8        font-size: 26px;
9        color: green;
10    }
11    </style>
12
13    <script>
14    module.exports = {
15        data: function() {
16            return {
17                hi: ''
18            }
19        }
20    }
21    </script>
22</element>
23
24<we-element name="name">
25    <template>
26        <div><text class="name">{{name}}</text></div>
27    </template>
28
29    <style>
30    .name {
31        font-size: 26px;
32        color: red;
33    }
34    </style>
35
36    <script>
37    module.exports = {
38        data: function() {
39            return {
40                name: ''
41            }
42        }
43    }
44    </script>
45</we-element>
46
47<template>
48    <div style="flex-direction: row;">
49        <hi hi="{{hi}}"></hi>
50        <name name="{{name}}"></name>
51    </div>
52</template>
53
54<script>
55export function data() {
56    return {
57        hi: 'Hello',
58        name: 'Weex'
59    }
60}
61</script>
62