|
- <template>
- <scroll-view class="main" scroll-y>
- <input placeholder="输入限制为10,自动获取焦点" maxlength="10" autofocus/>
- <input type="password" placeholder="密码输入框"/>
- <input placeholder="数字键盘" keyboard-type="number"/>
- <input placeholder="键盘完成按钮文字为搜索" confirm-type="search" onconfirm={this.onconfirm}/>
- </scroll-view>
- </template>
- <style>
- .main {
- width: 100%;
- height: 100%;
- }
- input {
- margin: 8px;
- width: auto;
- }
- </style>
- <script>
- export default {
- name: 'test',
- methods:{
- onconfirm(e){
- api.alert({
- msg: '搜索' + e.detail.value
- });
- }
- }
- }
- </script>
复制代码
打开一个普通的stml , 我这里测试能弹出 |
|