Message.uvue 579 字节
Newer Older
DCloud-WZF's avatar
DCloud-WZF 已提交
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
<template>
	<view>
		<text class="uni-common-mt message-text">msg: {{msg}}</text>
		<text class="uni-common-mt change-message" @click="changeMessage">change message</text>
	</view>
</template>

<script lang="uts">
	export default {
		name: 'Message',
		data() {
			return {
				msg: 'default message'
			}
		},
		methods: {
			changeMessage() {
				this.msg = 'message changed'
			}
		}
	}
</script>

<style>
	.change-message {
		height: 40px;
		line-height: 40px;
		border: 1px solid #ccc;
		border-radius: 4px;
		text-align: center;
	}
</style>