diff --git a/.prettierrc.js b/.prettierrc.js new file mode 100644 index 0000000..9209416 --- /dev/null +++ b/.prettierrc.js @@ -0,0 +1,104 @@ +export default { + /** + * 换行宽度,当代码宽度达到多少时换行 + * @default 80 + * @type {number} + */ + printWidth: 80, + /** + * 缩进的空格数量 + * @default 2 + * @type {number} + */ + tabWidth: 3, + /** + * 是否使用制表符代替空格 + * @default false + * @type {boolean} + */ + useTabs: false, + /** + * 是否在代码块结尾加上分号 + * @default true + * @type {boolean} + */ + semi: false, + /** + * 是否使用单引号替代双引号 + * @default false + * @type {boolean} + */ + singleQuote: true, + /** + * 对象属性的引号处理 + * @default "as-needed" + * @type {"as-needed"|"consistent"|"preserve"} + */ + quoteProps: 'as-needed', + /** + * jsx中是否使用单引号替代双引号 + * @default false + * @type {boolean} + */ + jsxSingleQuote: true, + /** + * 在jsx中使用是否单引号代替双引号 + * @default false + * @type {boolean} + */ + /** + * 末尾是否加上逗号 + * @default "es5" + * @type {"es5"|"none"|"all"} + */ + trailingComma: 'none', + /** + * 在对象,数组括号与文字之间加空格 "{ foo: bar }" + * @default true + * @type {boolean} + */ + bracketSpacing: true, + /** + * 把多行HTML (HTML, JSX, Vue, Angular)元素的>放在最后一行的末尾,而不是单独放在下一行(不适用于自关闭元素)。 + * @default false + * @type {boolean} + */ + bracketSameLine: true, + /** + * 当箭头函数只有一个参数是否加括号 + * @default "always" + * @type {"always"|"avoid"} + */ + arrowParens: 'always', + /** + * 为HTML、Vue、Angular和Handlebars指定全局空格敏感性 + * @default "css" + * @type {"css"|"strict"|"ignore"} + */ + htmlWhitespaceSensitivity: 'ignore', + /** + * 是否缩进Vue文件中的 \ No newline at end of file diff --git a/pages/tools.vue b/pages/tools.vue new file mode 100644 index 0000000..8e8347f --- /dev/null +++ b/pages/tools.vue @@ -0,0 +1,13 @@ + + + + + \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f3c0035..182710c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ importers: '@pinia/nuxt': specifier: ^0.9.0 version: 0.9.0(magicast@0.3.5)(pinia@2.3.0(typescript@5.7.3)(vue@3.5.13(typescript@5.7.3)))(rollup@4.30.1) + '@vicons/ionicons5': + specifier: ^0.13.0 + version: 0.13.0 naive-ui: specifier: ^2.41.0 version: 2.41.0(vue@3.5.13(typescript@5.7.3)) @@ -951,6 +954,9 @@ packages: engines: {node: '>=16'} hasBin: true + '@vicons/ionicons5@0.13.0': + resolution: {integrity: sha512-zvZKBPjEXKN7AXNo2Na2uy+nvuv6SP4KAMQxpKL2vfHMj0fSvuw7JZcOPCjQC3e7ayssKnaoFVAhbYcW6v41qQ==} + '@vitejs/plugin-vue-jsx@4.1.1': resolution: {integrity: sha512-uMJqv/7u1zz/9NbWAD3XdjaY20tKTf17XVfQ9zq4wY1BjsB/PjpJPMe2xiG39QpP4ZdhYNhm4Hvo66uJrykNLA==} engines: {node: ^18.0.0 || >=20.0.0} @@ -4232,6 +4238,8 @@ snapshots: - rollup - supports-color + '@vicons/ionicons5@0.13.0': {} + '@vitejs/plugin-vue-jsx@4.1.1(vite@6.0.7(@types/node@22.10.5)(jiti@2.4.2)(sass@1.83.1)(terser@5.37.0)(yaml@2.7.0))(vue@3.5.13(typescript@5.7.3))': dependencies: '@babel/core': 7.26.0