Skip to content

Commit

Permalink
feat: 升级依赖和修复简繁转换反的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
dxhuii committed Apr 27, 2024
1 parent 175e4c0 commit dabc50a
Show file tree
Hide file tree
Showing 5 changed files with 1,470 additions and 1,511 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "module",
"version": "0.0.0",
"private": true,
"packageManager": "pnpm@9.0.4",
"packageManager": "pnpm@9.0.6",
"engines": {
"node": "20.12.2"
},
Expand All @@ -23,21 +23,21 @@
"chinese-simple2traditional": "^2.1.0"
},
"devDependencies": {
"@antfu/eslint-config": "2.14.0",
"@dxhuii/eslint-config": "^2.1.0",
"@antfu/eslint-config": "2.16.0",
"@dxhuii/eslint-config": "^2.1.3",
"@iconify-json/carbon": "^1.1.31",
"@iconify-json/twemoji": "^1.1.15",
"@nuxtjs/color-mode": "^3.4.0",
"@nuxtjs/color-mode": "^3.4.1",
"@pinia/nuxt": "^0.5.1",
"@unocss/eslint-config": "^0.59.2",
"@unocss/nuxt": "^0.59.3",
"@unocss/eslint-config": "^0.59.4",
"@unocss/nuxt": "^0.59.4",
"@vite-pwa/nuxt": "^0.6.0",
"@vueuse/nuxt": "^10.9.0",
"bumpp": "^9.4.0",
"eslint": "^9.0.0",
"eslint": "^9.1.1",
"nuxt": "^3.11.2",
"pinia": "^2.1.7",
"typescript": "^5.4.5",
"vue-tsc": "^2.0.13"
"vue-tsc": "^2.0.14"
}
}
4 changes: 2 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const list = [{
<div>
<div flex="~ col" items-center>
<h1 text="2xl">
内容清单 <sup text="base" bg-card border-base top--3 border rounded px1 text-3 tracking-0.5 style="">CMS.IM</sup>
内容清单 <sup text="base" bg-card top--3 border border-base rounded px1 text-3 tracking-0.5 style="">CMS.IM</sup>
</h1>
<div mt-4 text="base gray-500">
收集一些有用的内容
Expand All @@ -100,7 +100,7 @@ const list = [{
</div>
</div>
<div ml-4 text-4xl op-75>
<img v-if="item.icon.includes('https')" w10 h10 :src="item.icon" :alt="item.title">
<img v-if="item.icon.includes('https')" h10 w10 :src="item.icon" :alt="item.title">
<div v-else :class="item.icon" />
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions pages/rgb2hex.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function hex2rgb() {
<input v-model="r2h.r" type="number" w-20 border border-base px2>
<input v-model="r2h.g" type="number" w-20 border border-base px2>
<input v-model="r2h.b" type="number" w-20 border border-base px2>
<button flex items-center justify-center rounded-full btn-primary @click="rgb2hex">
<button btn-primary flex items-center justify-center rounded-full @click="rgb2hex">
转换
</button>
</div>
Expand All @@ -46,7 +46,7 @@ function hex2rgb() {
</h1>
<div flex="~ gap4" mt4>
<input v-model="h" type="text" border border-base px2>
<button flex items-center justify-center rounded-full btn-primary @click="hex2rgb">
<button btn-primary flex items-center justify-center rounded-full @click="hex2rgb">
转换
</button>
</div>
Expand Down
14 changes: 7 additions & 7 deletions pages/simple2traditional.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function toggleEnhance() {
function convert() {
const text = input.value
const begin = performance.now()
const result = type.value === 's2t' ? toTraditional(text, isEnhance.value) : toSimplified(text, isEnhance.value)
const result = type.value === 't2s' ? toTraditional(text, isEnhance.value) : toSimplified(text, isEnhance.value)
output.value = result.replace(/\n/g, '<br>')
Expand All @@ -43,14 +43,14 @@ async function paste() {
</script>

<template>
<main w-full max-w-7xl mt16 mx-auto flex="~ col" justify-center items-center>
<h1 text-4xl mb16 font-bold>
<main flex="~ col" mx-auto mt16 max-w-7xl w-full items-center justify-center>
<h1 mb16 text-4xl font-bold>
在线繁体字转换工具
</h1>
<header flex gap12 items-center text-base>
<header flex items-center gap12 text-base>
<p flex items-center gap4 class="langs" :class="{ reverse: type === 's2t' }">
<span>简体</span>
<button id="toggle" type="button" border-none outline-0 bg-transparent text-5xl h12 flex items-center text-gray-900 dark:text-gray-200 cursor-pointer @click="toggleType">
<button id="toggle" type="button" h12 flex cursor-pointer items-center border-none bg-transparent text-5xl text-gray-900 outline-0 dark:text-gray-200 @click="toggleType">
<svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 24 24">
<path fill="currentColor" d="M16.5 17.5h-9a5.5 5.5 0 1 1 0-11h9a5.5 5.5 0 1 1 0 11" opacity="0.5" />
<circle cx="7.5" cy="12" r="2.5" fill="currentColor" />
Expand All @@ -73,11 +73,11 @@ async function paste() {
清空
</button>
</header>
<div class="box border-[#e6eeff] border-2 border-solid" w-full flex rounded-lg of-hidden relative>
<div class="box border-2 border-[#e6eeff] border-solid" relative w-full flex of-hidden rounded-lg>
<textarea id="input" ref="textarea" v-model="input" resize-none dark:text-black @input="convert" />
<p id="output" dark:text-black v-html="output" />
</div>
<p text-sm pt4 pl3 pb16>
<p pb16 pl3 pt4 text-sm>
共 {{ input?.length || 0 }} 字,耗时 {{ time }}ms
</p>
</main>
Expand Down
Loading

0 comments on commit dabc50a

Please sign in to comment.