diff --git a/src/assets/image/avatar.png b/src/assets/image/avatar.png new file mode 100644 index 0000000..30a870a Binary files /dev/null and b/src/assets/image/avatar.png differ diff --git a/src/assets/image/avator.png b/src/assets/image/avator.png deleted file mode 100644 index 7d1e905..0000000 Binary files a/src/assets/image/avator.png and /dev/null differ diff --git a/src/assets/image/cro-avatar.jpg b/src/assets/image/cro-avatar.jpg new file mode 100644 index 0000000..2798c7e Binary files /dev/null and b/src/assets/image/cro-avatar.jpg differ diff --git a/src/assets/image/cro.jpg b/src/assets/image/cro.jpg deleted file mode 100644 index 29f7614..0000000 Binary files a/src/assets/image/cro.jpg and /dev/null differ diff --git a/src/assets/image/im1.jpeg b/src/assets/image/im1.jpeg deleted file mode 100644 index ea28337..0000000 Binary files a/src/assets/image/im1.jpeg and /dev/null differ diff --git a/src/components/AvatarCropper/index.vue b/src/components/AvatarCropper/index.vue new file mode 100644 index 0000000..9e55365 --- /dev/null +++ b/src/components/AvatarCropper/index.vue @@ -0,0 +1,86 @@ + + + + + diff --git a/src/components/Theme/components/switchDark.vue b/src/components/Theme/components/switchDark.vue index 33a5fc2..d482b71 100644 --- a/src/components/Theme/components/switchDark.vue +++ b/src/components/Theme/components/switchDark.vue @@ -1,16 +1,26 @@ - changeSwitch(val)" v-model="isDark"/> + diff --git a/src/layout/Header/components/Avatar.vue b/src/layout/Header/components/Avatar.vue new file mode 100644 index 0000000..7370643 --- /dev/null +++ b/src/layout/Header/components/Avatar.vue @@ -0,0 +1,80 @@ + + + + + {{userInfo.username}} + + + + + + + + 修改密码 + + 退出登录 + + + + + + + + + + diff --git a/src/layout/Header/components/Personal.vue b/src/layout/Header/components/PersonalDialog.vue similarity index 99% rename from src/layout/Header/components/Personal.vue rename to src/layout/Header/components/PersonalDialog.vue index 1d19dab..b920e98 100644 --- a/src/layout/Header/components/Personal.vue +++ b/src/layout/Header/components/PersonalDialog.vue @@ -1,5 +1,5 @@ - + - + + + + - - - - - - - - {{ - userInfo.username - }} - - - - - - - - 修改密码 - - 退出登录 - - - + - @@ -67,141 +42,27 @@ import Remind from './components/Remind' import HeaderSearch from './components/HeaderSearch' import CollapseIcon from './components/CollapseIcon' + import Avatar from './components/Avatar' import UMenu from '../Sidebar/components/Menu.vue' import { computed, ref } from 'vue' import { useRouter } from 'vue-router' - import { ElMessageBox, ElMessage } from 'element-plus' import {useSettingStore} from "@/store/modules/setting" - import {useUserStore} from "@/store/modules/user" - import {usePermissionStore} from "@/store/modules/permission" - import {useTagsViewStore} from "@/store/modules/tagsView" const person = ref() const router = useRouter() const SettingStore = useSettingStore() - const UserStore = useUserStore() - const PermissionStore = usePermissionStore() - const TagsViewStore = useTagsViewStore() const isCollapse = computed(() =>!SettingStore.isCollapse) // menu 布局 const mode = computed(() => SettingStore.themeConfig.mode) // 显示 tag const showTag = computed(() =>SettingStore.themeConfig.showTag) - // 用户信息 - const userInfo = computed(() => UserStore.userInfo) - const logOut = async () => { - ElMessageBox.confirm('确定退出登录吗?', '退出登录', { - confirmButtonText: '确定', - cancelButtonText: '取消', - type: 'warning', - }) - .then(async () => { - try { - router.push({ path: '/login' }) - await UserStore.logout() - PermissionStore.clearRoutes() - TagsViewStore.clearVisitedView() - ElMessage({ - type: "success", - message: "退出登录成功!" - }); - } catch (e) {} - }) - .catch(() => {}) - } - - const commandAction = (key: number) => { - switch (key) { - case 1: - logOut() - break - case 2: - person.value.show() - break - } - } const handleCollapse = () => { SettingStore.setCollapse(isCollapse.value) } diff --git a/src/layout/Main/index.vue b/src/layout/Main/index.vue index 3825c7c..8792820 100644 --- a/src/layout/Main/index.vue +++ b/src/layout/Main/index.vue @@ -21,9 +21,9 @@ import {useSettingStore} from "@/store/modules/setting" import {usePermissionStore} from "@/store/modules/permission" const SettingStore = useSettingStore() - const PermissionStor = usePermissionStore() + const PermissionStore = usePermissionStore() - const cacheRoutes = computed(() =>PermissionStor.getCacheRoutes()) + const cacheRoutes = computed(() =>PermissionStore.getCacheRoutes()) const isReload = computed(() => SettingStore.isReload) diff --git a/src/main.ts b/src/main.ts index d1c83e0..dcb03bf 100644 --- a/src/main.ts +++ b/src/main.ts @@ -2,7 +2,7 @@ import { createApp } from 'vue' import App from './App.vue' import router from './router' import pinia from "./store"; -import 'default-passive-events' +// import 'default-passive-events' // 权限路由 import './permission' diff --git a/src/router/index.ts b/src/router/index.ts index e37589d..07ae65c 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -16,6 +16,7 @@ import chatRouter from './modules/chat' import othersRouter from './modules/other' import externalLink from './modules/externalLink' import formRouter from './modules/from' +import iframeRouter from './modules/iframe' // 异步组件 export const asyncRoutes = [ @@ -30,6 +31,7 @@ export const asyncRoutes = [ ...errorRouter, ...externalLink, ...systemRouter, + ...iframeRouter, { path: '/:pathMatch(.*)', redirect: '/404' diff --git a/src/router/modules/iframe.ts b/src/router/modules/iframe.ts new file mode 100644 index 0000000..4c98485 --- /dev/null +++ b/src/router/modules/iframe.ts @@ -0,0 +1,24 @@ +/** When your routing table is too long, you can split it into small modules**/ + +import Layout from "@/layout/index.vue"; + +const iframeRouter = [{ + path: '/iframe', + component: Layout, + redirect: '/iframe/embedded', + name: 'iframe', + meta: { + title: '内嵌 iframe', + icon: 'Memo' + }, + children: [ + { + path: 'embedded', + component: () => import('@/views/iframe/embedded/index.vue'), + name: 'embedded', + meta: { title: '内嵌 iframe', icon: 'Postcard' } + }, + ] +}] + +export default iframeRouter diff --git a/src/router/modules/other.ts b/src/router/modules/other.ts index 9521143..6241179 100644 --- a/src/router/modules/other.ts +++ b/src/router/modules/other.ts @@ -94,7 +94,7 @@ const othersRouter = [{ path: 'count', component: () => import('@/views/other/count/index.vue'), name: 'count', - meta: { title: '数字自增长', icon: 'MenuIcon' } + meta: { title: '数字动画', icon: 'MenuIcon' } } ] }] diff --git a/src/views/chat/components/u-chartBox/index.vue b/src/views/chat/components/u-chartBox/index.vue index 0a703de..f668672 100644 --- a/src/views/chat/components/u-chartBox/index.vue +++ b/src/views/chat/components/u-chartBox/index.vue @@ -6,7 +6,7 @@ {{ item.created_at }} 林峰 - + @@ -30,7 +30,7 @@ - + @@ -53,7 +53,7 @@ + diff --git a/src/views/other/cardDrag/data.ts b/src/views/other/cardDrag/data.ts new file mode 100644 index 0000000..ec0ed5f --- /dev/null +++ b/src/views/other/cardDrag/data.ts @@ -0,0 +1,27 @@ +export const iconData = [ + 'management', + 'baseball', + 'Basketball', + 'BellFilled', + 'Bell', + 'AddLocation', + 'Aim', + 'AlarmClock', + 'Apple', + 'ArrowDownBold', + 'Burger', + 'Brush', + 'BrushFilled', + 'RemoveFilled', + 'QuestionFilled', + 'Promotion', + 'Printer', + 'School', + 'Setting', + 'WarningFilled', + 'ZoomOut', + 'WalletFilled', + 'User', + 'ToiletPaper', 'Sunrise', 'Sunny', 'SwitchButton', 'TakeawayBox', 'Ticket', + 'StarFilled', 'Stamp', 'Stopwatch', 'SortDown', 'SemiSelect', 'Search' +] diff --git a/src/views/other/cardDrag/index.scss b/src/views/other/cardDrag/index.scss new file mode 100644 index 0000000..0fd07e9 --- /dev/null +++ b/src/views/other/cardDrag/index.scss @@ -0,0 +1,50 @@ +.m-card-drag{ + height: 100%; + width: 100%; + display: flex; + flex-direction: column; + .header{ + flex-shrink: 0; + } +} +.footer{ + flex: 1; + padding: 10px; + box-sizing: border-box; + overflow: hidden; +} +.card { + display: flex; + flex-wrap: wrap; + justify-content: space-between; + height: 100%; + box-sizing: border-box; + padding: 20px; + overflow-x: hidden; + background-color: var(--el-fill-color-blank); + border: 1px solid var(--el-border-color-light); + border-radius: 4px; + box-shadow: 0 0 12px rgb(0 0 0 / 5%); +} +.item-group-item { + position: relative; + width: calc(100% / 5.3); + margin-bottom: 10px; + flex-direction: column; + display: flex; + align-items: center; + justify-content: center; + min-height: 100px; + cursor: move; + font-weight: 500; + border: 1px solid rgba(0, 0, 0, 0.125); +} +.chosenClass { + opacity: 0.6; + border: 1px solid rgba(64,158,255,0.2); +} +.item-icon{ + width: 100%; + display: flex; + justify-content: center +} diff --git a/src/views/other/cardDrag/index.vue b/src/views/other/cardDrag/index.vue index 817d27e..1c42b02 100644 --- a/src/views/other/cardDrag/index.vue +++ b/src/views/other/cardDrag/index.vue @@ -1,182 +1,67 @@ - - 卡片拖拽排序 - - 还原 - 获取数据 - - - - + + 还原 + 获取数据 + + + - + diff --git a/src/views/other/cropper/components/CustomCropper.vue b/src/views/other/cropper/components/CustomCropper.vue new file mode 100644 index 0000000..527e4fe --- /dev/null +++ b/src/views/other/cropper/components/CustomCropper.vue @@ -0,0 +1,101 @@ + + + + + + 自定义裁剪 + + + + + + + + + 向左旋转 + 向右旋转 + 放大 + 缩小 + 下载图片 + 下载图片 + + + + + + + + + + + + + diff --git a/src/views/other/cropper/components/HeaderAvatar.vue b/src/views/other/cropper/components/HeaderAvatar.vue new file mode 100644 index 0000000..decaba4 --- /dev/null +++ b/src/views/other/cropper/components/HeaderAvatar.vue @@ -0,0 +1,164 @@ + + + + + 头像上传裁剪 + + + + + + + + + + + + + + + + 点击上传图片 + + + + + + + + + + + + + + + + + 取消 + + 确认 + + + + + + + + + + diff --git a/src/views/other/cropper/index.scss b/src/views/other/cropper/index.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/views/other/cropper/index.vue b/src/views/other/cropper/index.vue index 41423a1..6a94509 100644 --- a/src/views/other/cropper/index.vue +++ b/src/views/other/cropper/index.vue @@ -1,207 +1,14 @@ - - - - - - - 放大 - 缩小 - 向左旋转 - 向右旋转 - 清除 - 获取结果 - 下载图片 - - 选择上传图片 - - - - - 实时预览 - - - - - - 获取结果 - - - - - - + + + +