欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

VUE3 与 Uniapp III(属性绑定)

最编程 2024-04-30 21:04:02
...
<template> <image :src="pic"></image> <!-- 此时loading的false是字符串,不是布尔类型 --> <button loading="false">按钮1</button> <!-- 此时loading使用了属性绑定,这时的false是布尔类型 --> <button :loading="false">按钮2</button> <button :loading="isLoading">按钮3</button> </template> <script setup> import {ref} from "vue"; let pic = ref("https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png"); let isLoading = ref(false); </script> <style lang="scss"> </style>

推荐阅读