mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-26 18:00:43 +01:00
docs(app): prevent ui-pro / vue switch when disabled
This commit is contained in:
@@ -10,7 +10,13 @@ export function useSharedData() {
|
|||||||
icon: 'i-simple-icons-vuedotjs',
|
icon: 'i-simple-icons-vuedotjs',
|
||||||
value: 'vue',
|
value: 'vue',
|
||||||
disabled: module.value === 'ui-pro',
|
disabled: module.value === 'ui-pro',
|
||||||
onSelect: () => framework.value = 'vue'
|
onSelect: () => {
|
||||||
|
if (module.value === 'ui-pro') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
framework.value = 'vue'
|
||||||
|
}
|
||||||
}].map(f => ({ ...f, active: framework.value === f.value })))
|
}].map(f => ({ ...f, active: framework.value === f.value })))
|
||||||
|
|
||||||
const module = useCookie('nuxt-ui-module', { default: () => 'ui' })
|
const module = useCookie('nuxt-ui-module', { default: () => 'ui' })
|
||||||
@@ -24,7 +30,13 @@ export function useSharedData() {
|
|||||||
icon: 'i-lucide-panels-top-left',
|
icon: 'i-lucide-panels-top-left',
|
||||||
value: 'ui-pro',
|
value: 'ui-pro',
|
||||||
disabled: framework.value === 'vue',
|
disabled: framework.value === 'vue',
|
||||||
onSelect: () => module.value = 'ui-pro'
|
onSelect: () => {
|
||||||
|
if (framework.value === 'vue') {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
module.value = 'ui-pro'
|
||||||
|
}
|
||||||
}].map(m => ({ ...m, active: module.value === m.value })))
|
}].map(m => ({ ...m, active: module.value === m.value })))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user