uviewplus在uniapp中的配置使用

版本:

json 复制代码
    "uview-plus": "^3.1.45"

在page.json中配置:

json 复制代码
"easycom": {
    "autoscan": true,
    "custom": {
      "^u--(.*)": "uview-plus/components/u-$1/u-$1.vue",
      "^up-(.*)": "uview-plus/components/u-$1/u-$1.vue",
      "^u-([^-].*)": "uview-plus/components/u-$1/u-$1.vue"
    }
  },

在uni.sass中引入theme.sass

sass 复制代码
@import "uview-plus/theme.scss";

在main.ts中:

ts 复制代码
import {createSSRApp} from "vue";
import App from "./App.vue";
// 导入less
import pinia from './stores'
import "uview-plus/index.scss";

// @ts-ignore
import uviewPlus from "uview-plus";

const app = createSSRApp(App)

export function createApp() {
    app.use(uviewPlus)
    app.use(pinia)
    return {
        app
    };
}

然后就可以了,这里要注意,theme.sass在unisass中引入的

相关推荐
码兄科技1 天前
24小时自助健身房系统软件开发实战指南:功能设计与部署方案
java·spring boot·uni-app
2501_916007471 天前
苹果商店iOS应用上架费用全面解析:开发者计划与审核费用计算
android·ios·小程序·https·uni-app·iphone·webview
2501_916008892 天前
如何实现iOS App代码混淆:SwiftShield使用指南
android·ios·小程序·https·uni-app·iphone·webview
2501_916008892 天前
怎么用 Godot 导出 iOS 应用并上架 App Store?签名字段该填什么?
android·ios·小程序·https·uni-app·iphone·webview
郑州光合科技余经理2 天前
同城外卖小程序开发:下单成功后,后台导出能不能对上用户端状态
开发语言·前端·git·后端·uni-app·php·ai编程
白远山3 天前
城市电竞陪玩调度系统实战:从派单算法到多端协同的架构拆解
java·架构·uni-app·需求分析
白远山3 天前
上海24小时自助健身房系统软件开发实战指南
java·架构·uni-app·需求分析
白远山4 天前
上海24小时自助健身房系统软件开发实战指南:从需求到部署
java·架构·uni-app·需求分析
海鸥两三5 天前
小程序文档预览 · 进阶面试题
小程序·uni-app·uniapp
海鸥两三5 天前
微信小程序 PDF 预览实践(uni.downloadFile → uni.openDocument)
小程序·uni-app