master
yutent 2022-03-15 20:00:33 +08:00
parent f8341c0a08
commit fccaf23d94
11 changed files with 52158 additions and 34 deletions

1
.gitignore vendored
View File

@ -4,6 +4,7 @@ package-lock.json
._* ._*
test.js
.Spotlight-V100 .Spotlight-V100
.Trashes .Trashes
.DS_Store .DS_Store

View File

@ -32,6 +32,14 @@
<h2>更新日志</h2> <h2>更新日志</h2>
<dl class="logs"> <dl class="logs">
<dt class="version">v0.2.0 - 2022.03.15</dt>
<dd>
<ol>
<li>增加以下单字【䗪、㳇、㕮、㬊、㿠、䝙、㠇、㮾、㫰、㛹、㧑、㙦、䓨、㳚、䏲、䗖、䃅、㙍、䏡、䓛、䃎、䓬、㽏、䢼、㸌、㛃、㬚、㵐、䢺、䓫、䌹、䐃、㸆、㥄、䂮、㰀、㠓、㭕、䎃、䒤、㴔、㟃、䗴、㻬、䣘、㛚、㳘、㬎、䗛、㑊、㺄、㶲、㙘、䎖、㩼、㹴、䜰、䜮、鿏】</li>
<li>增加以下异型字【𠮷、𠙶、𨭉、𨚕、𠳐、𥕢、𤧛、𣗋、𨱏、𦭜、𨙸、𣸣、𦙶、𨐈、𤩽、𨱑、𨟠、𩾌、𡐓、𦝼、𧿹、𩾃、𨺙、𦰡、𡎚、𨱇、𦈡、𦒍、𣲘、𥻗、𣲗、𤫉、𥔲、𩽾、𠅤、𤞤、𨱔、𥖨、𫍣、𬶍、𫍣、𫘦、𫘜、𬭩、𫇭、𬭬】</li>
</ol>
</dd>
<dt class="version">v0.1.0 - 2022.03.10</dt> <dt class="version">v0.1.0 - 2022.03.10</dt>
<dd> <dd>
<ol> <ol>

View File

