diff --git a/src/assets/icons/Vector.svg b/src/assets/icons/Vector.svg new file mode 100644 index 0000000..e7f5217 --- /dev/null +++ b/src/assets/icons/Vector.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/main.ts b/src/main.ts index c6bd6ba..b43840e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,6 +7,7 @@ import store from './stores/index' import 'normalize.css/normalize.css' import './assets/css/style.css' import SvgIcon from "@/components/SvgIcon/index.vue"; +import "virtual:svg-icons-register"; import flexible from "./utils/flexible.js"; @@ -28,9 +29,9 @@ document.addEventListener('touchend', function(event) { const app = createApp(App) // app.use(ElementPlus) app.use(router) -app.use(store) -app.component("SvgIcon", SvgIcon) +.use(store) +.component("SvgIcon", SvgIcon) +.mount('#app') flexible(); -app.mount('#app') diff --git a/src/router/index.ts b/src/router/index.ts index 84eee13..f4c5bc0 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -17,6 +17,12 @@ const router = createRouter({ // name: 'activitiesWorkshop', // redirect: "/activities/workshop", // }, + + { + path: '/workshop/selectStyle', + name: 'SelectStyle', + component: () => import('../views/Workshop/selectStyle.vue'), + }, ] diff --git a/src/utils/flexible.js b/src/utils/flexible.js index f32a059..4594585 100644 --- a/src/utils/flexible.js +++ b/src/utils/flexible.js @@ -2,7 +2,7 @@ import { getUniversalZoomLevel } from '@/utils/tools' let flexible = (designWidth, maxWidth,minWidth) =>{ var doc = document, win = window, docEl = doc.documentElement, remStyle = document.createElement("style"), tid; - designWidth = designWidth || 1920; + designWidth = designWidth || 1080; // maxWidth = maxWidth || 1920; // minWidth = minWidth || 500; // minWidth = minWidth || 1024; @@ -13,11 +13,12 @@ let flexible = (designWidth, maxWidth,minWidth) =>{ height = getUniversalZoomLevel() * height // width > maxWidth && (width = maxWidth); // width < minWidth && (width = minWidth); - if(width >= 1024){ - designWidth = 1920 - }else{ - designWidth = 375 - } + + // if(width >= 1024){ + // designWidth = 1920 + // }else{ + // designWidth = 375 + // } var rem = Math.round(width * 10 / designWidth); docEl.style.fontSize = rem+'px' remStyle.innerHTML = 'html{font-size:' + rem + 'px;}'; diff --git a/src/views/Workshop/selectStyle.vue b/src/views/Workshop/selectStyle.vue index 22c5bfd..6cdafed 100644 --- a/src/views/Workshop/selectStyle.vue +++ b/src/views/Workshop/selectStyle.vue @@ -16,6 +16,7 @@ const {} = toRefs(data);