forked from alibaba/weex
-
Notifications
You must be signed in to change notification settings - Fork 1
/
template.we
37 lines (33 loc) · 1.13 KB
/
template.we
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<template>
<scroller>
<wxc-panel title="Dialog" type="primary">
<wxc-tip type="success" value="It's a weex example template." style="margin-bottom: 20px;"></wxc-tip>
<wxc-hn level="1" value="H1"></wxc-hn>
<wxc-button type="primary" onclick="{{toast}}" value="Toast"></wxc-button>
<wxc-hn level="2" value="H3"></wxc-hn>
<wxc-button type="warning" onclick="{{toast}}" value="Toast"></wxc-button>
</wxc-panel>
<wxc-panel title="Image" type="primary">
<wxc-tip type="warning" value="Weex screen width is 750" style="margin-bottom: 20px;"></wxc-tip>
<image class="img" style=" width: 400px; height: 400px;" src="{{img}}"></image>
<wxc-panel title="Image" type="default">
<text>sub info</text>
</wxc-panel>
</wxc-panel>
</scroller>
</template>
<script>
require('weex-components');
module.exports = {
data: {
img: '//gw.alicdn.com/tps/i2/TB1DpsmMpXXXXabaXXX20ySQVXX-512-512.png_400x400.jpg'
},
methods: {
toast: function() {
this.$call('modal', 'toast', {'message': 'a toast', 'duration': 2});
}
}
}
</script>
<style>
</style>