收藏
回答

uniapp+ts+vite项目引入uView,小程序报 app.js错误 ! ?

VM5719:9 app.js错误:
 TypeError: Vue.filter is not a function
    at Object.install (vendor.js? [sm]:9938)
    at Object.use (vendor.js? [sm]:4155)
    at createApp (app.js? [sm]:32)
    at app.js? [sm]:37
    at I (WASubContext.js?t=wechat&s=1676013457838&v=2.30.0:1)
    at <anonymous>:7:9
    at doWhenAllScriptLoaded (<anonymous>:4046:21)
    at <anonymous>:15:5
    at h.loadBabelModules (assubloader.js:1)(env: Windows,mp,1.06.2301040; lib: 2.30.0)


main.ts

import { createSSRApp } from 'vue'
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import App from './App.vue'
import '@/style/index.css'
import uView from "uview-ui"

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

export function createApp() {
  const app = createSSRApp(App).use(uView).use(pinia)
  return {
    app,
  }
}
回答关注问题邀请回答
收藏

1 个回答

登录 后发表内容