Uniapp 生成的 Vue2 格式 Template 代码示例
<template>
<view>
<text>{{ message }}</text>
<button @click="onClick">点击我</button>
</view>
</template>
<script>
export default {
data() {
return {
message: 'Hello, World!'
}
},
methods: {
onClick() {
console.log('点击了按钮')
}
}
}
</script>
原文地址: https://www.cveoy.top/t/topic/m1ld 著作权归作者所有。请勿转载和采集!