diff --git a/.eslintrc.js b/.eslintrc.js index 60e16ae9..23cbd909 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,26 +1,66 @@ +// module.exports = { +// env: { +// browser: true, +// node: true, +// }, +// parser: 'vue-eslint-parser', +// parserOptions: { +// parser: '@typescript-eslint/parser', +// sourceType: 'module', +// ecmaVersion: 10, +// }, +// plugins: ['@typescript-eslint', 'prettier'], +// extends: [ +// 'eslint:recommended', +// 'plugin:vue/vue3-recommended', +// 'plugin:@typescript-eslint/recommended', +// ], +// rules: { +// 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', +// 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', +// quotes: ['error', 'single'], +// semi: ['error', 'never'], +// 'no-unused-vars': 'off', +// '@typescript-eslint/no-unused-vars': 'off', +// }, +// } + module.exports = { + root: true, env: { browser: true, + es2021: true, node: true, }, + globals: { + defineProps: 'readonly', + defineEmits: 'readonly', + defineExpose: 'readonly', + withDefaults: 'readonly', + }, parser: 'vue-eslint-parser', + plugins: ['@typescript-eslint', 'prettier'], + extends: [ + 'plugin:vue/vue3-recommended', + 'eslint:recommended', + '@vue/typescript/recommended', + '@vue/prettier', + '@vue/prettier/@typescript-eslint', + ], parserOptions: { parser: '@typescript-eslint/parser', sourceType: 'module', ecmaVersion: 10, }, - plugins: ['@typescript-eslint', 'prettier'], - extends: [ - 'eslint:recommended', - 'plugin:vue/vue3-recommended', - 'plugin:@typescript-eslint/recommended', - ], rules: { + 'vue/valid-template-root': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unused-vars': 'off', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + 'vue/one-component-per-file': 'off', + '@typescript-eslint/no-non-null-assertion': 'off', 'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off', - quotes: ['error', 'single'], - semi: ['error', 'never'], - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': 'off', }, } diff --git a/.husky/commit-msg b/.husky/commit-msg index 2f894ed2..816f4e58 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -2,4 +2,4 @@ . "$(dirname "$0")/_/husky.sh" pnpx pretty-quick --staged -pnpx lint-staged +#pnpx lint-staged diff --git a/.postcssrc.json b/.postcssrc.json index 67ab504b..01161a20 100644 --- a/.postcssrc.json +++ b/.postcssrc.json @@ -6,4 +6,4 @@ }, "autoprefixer": {} } -} \ No newline at end of file +} diff --git a/CHANGELOG.md b/CHANGELOG.md index a1df463a..e09df5ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1 +1 @@ -### 更新日志 \ No newline at end of file +### 更新日志 diff --git a/README.md b/README.md index ad883c47..3fad1b7b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -

