<toggle-button :value="false" @change="postHeight" v-bind:labels="{unchecked: 'OFF', checked: 'ON'}"/> <script> methods:{ postHeight: async function() { try { const res = await axios.post(url, { type: 'height', working: //true if switched to ON, false if OFF, }).then(res => res.data); } catch (err) { alert("can't post"); }; }, }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)