0👍
✅
You should add a setter to your computed property with a getter :
<input v-model="policyMapName" />
policy-map <span>{{ policyMapName }}</span>
setup() {
const circuitID = ref('99/KRFS/010572//SYG');
const policyMapName = computed({
get: () => {
const cID = circuitID.value;
return cID.replace(/[/]/g, '').slice(0, -3);
},
set:(newval)=>{
circuitID.value =newval
}
});
}
Source:stackexchange.com