From dea62af8191d323682745cd3c6413e724c51f7a2 Mon Sep 17 00:00:00 2001 From: oneao Date: Wed, 24 Sep 2025 22:10:19 +0800 Subject: [PATCH] u --- code/base-project/base-uniapp/.gitignore | 2 - .../base-uniapp/.vscode/settings.json | 51 +++++++++++++++++++ code/base-project/base-uniapp/package.json | 1 + code/base-project/base-uniapp/pnpm-lock.yaml | 44 ++++++++++------ .../base-uniapp/src/components/icon/index.vue | 44 ++++++++++++++++ .../base-uniapp/src/pages/home/index.vue | 42 ++++++--------- .../base-uniapp/src/types/components.d.ts | 12 +++++ 7 files changed, 153 insertions(+), 43 deletions(-) create mode 100644 code/base-project/base-uniapp/.vscode/settings.json create mode 100644 code/base-project/base-uniapp/src/components/icon/index.vue create mode 100644 code/base-project/base-uniapp/src/types/components.d.ts diff --git a/code/base-project/base-uniapp/.gitignore b/code/base-project/base-uniapp/.gitignore index a547bf36..8b7e5021 100644 --- a/code/base-project/base-uniapp/.gitignore +++ b/code/base-project/base-uniapp/.gitignore @@ -13,8 +13,6 @@ dist-ssr *.local # Editor directories and files -.vscode/* -!.vscode/extensions.json .idea .DS_Store *.suo diff --git a/code/base-project/base-uniapp/.vscode/settings.json b/code/base-project/base-uniapp/.vscode/settings.json new file mode 100644 index 00000000..4472e953 --- /dev/null +++ b/code/base-project/base-uniapp/.vscode/settings.json @@ -0,0 +1,51 @@ +{ + "editor.cursorSmoothCaretAnimation": "on", + // Disable the default formatter, use eslint instead + "prettier.enable": false, + "editor.formatOnSave": false, + + // Auto fix + "editor.codeActionsOnSave": { + "source.fixAll.eslint": "explicit", + "source.organizeImports": "never" + }, + + // Silent the stylistic rules in you IDE, but still auto fix them + "eslint.rules.customizations": [ + { "rule": "style/*", "severity": "off", "fixable": true }, + { "rule": "format/*", "severity": "off", "fixable": true }, + { "rule": "*-indent", "severity": "off", "fixable": true }, + { "rule": "*-spacing", "severity": "off", "fixable": true }, + { "rule": "*-spaces", "severity": "off", "fixable": true }, + { "rule": "*-order", "severity": "off", "fixable": true }, + { "rule": "*-dangle", "severity": "off", "fixable": true }, + { "rule": "*-newline", "severity": "off", "fixable": true }, + { "rule": "*quotes", "severity": "off", "fixable": true }, + { "rule": "*semi", "severity": "off", "fixable": true } + ], + + // Enable eslint for all supported languages + "eslint.validate": [ + "javascript", + "javascriptreact", + "typescript", + "typescriptreact", + "vue", + "html", + "markdown", + "json", + "jsonc", + "yaml", + "toml", + "xml", + "gql", + "graphql", + "astro", + "svelte", + "css", + "less", + "scss", + "pcss", + "postcss" + ] +} diff --git a/code/base-project/base-uniapp/package.json b/code/base-project/base-uniapp/package.json index be3c6313..b66999ce 100644 --- a/code/base-project/base-uniapp/package.json +++ b/code/base-project/base-uniapp/package.json @@ -79,6 +79,7 @@ "@dcloudio/uni-mp-weixin": "3.0.0-4070620250821001", "@dcloudio/uni-mp-xhs": "3.0.0-4070620250821001", "@dcloudio/uni-quickapp-webview": "3.0.0-4070620250821001", + "@iconify/utils": "^3.0.2", "@iconify/vue": "^5.0.0", "dayjs": "1.11.10", "pinia": "2.0.36", diff --git a/code/base-project/base-uniapp/pnpm-lock.yaml b/code/base-project/base-uniapp/pnpm-lock.yaml index 9e38dbf0..67fb690d 100644 --- a/code/base-project/base-uniapp/pnpm-lock.yaml +++ b/code/base-project/base-uniapp/pnpm-lock.yaml @@ -56,6 +56,9 @@ importers: '@dcloudio/uni-quickapp-webview': specifier: 3.0.0-4070620250821001 version: 3.0.0-4070620250821001(postcss@8.5.6)(rollup@4.52.2)(vue@3.5.21(typescript@5.8.3)) + '@iconify/utils': + specifier: ^3.0.2 + version: 3.0.2 '@iconify/vue': specifier: ^5.0.0 version: 5.0.0(vue@3.5.21(typescript@5.8.3)) @@ -239,6 +242,9 @@ packages: '@antfu/utils@0.7.10': resolution: {integrity: sha512-+562v9k4aI80m1+VuMHehNJWLOFjBnXn3tdOitzD0il5b7smkSBal4+a3oKiQTbrwMmN/TBUMDvbdoWDehgOww==} + '@antfu/utils@9.2.1': + resolution: {integrity: sha512-TMilPqXyii1AsiEii6l6ubRzbo76p6oshUSYPaKsmXDavyMLqjzVDkcp3pHp5ELMUNJHATcEOGxKTTsX9yYhGg==} + '@babel/code-frame@7.27.1': resolution: {integrity: sha512-cjQ7ZlQ0Mv3b47hABuTevyTuYN4i+loJKGeV9flcCgIK37cCXRh+L1bd3iBHlynerhQ7BhCkn2BPbQUL+rGqFg==} engines: {node: '>=6.9.0'} @@ -1206,6 +1212,9 @@ packages: '@iconify/types@2.0.0': resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + '@iconify/utils@3.0.2': + resolution: {integrity: sha512-EfJS0rLfVuRuJRn4psJHtK2A9TqVnkxPpHY6lYHiB9+8eSuudsxbwMiavocG45ujOo6FJ+CIRlRnlOGinzkaGQ==} + '@iconify/vue@5.0.0': resolution: {integrity: sha512-C+KuEWIF5nSBrobFJhT//JS87OZ++QDORB6f2q2Wm6fl2mueSTpFBeBsveK0KW9hWiZ4mNiPjsh6Zs4jjdROSg==} peerDependencies: @@ -1529,28 +1538,24 @@ packages: engines: {node: '>= 12'} cpu: [arm64] os: [linux] - libc: [glibc] '@node-rs/xxhash-linux-arm64-musl@1.7.6': resolution: {integrity: sha512-AB5m6crGYSllM9F/xZNOQSPImotR5lOa9e4arW99Bv82S+gcpphI8fGMDOVTTCXY/RLRhvvhwzLDxmLB2O8VDg==} engines: {node: '>= 12'} cpu: [arm64] os: [linux] - libc: [musl] '@node-rs/xxhash-linux-x64-gnu@1.7.6': resolution: {integrity: sha512-a2A6M+5tc0PVlJlE/nl0XsLEzMpKkwg7Y1lR5urFUbW9uVQnKjJYQDrUojhlXk0Uv3VnYQPa6ThmwlacZA5mvQ==} engines: {node: '>= 12'} cpu: [x64] os: [linux] - libc: [glibc] '@node-rs/xxhash-linux-x64-musl@1.7.6': resolution: {integrity: sha512-WioGJSC1GoxQpmdQrG5l/uddSBAS4XCWczHNwXe895J5xadGQzyvmr0r17BNfihvbBUDH1H9jwouNYzDDeA6+A==} engines: {node: '>= 12'} cpu: [x64] os: [linux] - libc: [musl] '@node-rs/xxhash-wasm32-wasi@1.7.6': resolution: {integrity: sha512-WDXXKMMFMrez+esm2DzMPHFNPFYf+wQUtaXrXwtxXeQMFEzleOLwEaqV0+bbXGJTwhPouL3zY1Qo2xmIH4kkTg==} @@ -1645,67 +1650,56 @@ packages: resolution: {integrity: sha512-kDWSPafToDd8LcBYd1t5jw7bD5Ojcu12S3uT372e5HKPzQt532vW+rGFFOaiR0opxePyUkHrwz8iWYEyH1IIQA==} cpu: [arm] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.52.2': resolution: {integrity: sha512-gKm7Mk9wCv6/rkzwCiUC4KnevYhlf8ztBrDRT9g/u//1fZLapSRc+eDZj2Eu2wpJ+0RzUKgtNijnVIB4ZxyL+w==} cpu: [arm] os: [linux] - libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.52.2': resolution: {integrity: sha512-66lA8vnj5mB/rtDNwPgrrKUOtCLVQypkyDa2gMfOefXK6rcZAxKLO9Fy3GkW8VkPnENv9hBkNOFfGLf6rNKGUg==} cpu: [arm64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.52.2': resolution: {integrity: sha512-s+OPucLNdJHvuZHuIz2WwncJ+SfWHFEmlC5nKMUgAelUeBUnlB4wt7rXWiyG4Zn07uY2Dd+SGyVa9oyLkVGOjA==} cpu: [arm64] os: [linux] - libc: [musl] '@rollup/rollup-linux-loong64-gnu@4.52.2': resolution: {integrity: sha512-8wTRM3+gVMDLLDdaT6tKmOE3lJyRy9NpJUS/ZRWmLCmOPIJhVyXwjBo+XbrrwtV33Em1/eCTd5TuGJm4+DmYjw==} cpu: [loong64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-ppc64-gnu@4.52.2': resolution: {integrity: sha512-6yqEfgJ1anIeuP2P/zhtfBlDpXUb80t8DpbYwXQ3bQd95JMvUaqiX+fKqYqUwZXqdJDd8xdilNtsHM2N0cFm6A==} cpu: [ppc64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.52.2': resolution: {integrity: sha512-sshYUiYVSEI2B6dp4jMncwxbrUqRdNApF2c3bhtLAU0qA8Lrri0p0NauOsTWh3yCCCDyBOjESHMExonp7Nzc0w==} cpu: [riscv64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-riscv64-musl@4.52.2': resolution: {integrity: sha512-duBLgd+3pqC4MMwBrKkFxaZerUxZcYApQVC5SdbF5/e/589GwVvlRUnyqMFbM8iUSb1BaoX/3fRL7hB9m2Pj8Q==} cpu: [riscv64] os: [linux] - libc: [musl] '@rollup/rollup-linux-s390x-gnu@4.52.2': resolution: {integrity: sha512-tzhYJJidDUVGMgVyE+PmxENPHlvvqm1KILjjZhB8/xHYqAGeizh3GBGf9u6WdJpZrz1aCpIIHG0LgJgH9rVjHQ==} cpu: [s390x] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.52.2': resolution: {integrity: sha512-opH8GSUuVcCSSyHHcl5hELrmnk4waZoVpgn/4FDao9iyE4WpQhyWJ5ryl5M3ocp4qkRuHfyXnGqg8M9oKCEKRA==} cpu: [x64] os: [linux] - libc: [glibc] '@rollup/rollup-linux-x64-musl@4.52.2': resolution: {integrity: sha512-LSeBHnGli1pPKVJ79ZVJgeZWWZXkEe/5o8kcn23M8eMKCUANejchJbF/JqzM4RRjOJfNRhKJk8FuqL1GKjF5oQ==} cpu: [x64] os: [linux] - libc: [musl] '@rollup/rollup-openharmony-arm64@4.52.2': resolution: {integrity: sha512-uPj7MQ6/s+/GOpolavm6BPo+6CbhbKYyZHUDvZ/SmJM7pfDBgdGisFX3bY/CBDMg2ZO4utfhlApkSfZ92yXw7Q==} @@ -3563,6 +3557,9 @@ packages: resolution: {integrity: sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==} engines: {node: '>=6'} + kolorist@1.8.0: + resolution: {integrity: sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==} + lcid@3.1.1: resolution: {integrity: sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==} engines: {node: '>=8'} @@ -5120,6 +5117,8 @@ snapshots: '@antfu/utils@0.7.10': {} + '@antfu/utils@9.2.1': {} + '@babel/code-frame@7.27.1': dependencies: '@babel/helper-validator-identifier': 7.27.1 @@ -6770,6 +6769,19 @@ snapshots: '@iconify/types@2.0.0': {} + '@iconify/utils@3.0.2': + dependencies: + '@antfu/install-pkg': 1.1.0 + '@antfu/utils': 9.2.1 + '@iconify/types': 2.0.0 + debug: 4.4.3 + globals: 15.15.0 + kolorist: 1.8.0 + local-pkg: 1.1.2 + mlly: 1.8.0 + transitivePeerDependencies: + - supports-color + '@iconify/vue@5.0.0(vue@3.5.21(typescript@5.8.3))': dependencies: '@iconify/types': 2.0.0 @@ -9720,6 +9732,8 @@ snapshots: kleur@3.0.3: {} + kolorist@1.8.0: {} + lcid@3.1.1: dependencies: invert-kv: 3.0.1 diff --git a/code/base-project/base-uniapp/src/components/icon/index.vue b/code/base-project/base-uniapp/src/components/icon/index.vue new file mode 100644 index 00000000..5d8ad777 --- /dev/null +++ b/code/base-project/base-uniapp/src/components/icon/index.vue @@ -0,0 +1,44 @@ + + + diff --git a/code/base-project/base-uniapp/src/pages/home/index.vue b/code/base-project/base-uniapp/src/pages/home/index.vue index 6a211456..e844928b 100644 --- a/code/base-project/base-uniapp/src/pages/home/index.vue +++ b/code/base-project/base-uniapp/src/pages/home/index.vue @@ -1,35 +1,25 @@ diff --git a/code/base-project/base-uniapp/src/types/components.d.ts b/code/base-project/base-uniapp/src/types/components.d.ts new file mode 100644 index 00000000..8c15c7ee --- /dev/null +++ b/code/base-project/base-uniapp/src/types/components.d.ts @@ -0,0 +1,12 @@ +/* eslint-disable */ +/* prettier-ignore */ +// @ts-nocheck +// Generated by vite-plugin-uni-components +// Read more: https://github.com/vuejs/core/pull/3399 +export {} + +declare module 'vue' { + export interface GlobalComponents { + Icon: typeof import('./../components/icon/index.vue')['default'] + } +}