layui @@ -26,7 +25,6 @@ Vue 3.0 的 桌 面 端 组 件 库 , Layui 的 另 一 种 呈 现 方 式 - ## 快速上手 : Beta 获得 layui-vue 你只需要使用 npm 引入下述文件: @@ -43,31 +41,28 @@ import Layui from '@layui/layui-vue' import '@layui/layui-vue/lib/layui.css' import App from './App.vue' -createApp(App) -.use(Layui) -.mount('#app') - +createApp(App).use(Layui).mount('#app') ``` 这是一个基本的入门页面: ```html - ``` ## [阅读文档](http://layui-vue.pearadmin.com/) + 从现在开始,尽情地拥抱 layui 吧!但愿她能成为你长远的开发伴侣,化作你方寸屏幕前的亿万字节! ## 使用趋势 @@ -75,14 +70,16 @@ createApp(App) [![Giteye chart](https://chart.giteye.net/gitee/layui-vue/layui-vue/5ZQ67WWS.png)](https://giteye.net/chart/5ZQ67WWS) ## 贡献者 -> 大概是因为 layui - vue 让开发者变得更懒,所以贡献者才这么少? + +> 大概是因为 layui - vue 让开发者变得更懒,所以贡献者才这么少? > 好的,姑且就这样认为吧。 - + [![Giteye chart](https://chart.giteye.net/gitee/layui-vue/layui-vue/DBC9Z6HQ.png)](https://giteye.net/chart/DBC9Z6HQ) ## 交流群 -![输入图片说明](https://images.gitee.com/uploads/images/2021/1008/090410_8b349271_4835367.png "QQ图片20211008090242.png") +![输入图片说明](https://images.gitee.com/uploads/images/2021/1008/090410_8b349271_4835367.png 'QQ图片20211008090242.png') ## 相关 -[官网](http://layui-vue.pearadmin.com/)、[更新日志](http://layui-vue.pearadmin.com/zh-CN/guide/changelog)、[交流群](https://jq.qq.com/?_wv=1027&k=ffiUQgnE) \ No newline at end of file + +[官网](http://layui-vue.pearadmin.com/)、[更新日志](http://layui-vue.pearadmin.com/zh-CN/guide/changelog)、[交流群](https://jq.qq.com/?_wv=1027&k=ffiUQgnE) diff --git a/docs/docs/zh-CN/components/animation.md b/docs/docs/zh-CN/components/animation.md index 6dacb5fe..e2ba32dd 100644 --- a/docs/docs/zh-CN/components/animation.md +++ b/docs/docs/zh-CN/components/animation.md @@ -65,19 +65,20 @@ export default { } } + ::: -| | | | -|--|--|--| -| layui-anim-down | 顶部往下滑入 | `layui-anim layui-anim-down` | -| layui-anim-downbit | 微微往下滑入 | `layui-anim layui-anim-downbit` | -| layui-anim-up | 底部往上滑入 | `layui-anim layui-anim-up` | -| layui-anim-upbit | 微微往上滑入 | `layui-anim ayui-anim-upbit` | -| layui-anim-scale | 平滑放大 | `layui-anim layui-anim-scale` | -| layui-anim-scaleSpring | 弹簧式放大 | `layui-anim layui-anim-scaleSpring` | -| layui-anim-scalesmall | 平滑放小 |`layui-anim layui-anim-scalesmall`| -| layui-anim-scalesmall-spring | 弹簧式放小 | `layui-anim layui-anim-scalesmall-spring`| -| layui-anim-fadein | 渐现 | `layui-anim layui-anim-fadein`| -| layui-anim-fadeout | 渐隐 | `layui-anim layui-anim-fadeout`| -| layui-anim-rotate | 360度旋转 | `layui-anim layui-anim-rotate`| -| layui-anim-rotate layui-anim-loop | 循环动画 | `layui-anim layui-anim-rotate layui-anim-loop`| \ No newline at end of file +| | | | +| --------------------------------- | ------------ | ---------------------------------------------- | +| layui-anim-down | 顶部往下滑入 | `layui-anim layui-anim-down` | +| layui-anim-downbit | 微微往下滑入 | `layui-anim layui-anim-downbit` | +| layui-anim-up | 底部往上滑入 | `layui-anim layui-anim-up` | +| layui-anim-upbit | 微微往上滑入 | `layui-anim ayui-anim-upbit` | +| layui-anim-scale | 平滑放大 | `layui-anim layui-anim-scale` | +| layui-anim-scaleSpring | 弹簧式放大 | `layui-anim layui-anim-scaleSpring` | +| layui-anim-scalesmall | 平滑放小 | `layui-anim layui-anim-scalesmall` | +| layui-anim-scalesmall-spring | 弹簧式放小 | `layui-anim layui-anim-scalesmall-spring` | +| layui-anim-fadein | 渐现 | `layui-anim layui-anim-fadein` | +| layui-anim-fadeout | 渐隐 | `layui-anim layui-anim-fadeout` | +| layui-anim-rotate | 360 度旋转 | `layui-anim layui-anim-rotate` | +| layui-anim-rotate layui-anim-loop | 循环动画 | `layui-anim layui-anim-rotate layui-anim-loop` | diff --git a/docs/docs/zh-CN/components/avatar.md b/docs/docs/zh-CN/components/avatar.md index 22c3866c..d7f9963e 100644 --- a/docs/docs/zh-CN/components/avatar.md +++ b/docs/docs/zh-CN/components/avatar.md @@ -68,10 +68,11 @@ export default { } } + ::: -| | | | -|--|--|--| -| src | 图源 | -- | -| size | 尺寸 | `xs` `sm` `lg`| -| radius | 圆形 | `true` `false`| \ No newline at end of file +| | | | +| ------ | ---- | -------------- | +| src | 图源 | -- | +| size | 尺寸 | `xs` `sm` `lg` | +| radius | 圆形 | `true` `false` | diff --git a/docs/docs/zh-CN/components/badge.md b/docs/docs/zh-CN/components/badge.md index c0270e2a..23ba7809 100644 --- a/docs/docs/zh-CN/components/badge.md +++ b/docs/docs/zh-CN/components/badge.md @@ -33,7 +33,7 @@ export default { ::: -| | | | -|--|--|--| -| type | 类型 | `dot` `rim` | -| theme| 主题 | `orange` `green` `cyan` `blue` `black` `gray`| \ No newline at end of file +| | | | +| ----- | ---- | --------------------------------------------- | +| type | 类型 | `dot` `rim` | +| theme | 主题 | `orange` `green` `cyan` `blue` `black` `gray` | diff --git a/docs/docs/zh-CN/components/breadcrumb.md b/docs/docs/zh-CN/components/breadcrumb.md index e6445f5c..b1ed4bf0 100644 --- a/docs/docs/zh-CN/components/breadcrumb.md +++ b/docs/docs/zh-CN/components/breadcrumb.md @@ -46,6 +46,6 @@ export default { ::: -| | | | -|--|--|--| -| separator | 分割符 | `/` | \ No newline at end of file +| | | | +| --------- | ------ | --- | +| separator | 分割符 | `/` | diff --git a/docs/docs/zh-CN/components/button.md b/docs/docs/zh-CN/components/button.md index faa620a3..f64b0e12 100644 --- a/docs/docs/zh-CN/components/button.md +++ b/docs/docs/zh-CN/components/button.md @@ -48,7 +48,6 @@ export default { ::: - ::: demo 传入 columns 数据,自动生成表格 diff --git a/src/module/header/index.ts b/src/module/header/index.ts index 754facf7..86d0e540 100644 --- a/src/module/header/index.ts +++ b/src/module/header/index.ts @@ -3,7 +3,7 @@ import Component from './index.vue' import type { IDefineComponent } from '../type/index' Component.install = (app: App) => { - app.component(Component.name || 'LayHeader', Component) + app.component(Component.name || 'LayHeader', Component) } export default Component as IDefineComponent diff --git a/src/module/header/index.vue b/src/module/header/index.vue index a2f1d6dd..ff66b61f 100644 --- a/src/module/header/index.vue +++ b/src/module/header/index.vue @@ -1,9 +1,7 @@ - + diff --git a/src/module/icon/index.vue b/src/module/icon/index.vue index bf67fe67..78336cf3 100644 --- a/src/module/icon/index.vue +++ b/src/module/icon/index.vue @@ -1,12 +1,11 @@ diff --git a/src/module/iconPicker/index.vue b/src/module/iconPicker/index.vue index db3a1acc..c7f7aebb 100644 --- a/src/module/iconPicker/index.vue +++ b/src/module/iconPicker/index.vue @@ -6,30 +6,30 @@ " >

- +
+ >