From eba448dbd5d51759aaa48d78436a4e78baf33b28 Mon Sep 17 00:00:00 2001 From: Zyronon Date: Fri, 19 Dec 2025 01:45:13 +0800 Subject: [PATCH] wip --- .editorconfig | 12 + .prettierignore | 2 + .prettierrc | 9 + package.json | 1 + pnpm-lock.yaml | 31 ++ src/assets/css/style.scss | 6 +- src/components/BaseTable2.vue | 313 ------------------ src/components/WordItem.vue | 52 ++- src/components/list/ArticleList.vue | 86 +++-- src/components/list/BaseList.vue | 177 +++++----- src/components/list/WordList.vue | 30 +- src/pages/article/ArticlesPage.vue | 57 ++-- src/pages/article/BatchEditArticlePage.vue | 6 +- src/pages/article/PracticeArticles.vue | 12 - .../article/components/TypingArticle.vue | 2 +- src/pages/qa.vue | 150 +++++---- src/pages/setting/Setting.vue | 38 +-- src/pages/word/DictDetail.vue | 94 +++--- src/pages/word/WordsPage.vue | 158 +++------ .../ChangeLastPracticeIndexDialog.vue | 12 +- .../components/PracticeWordListDialog.vue | 35 +- .../ShufflePracticeSettingDialog.vue | 6 +- 22 files changed, 506 insertions(+), 783 deletions(-) create mode 100644 .editorconfig create mode 100644 .prettierignore create mode 100644 .prettierrc delete mode 100644 src/components/BaseTable2.vue diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..8c52ff93 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 2 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..de4d1f00 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +dist +node_modules diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 00000000..550eb8a3 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,9 @@ +{ + "semi": false, + "singleQuote": true, + "printWidth": 100, + "tabWidth": 2, + "trailingComma": "es5", + "arrowParens": "avoid", + "bracketSpacing": true +} diff --git a/package.json b/package.json index d846fb8a..f8e89b2a 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "git-last-commit": "^1.0.1", "gulp": "^4.0.2", "husky": "^8.0.3", + "prettier": "^3.7.4", "rollup-plugin-visualizer": "^5.14.0", "sass": "^1.89.2", "sitemap": "^8.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 209833c3..5240a8fa 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -156,6 +156,9 @@ importers: husky: specifier: ^8.0.3 version: 8.0.3 + prettier: + specifier: ^3.7.4 + version: 3.7.4 rollup-plugin-visualizer: specifier: ^5.14.0 version: 5.14.0(rollup@4.46.2) @@ -635,21 +638,25 @@ packages: resolution: {integrity: sha512-mMB1AvqzTH25rbUo1eRfvFzNqBopX6aRlDmO1fIVVzIWi6YJNKckxbkGaatez4hH/n86IR6aEdZFM3qBUjn3Tg==} cpu: [arm64] os: [linux] + libc: [glibc] '@oxc-resolver/binding-linux-arm64-musl@4.2.0': resolution: {integrity: sha512-9oPBU8Yb35z15/14LzALn/8rRwwrtfe19l25N1MRZVSONGiOwfzWNqDNjWiDdyW+EUt/hlylmFOItZmreL6iIw==} cpu: [arm64] os: [linux] + libc: [musl] '@oxc-resolver/binding-linux-x64-gnu@4.2.0': resolution: {integrity: sha512-8wU4fwHb0b45i0qMBJ24UYBEtaLyvYWUOqVVCn0SpQZ1mhWWC8dvD6+zIVAKRVex/cKdgzi3imXoKGIDqVEu9w==} cpu: [x64] os: [linux] + libc: [glibc] '@oxc-resolver/binding-linux-x64-musl@4.2.0': resolution: {integrity: sha512-5CS2wlGxzESPJCj4NlNGr73QCku75VpGtkwNp8qJF4hLELKAzkoqIB0eBbcvNPg8m2rB7YeXb1u+puGUKXDhNQ==} cpu: [x64] os: [linux] + libc: [musl] '@oxc-resolver/binding-wasm32-wasi@4.2.0': resolution: {integrity: sha512-VOLpvmVAQZjvj/7Et/gYzW6yBqL9VKjLWOGaFiQ7cvTpY9R9d/1mrNKEuP3beDHF2si2fM5f2pl9bL+N4tvwiA==} @@ -695,36 +702,42 @@ packages: engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm-musl@2.5.1': resolution: {integrity: sha512-6E+m/Mm1t1yhB8X412stiKFG3XykmgdIOqhjWj+VL8oHkKABfu/gjFj8DvLrYVHSBNC+/u5PeNrujiSQ1zwd1Q==} engines: {node: '>= 10.0.0'} cpu: [arm] os: [linux] + libc: [musl] '@parcel/watcher-linux-arm64-glibc@2.5.1': resolution: {integrity: sha512-LrGp+f02yU3BN9A+DGuY3v3bmnFUggAITBGriZHUREfNEzZh/GO06FF5u2kx8x+GBEUYfyTGamol4j3m9ANe8w==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-arm64-musl@2.5.1': resolution: {integrity: sha512-cFOjABi92pMYRXS7AcQv9/M1YuKRw8SZniCDw0ssQb/noPkRzA+HBDkwmyOJYp5wXcsTrhxO0zq1U11cK9jsFg==} engines: {node: '>= 10.0.0'} cpu: [arm64] os: [linux] + libc: [musl] '@parcel/watcher-linux-x64-glibc@2.5.1': resolution: {integrity: sha512-GcESn8NZySmfwlTsIur+49yDqSny2IhPeZfXunQi48DMugKeZ7uy1FX83pO0X22sHntJ4Ub+9k34XQCX+oHt2A==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [glibc] '@parcel/watcher-linux-x64-musl@2.5.1': resolution: {integrity: sha512-n0E2EQbatQ3bXhcH2D1XIAANAcTZkQICBPVaxMeaCVBtOpBZpWJuf7LwyWPSBDITb7In8mqQgJ7gH8CILCURXg==} engines: {node: '>= 10.0.0'} cpu: [x64] os: [linux] + libc: [musl] '@parcel/watcher-win32-arm64@2.5.1': resolution: {integrity: sha512-RFzklRvmc3PkjKjry3hLF9wD7ppR4AKcWNzH7kXR7GUe0Igb3Nz8fyPwtZCSquGrhU5HhUNDr/mKBqj7tqA2Vw==} @@ -794,56 +807,67 @@ packages: resolution: {integrity: sha512-EtP8aquZ0xQg0ETFcxUbU71MZlHaw9MChwrQzatiE8U/bvi5uv/oChExXC4mWhjiqK7azGJBqU0tt5H123SzVA==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.46.2': resolution: {integrity: sha512-qO7F7U3u1nfxYRPM8HqFtLd+raev2K137dsV08q/LRKRLEc7RsiDWihUnrINdsWQxPR9jqZ8DIIZ1zJJAm5PjQ==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.46.2': resolution: {integrity: sha512-3dRaqLfcOXYsfvw5xMrxAk9Lb1f395gkoBYzSFcc/scgRFptRXL9DOaDpMiehf9CO8ZDRJW2z45b6fpU5nwjng==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.46.2': resolution: {integrity: sha512-fhHFTutA7SM+IrR6lIfiHskxmpmPTJUXpWIsBXpeEwNgZzZZSg/q4i6FU4J8qOGyJ0TR+wXBwx/L7Ho9z0+uDg==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-loongarch64-gnu@4.46.2': resolution: {integrity: sha512-i7wfGFXu8x4+FRqPymzjD+Hyav8l95UIZ773j7J7zRYc3Xsxy2wIn4x+llpunexXe6laaO72iEjeeGyUFmjKeA==} cpu: [loong64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.46.2': resolution: {integrity: sha512-B/l0dFcHVUnqcGZWKcWBSV2PF01YUt0Rvlurci5P+neqY/yMKchGU8ullZvIv5e8Y1C6wOn+U03mrDylP5q9Yw==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.46.2': resolution: {integrity: sha512-32k4ENb5ygtkMwPMucAb8MtV8olkPT03oiTxJbgkJa7lJ7dZMr0GCFJlyvy+K8iq7F/iuOr41ZdUHaOiqyR3iQ==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.46.2': resolution: {integrity: sha512-t5B2loThlFEauloaQkZg9gxV05BYeITLvLkWOkRXogP4qHXLkWSbSHKM9S6H1schf/0YGP/qNKtiISlxvfmmZw==} cpu: [riscv64] os: [linux] + libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.46.2': resolution: {integrity: sha512-YKjekwTEKgbB7n17gmODSmJVUIvj8CX7q5442/CK80L8nqOUbMtf8b01QkG3jOqyr1rotrAnW6B/qiHwfcuWQA==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.46.2': resolution: {integrity: sha512-Jj5a9RUoe5ra+MEyERkDKLwTXVu6s3aACP51nkfnK9wJTraCC8IMe3snOfALkrjTYd2G1ViE1hICj0fZ7ALBPA==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.46.2': resolution: {integrity: sha512-7kX69DIrBeD7yNp4A5b81izs8BqoZkCIaxQaOpumcJ1S/kmqNFjPhDu1LHeVXv0SexfHQv5cqHsxLOjETuqDuA==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.46.2': resolution: {integrity: sha512-wiJWMIpeaak/jsbaq2HMh/rzZxHVW1rU6coyeNNpMwk5isiPjSTx0a4YLSlYDwBH/WBvLz+EtsNqQScZTLJy3g==} @@ -3002,6 +3026,11 @@ packages: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} + prettier@3.7.4: + resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} + engines: {node: '>=14'} + hasBin: true + pretty-hrtime@1.0.3: resolution: {integrity: sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==} engines: {node: '>= 0.8'} @@ -6965,6 +6994,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + prettier@3.7.4: {} + pretty-hrtime@1.0.3: {} process-nextick-args@2.0.1: {} diff --git a/src/assets/css/style.scss b/src/assets/css/style.scss index 12c18dba..e94aec23 100644 --- a/src/assets/css/style.scss +++ b/src/assets/css/style.scss @@ -325,7 +325,7 @@ a { justify-content: space-between; transition: all .3s; padding: .6rem; - gap: .6rem; + gap: .3rem; border: 1px solid var(--color-item-border); .left { @@ -378,6 +378,7 @@ a { align-items: center; gap: .5rem; color: var(--color-main-text); + flex-wrap: wrap; span { flex-shrink: 0; @@ -385,7 +386,6 @@ a { .word { font-size: 1.2rem; - display: flex; } .phonetic { @@ -535,4 +535,4 @@ a { .base-button + .base-button { margin-left: 0 !important; } -} \ No newline at end of file +} diff --git a/src/components/BaseTable2.vue b/src/components/BaseTable2.vue deleted file mode 100644 index 5b13bbc7..00000000 --- a/src/components/BaseTable2.vue +++ /dev/null @@ -1,313 +0,0 @@ - - diff --git a/src/components/WordItem.vue b/src/components/WordItem.vue index 1e3b38bc..374348ce 100644 --- a/src/components/WordItem.vue +++ b/src/components/WordItem.vue @@ -1,44 +1,60 @@ - diff --git a/src/components/list/ArticleList.vue b/src/components/list/ArticleList.vue index 8591efa9..4ed7bb33 100644 --- a/src/components/list/ArticleList.vue +++ b/src/components/list/ArticleList.vue @@ -1,12 +1,13 @@ - - -