- <template>
- <view>
-
- <button @click="showInputDialog">显示弹窗button>
- view>
- template>
-
- <script>
- export default {
- methods: {
- showInputDialog() {
- uni.showModal({
- title: '请完成数据填写',
- content: '',
- editable:true,//是否显示输入框
- placeholderText:'请输入SN号',//输入框提示内容
- confirmText: '确认',
- cancelText: '取消',
- success: (res) => {
- if (res.confirm) {
- console.log('输入的内容:', res.content);
- }
- }
- });
- }
- }
- };
- script>