Bootstrap

曲线救国——uniapp封装toast消息提示组件(js)

说明:本组件借用到uv-ui前端框架的<uv-toast ref="toast"></uv-toast>作为消息提示,有条件的可以自己设计。另外主要用到@uni-ku/[email protected]

目录结构(主要文件):

  1. 安装@uni-ku/[email protected]

    npm install -D @uni-ku/root
    
  2. vite.config.js:

    import {
          defineConfig } from 'vite'
    import uni from '@dcloudio/vite-plugin-uni'
    import {
          UnifiedViteWeappTailwindcssPlugin as uvwt } from 'weapp-tailwindcss/vite'
    import {
          resolve } from 'path'
    import UniKuRoot from '@uni-ku/root'
    
    // https://vitejs.dev/config/
    export default defineConfig({
         
      plugins: 
;