lint: Linter fixes
This commit is contained in:
@@ -1,7 +1,14 @@
|
||||
<template>
|
||||
<div class="flex flex-col gap-2">
|
||||
<label for="ms" class="block text-sm font-medium text-gray-900 dark:text-gray-400">Duration(ms)</label>
|
||||
<input v-model.number="ms" type="number" id="ms" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" placeholder="John" required>
|
||||
<input
|
||||
v-model.number="ms"
|
||||
type="number"
|
||||
id="ms"
|
||||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"
|
||||
placeholder="John"
|
||||
required
|
||||
/>
|
||||
<div class="flex gap-2">
|
||||
<Button @click="() => add('success')" color="green">success</Button>
|
||||
<Button @click="() => add('warning')" color="yellow">warning</Button>
|
||||
@@ -23,7 +30,7 @@ const ms = ref(5000)
|
||||
const toast = useToast()
|
||||
|
||||
const addUpdate = () => {
|
||||
const id = toast.add({
|
||||
toast.add({
|
||||
time: parseInt(ms.value) || 0,
|
||||
text: 'A new software version is available for download.',
|
||||
component: shallowRef(UpdateToast),
|
||||
@@ -35,16 +42,14 @@ const addUpdate = () => {
|
||||
}
|
||||
|
||||
const add = (type) => {
|
||||
if(type === 'update') return addUpdate()
|
||||
if (type === 'update') return addUpdate()
|
||||
toast.add({
|
||||
type,
|
||||
time: parseInt(ms.value) || 0,
|
||||
text: `${type} alert! Hello world!`,
|
||||
})
|
||||
|
||||
}
|
||||
const remove = () => {
|
||||
toast.pop()
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user