54 lines
1.2 KiB
JavaScript
54 lines
1.2 KiB
JavaScript
|
|
import "./static/iconfont/iconfont.css"
|
|
import './static/css/app.css';
|
|
import "./static/iconfont/iconfont-weapp/iconfont-weapp-icon.css"
|
|
|
|
// 全局组件
|
|
import searchView from './components/searchView/index'
|
|
import loadMore from './components/loadMore/index'
|
|
import progressBar from './components/progressBar'
|
|
|
|
// #ifndef VUE3
|
|
import Vue from 'vue'
|
|
import App from './App'
|
|
import svg from './static/iconfont/svg.js'
|
|
|
|
Vue.component('search-view',searchView);
|
|
Vue.component('load-more',loadMore);
|
|
Vue.component('progress-bar',progressBar);
|
|
|
|
|
|
Vue.use(svg);
|
|
|
|
Vue.config.productionTip = false;
|
|
App.mpType = 'app';
|
|
|
|
const app = new Vue({
|
|
...App
|
|
})
|
|
app.$mount()
|
|
// #endif
|
|
|
|
// #ifdef VUE3
|
|
import { createSSRApp } from 'vue'
|
|
import App from './App.vue'
|
|
import request from "./utils/api.js"
|
|
import publicMethods from "./utils/public.js"
|
|
|
|
export function createApp() {
|
|
const app = createSSRApp(App)
|
|
|
|
// 全局注册组件
|
|
app.component('searchView', searchView);
|
|
app.component('loadMore', loadMore);
|
|
app.component('progressBar', progressBar);
|
|
|
|
app.config.globalProperties.$api = request;
|
|
app.config.globalProperties.$wf = publicMethods;
|
|
return {
|
|
app
|
|
}
|
|
}
|
|
// #endif
|
|
|