Vue+Vue Router+TailwindCss+Daisyui部署

一、构建Vue项目

> npm init vue@latest

> cd <your-project-name>

> npm install

> npm run dev

二、设置IDEA JS版本

三、安装Tailwindcss

Install Tailwind CSS with Vite - Tailwind CSS

复制代码
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

在文件中添加所有模板文件的路径tailwind.config.js

复制代码
/** @type {import('tailwindcss').Config} */
export default {
  content: [
    "./index.html",
    "./src/**/*.{vue,js,ts,jsx,tsx}",
  ],
  theme: {
    extend: {},
  },
  plugins: [],
}

将 Tailwind 指令添加到您的 CSS 中

@tailwind将Tailwind 每个层的指令添加到您的文件中。 ./src/style.css

复制代码
@tailwind base;
@tailwind components;
@tailwind utilities;

开始您的构建过程

使用 运行您的构建过程npm run dev

复制代码
npm run dev

开始在您的项目中使用 Tailwind

开始使用 Tailwind 的实用程序类来设计您的内容。

复制代码
<template>
  <h1 class="text-3xl font-bold underline">
    Hello world!
  </h1>
</template>

四、daisyUI安装

Install daisyUI as a Tailwind CSS plugin --- Tailwind CSS Components

Install daisyUI

复制代码
npm i -D daisyui@latest

Then add daisyUI to your tailwind.config.js files

复制代码
module.exports = {
  //...
  plugins: [require("daisyui")],
}
相关推荐
lichenyang453几秒前
ASCF WebView:H5 为什么收不到元服务消息?
前端
莪_幻尘6 分钟前
从 0 到 1 搭建你的 AI Agent 平台:当 Agent 有了工厂,人人都能造同事
前端·ai编程
yuzhiboyouye28 分钟前
XML写接口适用场景举例
java·服务器·前端
IMPYLH29 分钟前
HTML 的 <slot> 元素
前端·网络·html
计算机魔术师39 分钟前
AI行业周末炸锅:有人要踩刹车,有人嫌你刹车片太厚
前端
yuzhiboyouye1 小时前
零sql和xml写接口,的区别是什么,过程是什么,举例一下下,用mybatis-plus+ spring-boot
java·服务器·前端
怕浪猫1 小时前
构建你自己的 AI Agent 发行版:从 Profile 定制到生产部署全流程
前端·后端·面试
深圳市益普科技有限公司1 小时前
半导体CIM数据底座:四步把多厂数据拉通
前端
乐迪绘防伪油墨技术分享2 小时前
特种功能油墨选型指南:温变 / 遇水 / 荧光 / UV LED 技术对比与供应商参考
前端·html·uv
cll_8692418912 小时前
WordPress Single Post 文章页美化:响应式表格、图片优化与自动悬浮 Table of Contents(CSS + JS)
前端·css