小编Ous*_*ari的帖子

Flowbite 模式未显示

我试图在我的项目中使用 Flowbite 组件,但它们不起作用(例如下拉菜单、模态菜单……)。

我遵循了文档,但没有任何作用。

我使用的是 vuejs 3,Vite v2.9.9。

这是我的main.js文件:

import { createApp } from 'vue'
import App from "@/App.vue";
import router from './router/index'
import store from './state/store'

// Imported css file [TailwindCSS]
import './index.css'

// Imported flowbite
import 'flowbite';

createApp(App)
    .use(router)
    .use(store)
    .mount('#app')
Run Code Online (Sandbox Code Playgroud)

模态.vue

<template>

  <!-- Modal toggle -->
  <button class="block text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center dark:bg-blue-600 dark:hover:bg-blue-700 dark:focus:ring-blue-800" type="button" data-modal-toggle="default-modal">
    Toggle modal
  </button>

  <!-- Main modal -->
  <div id="default-modal" aria-hidden="true" class="hidden …
Run Code Online (Sandbox Code Playgroud)

vue.js tailwind-css vite flowbite

5
推荐指数
1
解决办法
4914
查看次数

标签 统计

flowbite ×1

tailwind-css ×1

vite ×1

vue.js ×1