save
This commit is contained in:
67
index.html
67
index.html
@@ -1,48 +1,33 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8"/>
|
||||
<link rel="icon" type="image/svg+xml" href="/logo.jpg"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Typing Word</title>
|
||||
<script>
|
||||
function s() {
|
||||
function rem() {
|
||||
let html = document.documentElement;
|
||||
let max = parseInt('2048rem');
|
||||
let min = parseInt('2048rem');
|
||||
let width;
|
||||
if (window.innerWidth < min) {
|
||||
width = min;
|
||||
} else {
|
||||
width = window.innerWidth;
|
||||
}
|
||||
// console.log('width', width)
|
||||
html.style.fontSize = width / max + 'px';
|
||||
}
|
||||
|
||||
rem();
|
||||
window.addEventListener('resize', rem);
|
||||
<meta charset="UTF-8"/>
|
||||
<link rel="icon" type="image/svg+xml" href="/logo.jpg"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Typing Word</title>
|
||||
<script>
|
||||
;(function () {
|
||||
var src = '//cdn.jsdelivr.net/npm/eruda';
|
||||
if (!/eruda=true/.test(window.location) && localStorage.getItem('active-eruda') != 'true') return;
|
||||
document.write('<scr' + 'ipt src="' + src + '"></scr' + 'ipt>');
|
||||
document.write('<scr' + 'ipt>eruda.init();</scr' + 'ipt>');
|
||||
})();
|
||||
</script>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
if (location.href.includes('netlify.app')) {
|
||||
hm.src = "https://hm.baidu.com/hm.js?d77525f1ad23698a2f34f54ff69c7750";
|
||||
} else if (location.href.includes('github.io')) {
|
||||
hm.src = "https://hm.baidu.com/hm.js?d77525f1ad23698a2f34f54ff69c7750";
|
||||
} else {
|
||||
hm.src = "https://hm.baidu.com/hm.js?c558fd8cc39d4cc233a9db44ff5b6e3f";
|
||||
}
|
||||
</script>
|
||||
<script>
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement("script");
|
||||
if (location.href.includes('netlify.app')) {
|
||||
hm.src = "https://hm.baidu.com/hm.js?d77525f1ad23698a2f34f54ff69c7750";
|
||||
} else if (location.href.includes('github.io')) {
|
||||
hm.src = "https://hm.baidu.com/hm.js?d77525f1ad23698a2f34f54ff69c7750";
|
||||
} else {
|
||||
hm.src = "https://hm.baidu.com/hm.js?c558fd8cc39d4cc233a9db44ff5b6e3f";
|
||||
}
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
"compromise": "^14.10.0",
|
||||
"copy-to-clipboard": "^3.3.3",
|
||||
"element-plus": "^2.3.9",
|
||||
"eruda": "^3.0.1",
|
||||
"file-saver": "^2.0.5",
|
||||
"git-last-commit": "^1.0.1",
|
||||
"hover.css": "^2.3.2",
|
||||
@@ -46,10 +45,9 @@
|
||||
"@iconify/vue": "^4.1.1",
|
||||
"@types/file-saver": "^2.0.5",
|
||||
"@types/lodash-es": "^4.17.9",
|
||||
"@types/uuid": "^9.0.4",
|
||||
"@unocss/postcss": "^0.60.2",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vitejs/plugin-vue-jsx": "^3.0.1",
|
||||
"@vue-macros/reactivity-transform": "^0.4.5",
|
||||
"@vue/compiler-sfc": "^3.3.4",
|
||||
"commitizen": "^4.3.0",
|
||||
"cz-conventional-changelog": "^3.3.0",
|
||||
@@ -61,6 +59,7 @@
|
||||
"sass": "^1.64.2",
|
||||
"tslib": "^2.6.2",
|
||||
"typescript": "^5.2.0",
|
||||
"@unocss/postcss": "^0.60.2",
|
||||
"unocss": "^0.60.2",
|
||||
"unplugin-auto-import": "^0.16.6",
|
||||
"unplugin-vue-components": "^0.25.2",
|
||||
|
||||
9572
pnpm-lock.yaml
generated
9572
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import {onMounted, watch} from "vue";
|
||||
import {BaseState, useBaseStore} from "@/stores/base.ts";
|
||||
import {useRuntimeStore} from "@/stores/runtime.ts";
|
||||
@@ -16,9 +15,6 @@ import {isMobile, shakeCommonDict} from "@/utils";
|
||||
import router, {routes} from "@/router.ts";
|
||||
|
||||
import {useRoute} from "vue-router";
|
||||
import * as eruda from "eruda";
|
||||
|
||||
eruda.init()
|
||||
const store = useBaseStore()
|
||||
const runtimeStore = useRuntimeStore()
|
||||
const settingStore = useSettingStore()
|
||||
|
||||
@@ -53,7 +53,31 @@ export default {
|
||||
this.$emit('confirm')
|
||||
}
|
||||
},
|
||||
|
||||
render() {
|
||||
let Vnode = this.$slots.default()[0]
|
||||
return (
|
||||
<div class="pop-confirm">
|
||||
<Teleport to="body">
|
||||
<Transition>
|
||||
{
|
||||
this.show && (
|
||||
<div ref="tip" className="pop-confirm-content">
|
||||
<div className="text">
|
||||
{this.title}
|
||||
</div>
|
||||
<div className="options">
|
||||
<div onClick={() => this.show = false}>取消</div>
|
||||
<div className="main" onClick={() => this.confirm()}>确认</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</Transition>
|
||||
</Teleport>
|
||||
<Vnode onClick={(e) => this.showPop(e)}/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<script lang="tsx">
|
||||
<script lang="jsx">
|
||||
import {nextTick, Teleport, Transition} from "vue";
|
||||
|
||||
export default {
|
||||
@@ -45,12 +45,25 @@ export default {
|
||||
},
|
||||
},
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
123
|
||||
|
||||
</div>
|
||||
)
|
||||
let Vnode = this.$slots.default()[0]
|
||||
return <>
|
||||
{
|
||||
this.show && this.title && (
|
||||
<Teleport to="body">
|
||||
<Transition name="fade">
|
||||
<div ref="tip" className="tip">
|
||||
{this.title}
|
||||
</div>
|
||||
</Transition>
|
||||
</Teleport>
|
||||
)
|
||||
}
|
||||
<Vnode
|
||||
onClick={() => this.show = false}
|
||||
onmouseenter={(e) => this.showPop(e)}
|
||||
onmouseleave={() => this.show = false}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import {useBaseStore} from "@/stores/base.ts"
|
||||
import {onMounted} from "vue"
|
||||
import {chunk} from "lodash-es";
|
||||
import {$computed, $ref} from "vue/macros";
|
||||
import BaseButton from "@/components/BaseButton.vue";
|
||||
import {Icon} from '@iconify/vue';
|
||||
import "vue-activity-calendar/style.css";
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
import {Dict, DictType} from "@/types.ts";
|
||||
import {Icon} from "@iconify/vue";
|
||||
import {$computed} from "vue/macros";
|
||||
import BaseIcon from "@/components/BaseIcon.vue";
|
||||
|
||||
const props = defineProps<{
|
||||
|
||||
@@ -13,7 +13,6 @@ import TranslateSetting from "@/pages/pc/components/toolbar/TranslateSetting.vue
|
||||
import {useSettingStore} from "@/stores/setting.ts";
|
||||
import {usePracticeStore} from "@/stores/practice.ts";
|
||||
import {useRuntimeStore} from "@/stores/runtime.ts";
|
||||
import {$ref} from "vue/macros";
|
||||
import {ShortcutKey} from "@/types.ts";
|
||||
import {emitter, EventKey} from "@/utils/eventBus.ts";
|
||||
import BaseIcon from "@/components/BaseIcon.vue";
|
||||
|
||||
@@ -1,19 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
|
||||
import {DictResource,} from "@/types.ts";
|
||||
import {$computed, $ref} from "vue/macros";
|
||||
import {dictionaryResources} from "@/assets/dictionary.ts";
|
||||
import {groupBy} from "lodash-es";
|
||||
import {useBaseStore} from "@/stores/base.ts";
|
||||
import DictList from "@/pages/pc/components/list/DictList.vue";
|
||||
import DictGroup from "@/pages/pc/components/list/DictGroup.vue";
|
||||
import bookFlag from "@/assets/img/flags/book.png";
|
||||
import enFlag from "@/assets/img/flags/en.png";
|
||||
import jaFlag from "@/assets/img/flags/ja.png";
|
||||
import deFlag from "@/assets/img/flags/de.png";
|
||||
import codeFlag from "@/assets/img/flags/code.png";
|
||||
import myFlag from "@/assets/img/flags/my.png";
|
||||
import {Icon} from "@iconify/vue";
|
||||
import BaseIcon from "@/components/BaseIcon.vue";
|
||||
import {useRouter} from "vue-router";
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@ const router = useRouter()
|
||||
<div class="top">
|
||||
<Logo/>
|
||||
<div class="row" @click="router.push('/home')">
|
||||
<Icon icon="material-symbols-light:dictionary-outline-sharp"/>
|
||||
<!-- <Icon icon="streamline:dictionary-language-book"/>-->
|
||||
<Icon icon="iconoir:home" />
|
||||
<span>主页</span>
|
||||
</div>
|
||||
<div class="row" @click="router.push('/word')">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {computed, nextTick, onMounted, onUnmounted, watch} from "vue"
|
||||
import {$ref} from "vue/macros";
|
||||
import {Article, ArticleWord, DefaultArticle, ShortcutKey, Word} from "@/types.ts";
|
||||
import {useBaseStore} from "@/stores/base.ts";
|
||||
import {usePracticeStore} from "@/stores/practice.ts";
|
||||
|
||||
@@ -9,6 +9,7 @@ import Components from 'unplugin-vue-components/vite'
|
||||
import {getLastCommit} from "git-last-commit";
|
||||
import DefineOptions from 'unplugin-vue-define-options/vite' // 引入插件
|
||||
import UnoCSS from 'unocss/vite'
|
||||
import ReactivityTransform from '@vue-macros/reactivity-transform/vite'
|
||||
|
||||
function pathResolve(dir: string) {
|
||||
return resolve(__dirname, ".", dir)
|
||||
@@ -24,11 +25,10 @@ export default defineConfig(async () => {
|
||||
})
|
||||
return {
|
||||
plugins: [
|
||||
Vue({
|
||||
reactivityTransform: true
|
||||
}),
|
||||
Vue(),
|
||||
VueJsx(),
|
||||
UnoCSS(),
|
||||
ReactivityTransform(),
|
||||
AutoImport({
|
||||
resolvers: [ElementPlusResolver()],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user