mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-31 20:28:09 +01:00
playground: lint
This commit is contained in:
@@ -12,7 +12,7 @@ const items = computed(() => [
|
||||
[{
|
||||
label: 'Profile',
|
||||
icon: 'i-heroicons-user',
|
||||
select (e: Event) {
|
||||
select(e: Event) {
|
||||
e.preventDefault()
|
||||
console.log('Profile clicked')
|
||||
}
|
||||
@@ -37,7 +37,7 @@ const items = computed(() => [
|
||||
label: 'Invite by link',
|
||||
icon: 'i-heroicons-link',
|
||||
shortcuts: [metaSymbol.value, 'I'],
|
||||
select (e: Event) {
|
||||
select(e: Event) {
|
||||
e.preventDefault()
|
||||
console.log('Invite by link clicked')
|
||||
}
|
||||
@@ -49,21 +49,21 @@ const items = computed(() => [
|
||||
icon: 'i-simple-icons-slack',
|
||||
to: 'https://slack.com',
|
||||
target: '_blank',
|
||||
select (e: Event) {
|
||||
select(e: Event) {
|
||||
e.preventDefault()
|
||||
console.log('Import from Slack clicked')
|
||||
}
|
||||
}, {
|
||||
label: 'Import from Trello',
|
||||
icon: 'i-simple-icons-trello',
|
||||
select (e: Event) {
|
||||
select(e: Event) {
|
||||
e.preventDefault()
|
||||
console.log('Import from Trello clicked')
|
||||
}
|
||||
}, {
|
||||
label: 'Import from Asana',
|
||||
icon: 'i-simple-icons-asana',
|
||||
select (e: Event) {
|
||||
select(e: Event) {
|
||||
e.preventDefault()
|
||||
console.log('Import from Asana clicked')
|
||||
}
|
||||
@@ -78,7 +78,7 @@ const items = computed(() => [
|
||||
icon: 'i-simple-icons-github',
|
||||
to: 'https://github.com/nuxt/ui',
|
||||
target: '_blank',
|
||||
select (e: Event) {
|
||||
select(e: Event) {
|
||||
e.preventDefault()
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -13,8 +13,7 @@ type Schema = z.output<typeof schema>
|
||||
const state = reactive<Partial<Schema>>({})
|
||||
const state2 = reactive<Partial<Schema>>({})
|
||||
|
||||
|
||||
function onSubmit (event: FormSubmitEvent<Schema>) {
|
||||
function onSubmit(event: FormSubmitEvent<Schema>) {
|
||||
console.log(event.data)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -7,7 +7,7 @@ const links = [
|
||||
src: 'https://avatars.githubusercontent.com/u/739984?v=4'
|
||||
},
|
||||
badge: 100,
|
||||
select () {
|
||||
select() {
|
||||
console.log('Profile clicked')
|
||||
}
|
||||
}, {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
const open = ref(false)
|
||||
const loading = ref(false)
|
||||
|
||||
function send () {
|
||||
function send() {
|
||||
loading.value = true
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
@@ -40,7 +40,7 @@ const templates = (id: number) => [{
|
||||
},
|
||||
actions: [{
|
||||
label: 'Action',
|
||||
click () {
|
||||
click() {
|
||||
console.log(`Toast ${id} action clicked`)
|
||||
}
|
||||
}]
|
||||
@@ -50,13 +50,13 @@ const templates = (id: number) => [{
|
||||
actions: [{
|
||||
label: 'Action 1',
|
||||
color: 'gray' as const,
|
||||
click () {
|
||||
click() {
|
||||
console.log(`Toast ${id} action 1 clicked`)
|
||||
}
|
||||
}, {
|
||||
label: 'Action 2',
|
||||
color: 'black' as const,
|
||||
click () {
|
||||
click() {
|
||||
console.log(`Toast ${id} action 2 clicked`)
|
||||
}
|
||||
}]
|
||||
@@ -67,13 +67,13 @@ const templates = (id: number) => [{
|
||||
label: 'Action',
|
||||
color: 'primary' as const,
|
||||
variant: 'outline' as const,
|
||||
click () {
|
||||
click() {
|
||||
console.log(`Toast ${id} action clicked`)
|
||||
}
|
||||
}]
|
||||
}]
|
||||
|
||||
function addToast () {
|
||||
function addToast() {
|
||||
const id = count.value++
|
||||
|
||||
const template = templates(id)[Math.floor(Math.random() * templates(id).length)]
|
||||
@@ -81,13 +81,13 @@ function addToast () {
|
||||
add({
|
||||
id,
|
||||
...template,
|
||||
click (toast) {
|
||||
click(toast) {
|
||||
console.log(`Toast ${toast.id} clicked`)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function updateToast () {
|
||||
function updateToast() {
|
||||
if (!last.value) {
|
||||
return
|
||||
}
|
||||
@@ -98,7 +98,7 @@ function updateToast () {
|
||||
})
|
||||
}
|
||||
|
||||
function removeToast () {
|
||||
function removeToast() {
|
||||
if (!last.value) {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user