It is still inevitable to use JavaScript for DOM operations#
For example, Vue cannot add attributes to a
<div>
element that only has an id attribute, and JavaScript syntax is still needed for this.
The concept of data returned by the ref() function is different in the function
and <template>
tags#
<script setup>
import { ref } from "vue";
const ind = ref(0);
function add(){
ind.value++; // Here, ind must be added with .value
}
</script>
<template>
<p>{{ind}}</p> // Here, ind is not needed
</template>