<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>
VUE3与Uniapp 三 (属性绑定)
于 2024-04-25 23:36:51 首次发布