diff --git a/src/components/custom-btn/custom-btn.vue b/src/components/custom-btn/custom-btn.vue index 94e269d..3291691 100644 --- a/src/components/custom-btn/custom-btn.vue +++ b/src/components/custom-btn/custom-btn.vue @@ -13,6 +13,7 @@ custom-class="custom-btn-class" @click="clickBtn" :disabled="props?.disabled" + :class="[props?.disabled ? 'custom-btn-class-disabled' : '']" > {{ props.btnText }} @@ -65,6 +66,7 @@ const clickBtn = () => { width: 100%; background-color: #fff; padding: 14rpx 0 72rpx; + box-shadow: 0 1px 0 2px rgba(231, 231, 231, 1); } .apposition-btn-style { padding: 14rpx 30rpx 72rpx; @@ -76,4 +78,8 @@ const clickBtn = () => { padding: 18rpx 124rpx; } } +.custom-btn-class-disabled { + background-color: #e6e6e6 !important; + color: #bebebe !important; +} diff --git a/src/components/custom-navbar/index.vue b/src/components/custom-navbar/index.vue new file mode 100644 index 0000000..9c266c1 --- /dev/null +++ b/src/components/custom-navbar/index.vue @@ -0,0 +1,35 @@ + + + + diff --git a/src/components/x-navbar/index.vue b/src/components/x-navbar/index.vue deleted file mode 100644 index 4a17487..0000000 --- a/src/components/x-navbar/index.vue +++ /dev/null @@ -1,11 +0,0 @@ - - - - diff --git a/src/main.js b/src/main.js index b6b9f18..6597748 100644 --- a/src/main.js +++ b/src/main.js @@ -1,52 +1,55 @@ +import customNavbar from '@/components/custom-navbar/index' + import { createSSRApp } from 'vue' import App from './App.vue' -import dayjs from "dayjs"; +import dayjs from 'dayjs' import 'virtual:uno.css' -import VConsole from "vconsole"; +import VConsole from 'vconsole' import '@/utils/uni.webview.js' -import tmui from "@/uni_modules/tmui" -import {config} from "@/config/tmui/index.js"; -import 'dayjs/locale/zh-cn'; -import xLoaderror from '@/components/x-loaderror/index.vue' -import { vLoading } from "@/components/x-loading/index.js" +import tmui from '@/uni_modules/tmui' +import { config } from '@/config/tmui/index.js' +import 'dayjs/locale/zh-cn' +import xLoaderror from '@/components/x-loaderror/index.vue' +import { vLoading } from '@/components/x-loading/index.js' import messagePopup from '@/components/x-message/useMessagePopup' import pageAnimation from '@/components/page-animation/index.vue' import * as plugins from './plugins' -const {showMessage}=messagePopup() +const { showMessage } = messagePopup() dayjs.locale('zh-cn') -if (import.meta.env.VITE_SHOW_CONSOLE){ +if (import.meta.env.VITE_SHOW_CONSOLE) { new VConsole() } export function createApp() { const app = createSSRApp(App) plugins.setPinia(app) plugins.setComponents(app) - app.use(tmui,{...config}) - app.directive("loading", vLoading) + app.use(tmui, { ...config }) + app.directive('loading', vLoading) app.mixin(pageAnimation) - app.component('x-loaderror',xLoaderror) + app.component('customNavbar', customNavbar) + app.component('x-loaderror', xLoaderror) app.directive('no-space', { mounted(el) { el.addEventListener('input', (e) => { - const originalValue = e.target.value; - const newValue = originalValue.replace(/\s/g, ''); + const originalValue = e.target.value + const newValue = originalValue.replace(/\s/g, '') if (originalValue !== newValue) { - e.target.value = newValue; - e.target.dispatchEvent(new Event('input')); + e.target.value = newValue + e.target.dispatchEvent(new Event('input')) } - }); - } + }) + }, }) window.message = ['success', 'error', 'warning'].reduce((acc, type) => { acc[type] = (message) => { if (typeof message === 'string') { - showMessage({ type, message }); + showMessage({ type, message }) } else if (typeof message === 'object') { - showMessage({ type, ...message }); + showMessage({ type, ...message }) } - }; - return acc; - }, {}); + } + return acc + }, {}) return { app, } diff --git a/src/pages/creatGroupChat/index.vue b/src/pages/creatGroupChat/index.vue index 15c9ef1..1019d12 100644 --- a/src/pages/creatGroupChat/index.vue +++ b/src/pages/creatGroupChat/index.vue @@ -1,18 +1,13 @@