@ -1 +1 @@
body{line-height:1.5;font-size:14px;color:var(--color-dark-1)}a{color:inherit;text-decoration:none}wc-switch{cursor:pointer}.app{width:100%;height:100vh}.flex{display:flex}.flex.column{flex-direction:column}.flex.ac{justify-content:center}.flex.alc{align-items:center}.flex.acc{justify-content:center;align-items:center}.flex.asc{justify-content:space-between;align-items:center}.wrapper{width:1024px}.topbar{width:100%;height:64px;background:#fff;box-shadow:0 6px 12px rgba(0,0,0,.05)}.topbar .logo{font-size:24px;color:var(--color-red-1)}.topbar .logo span{font-size:14px}.topbar .navs{font-size:16px}.topbar .navs .nav{margin-left:32px;cursor:pointer;transition:color .2s linear}.topbar .navs .nav.active,.topbar .navs .nav:hover{text-decoration:underline;color:var(--color-red-1)}.footer{width:100%;height:64px;border-top:1px solid var(--color-plain-2)}.main{flex:1}.main .wrapper{height:100%}.main .table-info{width:100%;height:64px}.main .table-info i{color:var(--color-red-1)}.main .table-info .download{margin-left:32px}.main .search{width:100%}.main .search .field{margin-top:16px}.main .search .field.result{line-height:2;font-family:Menlo;word-wrap:break-word;white-space:pre-wrap}.main .search .field wc-input{flex:1}.main .panel{margin-top:32px}.main .panel .custom-file{position:relative;width:160px}.main .panel .custom-file input{position:absolute;width:100%;height:100%;opacity:0}.main .panel .tips{color:var(--color-orange-3)}.main .panel .preview{margin-top:16px;font-family:Menlo;word-wrap:break-word;white-space:pre-wrap}.main .about{padding:32px 16px}.main .about h2{font-size:24px}.main .about .logs .version{margin-top:32px;line-height:2;font-weight:bold;font-size:18px}.main .about .logs dd{color:var(--color-grey-3)}.main .about .logs ol{padding-left:2em;list-style:decimal}.download-layer{width:640px;padding-bottom:64px;background:#fff}.download-layer .field{margin-top:16px;padding:0 16px}.download-layer .field .label{min-width:120px;padding-right:16px;line-height:32px;text-align:right;font-weight:bold;color:var(--color-grey-3)}.download-layer .field .label::after{content:" : "}.download-layer .field .tips{margin-left:16px;line-height:32px;color:var(--color-orange-3)}.download-layer .field.ctrol{padding:0 128px;margin-top:64px}@media screen and (max-width: 1024px){.topbar,.main{padding:0 16px}.footer .wrapper{flex-direction:column;align-items:center;justify-content:center}} body{line-height:1.5;font-size:14px;color:var(--color-dark-1)}a{color:inherit;text-decoration:none}wc-switch{cursor:pointer}.app{width:100%;height:100vh}.flex{display:flex}.flex.column{flex-direction:column}.flex.ac{justify-content:center}.flex.alc{align-items:center}.flex.acc{justify-content:center;align-items:center}.flex.asc{justify-content:space-between;align-items:center}.wrapper{width:1024px}.topbar{width:100%;height:64px;background:#fff;box-shadow:0 6px 12px rgba(0,0,0,.05)}.topbar .logo{font-size:24px;color:var(--color-red-1)}.topbar .logo span{font-size:14px}.topbar .navs{font-size:16px}.topbar .navs .nav{margin-left:32px;cursor:pointer;transition:color .2s linear}.topbar .navs .nav.active,.topbar .navs .nav:hover{text-decoration:underline;color:var(--color-red-1)}.footer{width:100%;height:64px;border-top:1px solid var(--color-plain-2)}.main{overflow:hidden;flex:1}.main .wrapper{height:100%}.main .table-info{width:100%;height:64px}.main .table-info i{color:var(--color-red-1)}.main .table-info .download{margin-left:32px}.main .search{width:100%}.main .search .field{margin-top:16px}.main .search .field.result{line-height:2;font-family:Menlo;word-wrap:break-word;white-space:pre-wrap}.main .search .field wc-input{flex:1}.main .panel{overflow:hidden;flex:1;margin-top:32px}.main .panel .custom-file{position:relative;width:160px}.main .panel .custom-file input{position:absolute;width:100%;height:100%;opacity:0}.main .panel .tips{color:var(--color-orange-3)}.main .panel .scroll-view{overflow:hidden;flex:1}.main .panel .preview{margin-top:16px;font-family:Menlo;word-break:keep-all;white-space:pre-wrap}.main .about{padding:32px 16px}.main .about h2{font-size:24px}.main .about .logs .version{margin-top:32px;line-height:2;font-weight:bold;font-size:18px}.main .about .logs dd{color:var(--color-grey-3)}.main .about .logs ol{padding-left:2em;list-style:decimal}.download-layer{width:640px;padding-bottom:64px;background:#fff}.download-layer .field{margin-top:16px;padding:0 16px}.download-layer .field .label{min-width:120px;padding-right:16px;line-height:32px;text-align:right;font-weight:bold;color:var(--color-grey-3)}.download-layer .field .label::after{content:" : "}.download-layer .field .tips{margin-left:16px;line-height:32px;color:var(--color-orange-3)}.download-layer .field.ctrol{padding:0 128px;margin-top:64px}@media screen and (max-width: 1024px){.topbar,.main{padding:0 16px}.wrapper{width:100%}.footer .wrapper{flex-direction:column;align-items:center;justify-content:center}}

View File

@ -1,6 +1,7 @@
@import './common.scss'; @import './common.scss';
.main { .main {
overflow: hidden;
flex: 1; flex: 1;
.wrapper { .wrapper {
@ -40,7 +41,10 @@
} }
.panel { .panel {
overflow: hidden;
flex: 1;
margin-top: 32px; margin-top: 32px;
.custom-file { .custom-file {
position: relative; position: relative;
width: 160px; width: 160px;
@ -57,10 +61,15 @@
color: var(--color-orange-3); color: var(--color-orange-3);
} }
.scroll-view {
overflow: hidden;
flex: 1;
}
.preview { .preview {
margin-top: 16px; margin-top: 16px;
font-family: Menlo; font-family: Menlo;
word-wrap: break-word; word-break: keep-all;
white-space: pre-wrap; white-space: pre-wrap;
} }
} }
@ -134,6 +143,10 @@
padding: 0 16px; padding: 0 16px;
} }
.wrapper {
width: 100%;
}
.footer { .footer {
.wrapper { .wrapper {
flex-direction: column; flex-direction: column;

View File

@ -1,5 +1,6 @@
𠂆 rtt 𠂆 rtt
𠂇 dgt 𠂇 dgt
𠂉 ttg
𠂒 tfd 𠂒 tfd
𠃌 nnll 𠃌 nnll
𠏈 wqbm 𠏈 wqbm
@ -8,3 +9,205 @@
𢦏 fae 𢦏 fae
𤇾 oopb 𤇾 oopb
𦍌 ugf 𦍌 ugf
𠮷 fkf
𠙶 bbk
𨭉 ygaq
𨚕 cabh
𠳐 kdtb
𥕢 dgmj
𤧛 guph
𣗋 sipq
𨱏 qawk
𦭜 akwu
𨙸 fcbh
𣸣 ifam
𦙶 edg
𨐈 liqn
𤩽 gfmd
𨱑 qamw
𨟠 hhwb
𩾌 qgyi
𡐓 fyvi
𦝼 eovg
𧿹 khxu
𩾃 qgqq
𨺙 bvqn
𦰡 avfb
𡎚 fyna
𨱇 qfiy
𦈡 xfdj
𦒍 ujfn
𣲘 ifqn
𥻗 osjg
𣲗 ifnh
𤫉 goyc
𥔲 dkkn
𩽾 qgpv
𠅤 ylnu
𤞤 qtgd
𨱔 qusf
𥖨 dkks
𫍣 ymgk
𬶍 qgpx
𫍣 ymgk
𫘦 cqrm
𫘜 cyy
𬭩 qwcn
𫇭 ayly
𬭬 qdhv
𬷕 gehg
𬭛 qihc
𫚖 hxqg
𫶇 mgkh
𬘘 xpqn
𫢸 wujf
𬊤 oujf
𬭊 qsfg
𬱖 madm
𬤊 yjgh
𬍡 iney
𫟼 qdpi
𬟽 jaiy
𪨶 mdlj
𫮃 fujf
𬬸 qsyy
𫚕 qgjh
𬳽 ctfq
𬬹 qjhh
𫔍 qtol
𬸪 tolg
𫓧 qfwy
𫖯 iqdm
𫄨 xqdh
𬃊 srfm
𬸦 yttg
𮝷 lfam
𬬿 qvkg
𬶐 qgiq
𬕂 tamu
𬮿 bmnn
𬇹 ilgy
𬒔 dheg
𬤝 ygjn
𬭤 qwnd
𬌗 ahtk
𬴃 cdhd
𬣳 yvei
𬘫 xpfq
𬭶 qlfo
𫟹 qawy
𬭎 qpdc
𬬱 qrh
𫘝 cnwy
𫐄 lgqn
𫄷 xujn
𫖮 mndm
𬟁 agkg
𬬩 qay
𬺈 hwbk
𫘪 cdri
𭎂 fww
𫓯 qffg
𫓹 qadw
𫌀 pygm
𬶭 qgwi
𪟝 gmln
𬶋 qgqk
𬣡 ygt
𬘭 xssy
𬬮 qtay
𬂩 sguw
𫓶 qkeg
𫖳 vtkm
𬭚 qybg
𬳶 cmkg
𫠆 fcdm
𫸩 xaqy
𫛭 qtgg
𬴊 coqh
𬭸 qoqh
𪤗 fnwe
𬺓 hwbh
𬯀 byj
𪣻 fovy
𬒗 djtm
𫵷 mdln
𫘧 cviy
𬬻 qhnt
𬍛 gqiy
𬶠 qggi
𬶟 qggj
𬬭 qwxn
𫭢 fwxn
𫟅 xyiy
𬜯 agmw
𫭼 fapl
𬇕 idnn
𬜬 aukf
𫐐 lvqn
𬇙 imy
𬪩 sgpe
𬞟 ahim
𬳵 cgig
𬘬 xgeg
𬣞 ypgg
𬨂 lqan
𪨰 mmag
𬘯 xybg
𪨊 nwwi
𬣙 ygfh
𫄧 xthp
𪾢 hmq
𫍯 ydgt
𬀪 jmqn
𫰛 vcag
𫠊 cyx
𬘓 xkh
𬍤 gvfy
𬊈 ovfy
𬩽 vfbh
𬘡 xldy
𬨎 lusg
𬙂 xpgw
𫗧 qngi
𬯎 bkhm
𬘩 xtfp
𡘙 dddu
𬳿 cwty
𫘨 cjgh
𬀩 jfnh
𬒈 ipdf
𬶏 qgqb
𬱟 qdbm
𬹼 hwbj
𬉼 oaqy
𫭟 faqy
𬙊 xlff
𫞩 gagw
𫑡 kjnb
𫔶 uths
𫠜 hwbq
𬭯 qumt
𫷷 yqqw
𫍲 yvhc
𫫇 kgon
𫘬 cexd
𬭳 qfkk
𬶮 qgfk
𬤇 ysfg
𫍽 ylge
𫄸 xtgo
𬙋 xyke
𬮱 usfd
𪩘 mfmd
𬸘 ajvg
𬸚 qtyg
𫔎 qcbk
𬭁 qxgu
𫐓 lcbs
𫗴 qnyg
𬶨 vcag
𫚭 qgvn
𬭼 quep
𫟦 luep
𬸣 pfjg

181
data/emoji.txt Normal file
View File

@ -0,0 +1,181 @@
🙂 tmtt
🙃 tmtt
😆 ddtt
😂 ttkk
🤣 ttkk
🥰 ep
🤩 kffg
🥶 dndn
🤗 raew
👍 sdsd
😭 ddkk
🥳 ydpy
😎 tdgk
😉 ryhv
😊 skep
😏 klkl
😝 kftd
😛 kftd
😋 vbkt
😚 usus
😘 epwq
😗 usus
😤 tgrn
😳 ks
😡 tgrn
🤬 kkww
🤫 khag
🤔 lnft
😓 ifh
🤮 tgug
🤒 ntoa
🤧 dgjh
👽 qjww
🤐 ufkh
🥱 lsbn
😴 htip
😪 htud
💀 meme
💩 wgwg
👻 rqc
😈 ahgo
✌🏻 bbh
🤦🏻‍♂️ kdb
🙏🏻 pypy
⭐ jtjt
📈 ixt
🐶 qtqk
🐱 qtal
🐭 vnu
🐠 qgf
🐯 ftha
🦖 amdx
🐞 jsjh
🐙 ujqg
🐔 wccq
🦃 oocq
🐑 xrud
🐬 itee
🐘 ddqj
🦎 nkha
🦌 ynj
🐵 qtbb
🐺 qty
🦉 quyw
🐳 qgqg
🐛 ttjh
🐜 jcjy
🦇 jyjg
🦕 amdx
🦒 tcyn
🕸 jjmq
🦜 mmga
🐤 ihcq
🐡 isee
🦞 dxjg
🦘 wavn
🦙 udcp
🐪 ctcp
🦐 jghy
🐊 qgqg
🐲 dxn
🦓 gycn
🦏 iscn
🦑 qnma
🦂 jjbb
🦛 iscn
🐏 xrud
🦈 iiqg
🦭 itee
🐉 dxn
🦬 rhk
🦫 vnu
🦩 mspt
🦧 qtqt
🐆 eeqy
🦚 bniw
🐻‍❄️ ceqt
🦢 trng
🐋 qgqg
🦦 scng
🐈‍⬛ qtal
🐚 itjl
🏇🏻 pfnc
🐢 qnqj
🦆 lqbb
🕊 wgbb
🦍 qtqt
🐐 mmud
🦄 qqul
🦋 jdja
🐄 verh
🐮 rhk
🐕‍🦺 nydg
🦮 qtqk
🐕 qtqk
🐹 wbvn
🐽 qtfj
🐷 qtfj
🙈 ufhv
🦔 gmqt
🍏 agjs
🍎 agjs
🍐 tjs
🍊 swbb
🍋 spsa
🍌 tjaw
🍇 aqaq
🍓 ajat
🫐 ajat
🍈 kprc
🍒 smsi
🍑 sibb
🥭 ayjs
🍍 aial
🥥 sbbb
🥝 qqsi
🍆 albb
🥑 rijs
🥦 suaw
🥬 imae
🥒 amrc
🌶 ugsh
🫑 aesu
🌽 gyoy
🥕 dahh
🧄 afi
🧅 iuaq
🥔 ffgk
🍠 xaal
🥚 cqnh
🍗 cqev
🍭 ssoy
🥢 tnbb
🍺 kris
🍻 kris
🥂 kjis
🥮 eeqn
⚽️ khgf
🏀 tjgf
🏈 ssgf
⚾️ sdgf
🥎 sdgf
🎾 mqgf
🏐 rdgf
🏉 ssgf
🥏 nute
🎱 ckgf
🏓 rrgf
🏸 ntgf
⛳️ yqfw
🪁 mqtq
🤿 ifii
⛷ imfv
🎿 imfv
🏂 imsr
🥌 uifp
⛸ imui
🛹 imsr
🥊 udfm
🥋 kuut
🎮 iyca

51645
data/extra.txt Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1545,7 +1545,6 @@
吇 kbg 吇 kbg
合 wgk wgkf 合 wgk wgkf
吉 fk fkf 吉 fk fkf
𠮷 fk fkf
吊 kmh kmhj 吊 kmh kmhj
吋 kfy 吋 kfy
同 m mg mgk mgkd 同 m mg mgk mgkd
@ -20903,9 +20902,6 @@
龤 wgkr 龤 wgkr
龥 wgkm 龥 wgkm
⺁ rtt ⺁ rtt
𠂇 dgt
𠂉 ttg
𠃌 nnll
⺄ nnll ⺄ nnll
㑳 wqbt 㑳 wqbt
㑇 wqvg 㑇 wqvg
@ -20930,7 +20926,6 @@
㱮 gqkm 㱮 gqkm
㳠 idpy 㳠 idpy
⺧ tfd ⺧ tfd
𡗗 dwi
龸 ipb 龸 ipb
⺪ nhd ⺪ nhd
䁖 hovg 䁖 hovg
@ -20940,7 +20935,6 @@
⺳ pqb ⺳ pqb
⺶ udr ⺶ udr
⺷ ugf ⺷ ugf
𢦏 fae
䎱 dilx 䎱 dilx
䎬 dilc 䎬 dilc
⺻ vhgd ⺻ vhgd
@ -20966,7 +20960,6 @@
䦷 uwwf 䦷 uwwf
䦶 uqvh 䦶 uqvh
龺 fjj 龺 fjj
𤇾 oopb
䲣 haqt 䲣 haqt
䲟 qgqb 䲟 qgqb
䲠 qgdj 䲠 qgdj
@ -21004,3 +20997,62 @@
﨨 qfuf 﨨 qfuf
﨩 bwvm 﨩 bwvm
㞌 nbd 㞌 nbd
䗪 yaoj
㳇 iwqy
㕮 kwqy
㬊 jefc
㿠 riqn
䝙 eeaq
㠇 myin
㮾 yvcs
㫰 jyve
㛹 vwgq
㧑 ryly
㙦 wtuf
䓨 aprm
㳚 idyt
䏲 euxt
䗖 jgkh
䃅 dujf
㙍 fccc
䏡 efiy
䓛 anbm
䃎 ddqq
䓬 ahjj
㽏 iwgf
䢼 awbh
㸌 ofwy
㛃 dhvv
㬚 jyct
㵐 iduw
䢺 bmbh
䓫 adsk
䌹 xmkg
䐃 elty
㸆 otfd
㥄 nfwt
䂮 dhvd
㰀 stqi
㠓 mape
㭕 sfcy
䎃 mfng
䒤 ajf
㴔 iqvn
㟃 mngk
䗴 jttp
㻬 gffn
䣘 ipkb
㛚 vceh
㳘 iycq
㬎 jxxo
䗛 jwhe
㑊 wyoy
㺄 qtwj
㶲 oeh
㙘 fsvg
䎖 uljn
㩼 qqfc
㹴 qtgq
䜰 wwkf
䜮 wwkh
鿏 qgty

View File

@ -30,7 +30,7 @@
<div class="wrapper flex column"> <div class="wrapper flex column">
<header class="table-info flex alc"> <header class="table-info flex alc">
现有单字<i>{{single}}</i>个, 词组<i>{{words}}</i>个, 异形字<i>{{dy}}</i>个 ! 现有单字<i>{{single}}</i>个, 词组<i>{{words}}</i>个, 异形字<i>{{dy}}</i>, emoji<i>{{emoji}}</i> !
<wc-link class="download" type="primary" underline @click="openDownloadPanel">下载词库</wc-link> <wc-link class="download" type="primary" underline @click="openDownloadPanel">下载词库</wc-link>
</header> </header>
@ -40,7 +40,7 @@
</section> </section>
<section class="field flex alc"> <section class="field flex alc">
<wc-radio-group :duplex="filter.table" @change="search"> <wc-radio-group :duplex="filter.version" @change="search">
<wc-radio value="86">86版</wc-radio> <wc-radio value="86">86版</wc-radio>
<wc-radio value="18030" type="danger">18030版(86修正版)</wc-radio> <wc-radio value="18030" type="danger">18030版(86修正版)</wc-radio>
</wc-radio-group> </wc-radio-group>
@ -50,7 +50,7 @@
</div> </div>
<div class="panel"> <div class="panel flex column">
<div class="form"> <div class="form">
<wc-button class="custom-file" icon="plus"> <wc-button class="custom-file" icon="plus">
<input type="file" @change="fileChange"> <input type="file" @change="fileChange">
@ -59,7 +59,9 @@
<span class="tips">(仅需要中文即可, 程序会自动生成五笔编码, 词组一行一个)</span> <span class="tips">(仅需要中文即可, 程序会自动生成五笔编码, 词组一行一个)</span>
</div> </div>
<wc-scroll class="scroll-view">
<div class="preview">{{preview}}</div> <div class="preview">{{preview}}</div>
</wc-scroll>
</div> </div>
@ -78,6 +80,14 @@
<wc-layer ref="dl" title="下载选项" mask mask-close> <wc-layer ref="dl" title="下载选项" mask mask-close>
<div class="download-layer"> <div class="download-layer">
<section class="field flex">
<span class="label">编码版本</span>
<wc-radio-group :duplex="dlOpt.version" @change="search">
<wc-radio value="86">86版</wc-radio>
<wc-radio value="18030" type="danger">18030版(86修正版)</wc-radio>
</wc-radio-group>
</section>
<section class="field flex"> <section class="field flex">
<span class="label">词库选择</span> <span class="label">词库选择</span>
<wc-checkbox-group :duplex="dlOpt.tables"> <wc-checkbox-group :duplex="dlOpt.tables">

View File

@ -22,6 +22,7 @@ const WB_TABLE = new Enum()
const WB_TABLE_18030 = new Enum(FIXED_18030) const WB_TABLE_18030 = new Enum(FIXED_18030)
const WB_WORDS = new Enum() const WB_WORDS = new Enum()
const WB_DY = new Enum() const WB_DY = new Enum()
const WB_EMOJI = new Enum()
Anot({ Anot({
$id: 'app', $id: 'app',
@ -29,13 +30,15 @@ Anot({
single: 0, single: 0,
words: 0, words: 0,
dy: 0, dy: 0,
emoji: 0,
result: '', result: '',
filter: { filter: {
text: '', text: '',
table: '86' version: '86'
}, },
dlOpt: { dlOpt: {
pos: 'front', pos: 'front',
version: '86',
reverse: true, reverse: true,
pinyin: true, pinyin: true,
tables: ['table', 'words', 'dy'] tables: ['table', 'words', 'dy']
@ -46,8 +49,9 @@ Anot({
Promise.all([ Promise.all([
fetch('./data/table.txt').then(r => r.text()), fetch('./data/table.txt').then(r => r.text()),
fetch('./data/words.txt').then(r => r.text()), fetch('./data/words.txt').then(r => r.text()),
fetch('./data/dy.txt').then(r => r.text()) fetch('./data/dy.txt').then(r => r.text()),
]).then(([table, words, dy]) => { fetch('./data/emoji.txt').then(r => r.text())
]).then(([table, words, dy, emoji]) => {
// //
table.split('\n').forEach(it => { table.split('\n').forEach(it => {
@ -80,15 +84,26 @@ Anot({
} }
}) })
emoji.split('\n').forEach(it => {
it = it.split(' ')
let k = it.shift()
if (k) {
WB_EMOJI.add(k, it)
}
})
this.single = WB_TABLE.length this.single = WB_TABLE.length
this.words = WB_WORDS.length this.words = WB_WORDS.length
this.dy = WB_DY.length this.dy = WB_DY.length
this.emoji = WB_EMOJI.length
}) })
}, },
methods: { methods: {
search() { search() {
var { text, table } = this.filter var { text, version } = this.filter
var reverse = false var reverse = false
var res, res18030 var res, res18030
@ -107,12 +122,12 @@ Anot({
if (reverse || text.length === 1) { if (reverse || text.length === 1) {
res = [WB_TABLE.get(text)] res = [WB_TABLE.get(text)]
if (table === '18030') { if (version === '18030') {
res18030 = [WB_TABLE_18030.get(text)] res18030 = [WB_TABLE_18030.get(text)]
} }
} else { } else {
res = text.split('').map(t => WB_TABLE.get(t)) res = text.split('').map(t => WB_TABLE.get(t))
if (table === '18030') { if (version === '18030') {
res18030 = text.split('').map(t => WB_TABLE_18030.get(t)) res18030 = text.split('').map(t => WB_TABLE_18030.get(t))
} }
} }
@ -164,7 +179,6 @@ Anot({
var file = ev.target.files[0] var file = ev.target.files[0]
var all = new Set() var all = new Set()
var unknow = new Set() var unknow = new Set()
console.log(file)
ev.target.value = '' ev.target.value = ''
@ -175,8 +189,9 @@ Anot({
.map(_ => _.trim()) .map(_ => _.trim())
for (let it of arr) { for (let it of arr) {
it = it.replace(/[\w\s\t]+/g, '')
all.add(it) all.add(it)
if (!WB_TABLE.get(it)) { if (!WB_TABLE.get(it) && !WB_WORDS.get(it) && !WB_DY.get(it)) {
unknow.add(it) unknow.add(it)
} }
} }
@ -185,21 +200,13 @@ Anot({
unknow = Array.from(unknow) unknow = Array.from(unknow)
this.preview = this.preview =
`本次上传, 含有 ${arr.length} 个词条(有效词条 ${all.length} 个)。\n` + `${file.name}\n本次上传, 含有 ${arr.length} 个词条(有效词条 ${all.length} 个)。\n` +
`其中字库中已经存在 ${all.length - unknow.length}个, 未存在词条 ${ `其中字库中已经存在 ${all.length - unknow.length}个, 未存在词条 ${
unknow.length unknow.length
} , 如下:\n\n${unknow.join('\t')}` } , 如下:\n\n${unknow.join('\t')}`
// Promise.all( window.unknow = unknow
// unknow.map(it => console.log(unknow)
// fetch('https://www.qqxiuzi.cn/bianma/wubiShow.php', {
// method: 'post',
// body: { text: it, type: 0, version: 0, token: 'ad362ce31bd5584cf7bbcb13b5b08511' }
// }).then(r => r.text())
// )
// ).then(r => {
// console.log(r)
// })
// navigator.clipboard.writeText(Array.from(all).join('\n')) // navigator.clipboard.writeText(Array.from(all).join('\n'))
} }

View File

@ -41,6 +41,7 @@ export default {
: 'kwvt', : 'kwvt',
: 'kdxt', : 'kdxt',
: 'dgky', : 'dgky',
𫍯: 'ydgy',
: 'ktry', : 'ktry',
: 'ktfg', : 'ktfg',
: 'khdd', : 'khdd',
@ -109,7 +110,10 @@ export default {
: 'iwvt', : 'iwvt',
: 'iavt', : 'iavt',
: 'idlt', : 'idlt',
𬇕: 'idnt',
: 'idyy',
: 'igy', : 'igy',
𬣡: 'ygy',
: 'itxy', : 'itxy',
: 'imgy', : 'imgy',
: 'akuo', : 'akuo',