forked from alibaba/weex
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request alibaba#10 from JackPu/html5-feture-input-enter-ke…
…y-type + [html5] input and textarea enter key type
- Loading branch information
Showing
10 changed files
with
222 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<scroller> | ||
<panel title="textarea" type="primary"> | ||
<textarea | ||
class="textarea" | ||
autofocus="true" | ||
return-key-type="done" | ||
@return="onreturn" | ||
@change="onchange" | ||
@input="oninput" | ||
/> | ||
<text>oninput: {{txtInput}}</text> | ||
<text>onchange: {{txtChange}}</text> | ||
<text>enter key type: {{returnType}}</text> | ||
<text>action: {{msg}}</text> | ||
</panel> | ||
</scroller> | ||
</template> | ||
|
||
<style scoped> | ||
.textarea { | ||
font-size: 30px; | ||
height: 280px; | ||
width: 400px; | ||
border-width: 2px; | ||
border-color: #ccc; | ||
} | ||
</style> | ||
|
||
<script> | ||
var modal = weex.requireModule('modal') | ||
module.exports = { | ||
data: function () { | ||
return { | ||
txtInput: '', | ||
txtChange: '', | ||
returnType: '', | ||
msg: '' | ||
} | ||
}, | ||
components: { | ||
panel: require('../include/panel.vue') | ||
}, | ||
methods: { | ||
onchange: function(event) { | ||
this.txtChange = event.value; | ||
}, | ||
oninput: function(event) { | ||
this.txtInput = event.value; | ||
}, | ||
onreturn: function(event) { | ||
this.returnType = event.returnKeyType; | ||
this.msg = 'You are "' + this.returnType + '" ' + event.value; | ||
} | ||
} | ||
}; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import base from './base' | ||
import style from './style' | ||
import scrollable from './scrollable' | ||
import inputCommon from './input-common' | ||
|
||
export { | ||
base, | ||
scrollable, | ||
style, | ||
scrollable | ||
inputCommon | ||
} |
Oops, something went wrong.