Blame view

pages/API/modal/modal.vue 970 Bytes
4b045f7c   刘淇   江阴初始化项目
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
38
39
40
  <template>
  	<view>
  		<page-head :title="title"></page-head>
  		<view class="uni-padding-wrap uni-common-mt">
  			<view class="uni-btn-v">
  				<button type="default" @tap="modalTap">有标题的modal</button>
  				<button type="default" @tap="noTitlemodalTap">无标题的modal</button>
  			</view>
  		</view>
  	</view>
  </template>
  <script>
  
  	export default {
  		data() {
  			return {
  				title: 'modal',
  				modalHidden: true,
  				modalHidden2: true
  			}
  		},
  		methods: {
  			modalTap: function (e) {
  				uni.showModal({
  					title: "弹窗标题",
  					content: "弹窗内容,告知当前状态、信息和解决方法,描述文字尽量控制在三行内",
  					showCancel: false,
  					confirmText: "确定"
  				})
  			},
  			noTitlemodalTap: function (e) {
  				uni.showModal({
  					content: "弹窗内容,告知当前状态、信息和解决方法,描述文字尽量控制在三行内",
  					confirmText: "确定",
  					cancelText: "取消"
  				})
  			}
  		}
  	}
  </script>