| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- // @ts-nocheck
- import App from './App'
- import uvUiTools from "@/uni_modules/uv-ui-tools";
- // #ifdef H5
- import "@/uni.webview.1.5.6"
- import './common/webview.bridge'
- import './preload'
- // #endif
- import { useRequest } from '@/utils/request'
- import tool from '@/utils/uni-tool'
- import * as Pinia from 'pinia';
- import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
- import { useImage } from '@/hooks/useImage';
- // #ifndef VUE3
- import Vue from 'vue'
- import './uni.promisify.adaptor'
- Vue.config.productionTip = false
- Vue.use(uvUiTools)
- useRequest(Vue)
- App.mpType = 'app'
- const app = new Vue({
- ...App
- })
- app.$mount()
- // #endif
- // #ifdef VUE3
- import { createSSRApp } from 'vue'
- import { useTheme } from "@/hooks/useTheme";
- import "./static/style/tailwind.scss";
- export function createApp() {
- const app = createSSRApp(App)
- useRequest(app)
- app.use(uvUiTools)
- const { setTheme } = useTheme()
- setTheme()
- uni.$ie = tool;
- uni.$uv.setConfig({
- props: {
- loadingPage: {
- loadingText: { default: '' },
- image: { default: '/static/logo/loading1.gif' },
- class: { default: 'mx-loading-page' }
- },
- navbar: {
- placeholder: { default: true },
- clickHover: { default: true },
- statusBarHeight: { default: 0 }
- },
- statusBar: {
- statusBarHeight: { default: 0 }
- },
- tabs: {
- activeStyle: { default: () => ({ color: 'var(--primary-color)' }) }
- },
- steps: {
- activeColor: { default: 'var(--primary-color)' }
- },
- search: {
- color: { default: 'var(--main-color)' },
- actionStyle: { default: () => ({ color: 'var(--primary-color)' }) }
- },
- empty: {
- icon: { default: '/static/mescroll-empty.png' },
- height: { default: 140 },
- width: { default: 140 },
- text: { default: '暂无相关数据' }
- },
- icon: {
- customClass: {
- default: ''
- }
- },
- popup: {
- theme: {
- default: 'theme-ie'
- }
- },
- image: {
- customClass: {
- default: ''
- }
- },
- cell: {
- disableHover: {
- default: false
- }
- }
- }
- })
- const { resolvePath } = useImage();
- uni.$zp = {
- config: {
- 'default-page-size': 20,
- 'refresher-title-style': {
- fontSize: '28rpx'
- },
- 'loading-more-title-custom-style': {
- fontSize: '26rpx'
- }
- // 'empty-view-img-style': {
- // width: '364rpx',
- // height: '252rpx'
- // },
- // 'empty-view-img': resolvePath('/pagesStudy/static/image/icon-empty.png'),
- // 'empty-view-title-style': {
- // color: '#B3B3B3',
- // fontSize: '30rpx',
- // marginTop: '40rpx'
- // },
- // 'empty-view-style': {
- // marginTop: '-200rpx'
- // }
- }
- }
- const pinia = Pinia.createPinia();
- app.use(pinia);
- pinia.use(piniaPluginPersistedstate);
- return {
- app
- }
- }
- // #endif
|