Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
m0_69021787
基于vue的头像自动生成器
提交
16be5a07
基
基于vue的头像自动生成器
项目概览
m0_69021787
/
基于vue的头像自动生成器
与 Fork 源项目一致
Fork自
虎纹鲨鱼 / avatar
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
基
基于vue的头像自动生成器
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
16be5a07
编写于
10月 31, 2021
作者:
L
LeoKu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: upgrade eslint to 8.x & fix rules
上级
2d16d58b
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
252 addition
and
527 deletion
+252
-527
.eslintrc.js
.eslintrc.js
+0
-2
.prettierrc.js
.prettierrc.js
+1
-1
package.json
package.json
+5
-6
src/App.vue
src/App.vue
+3
-3
src/components/ActionBar.vue
src/components/ActionBar.vue
+2
-2
src/components/ConfettiCanvas.vue
src/components/ConfettiCanvas.vue
+0
-0
src/components/VueColorAvatar.vue
src/components/VueColorAvatar.vue
+7
-5
yarn.lock
yarn.lock
+234
-508
未找到文件。
.eslintrc.js
浏览文件 @
16be5a07
...
@@ -26,7 +26,6 @@ module.exports = {
...
@@ -26,7 +26,6 @@ module.exports = {
'
plugin:@typescript-eslint/recommended
'
,
'
plugin:@typescript-eslint/recommended
'
,
'
plugin:vue/vue3-recommended
'
,
'
plugin:vue/vue3-recommended
'
,
'
plugin:prettier/recommended
'
,
'
plugin:prettier/recommended
'
,
'
plugin:tailwindcss/recommended
'
,
],
],
plugins
:
[
'
simple-import-sort
'
],
plugins
:
[
'
simple-import-sort
'
],
rules
:
{
rules
:
{
...
@@ -45,7 +44,6 @@ module.exports = {
...
@@ -45,7 +44,6 @@ module.exports = {
'
@typescript-eslint/explicit-module-boundary-types
'
:
0
,
'
@typescript-eslint/explicit-module-boundary-types
'
:
0
,
'
@typescript-eslint/consistent-type-imports
'
:
1
,
'
@typescript-eslint/consistent-type-imports
'
:
1
,
'
@typescript-eslint/no-non-null-assertion
'
:
0
,
'
@typescript-eslint/no-non-null-assertion
'
:
0
,
'
tailwindcss/no-custom-classname
'
:
0
,
},
},
ignorePatterns
:
[
ignorePatterns
:
[
'
dist
'
,
'
dist
'
,
...
...
.prettierrc.js
浏览文件 @
16be5a07
module
.
exports
=
{
module
.
exports
=
{
arrowParens
:
'
always
'
,
arrowParens
:
'
always
'
,
bracketSpacing
:
true
,
bracketSpacing
:
true
,
jsxB
racketSameLine
:
false
,
b
racketSameLine
:
false
,
jsxSingleQuote
:
false
,
jsxSingleQuote
:
false
,
printWidth
:
80
,
printWidth
:
80
,
quoteProps
:
'
as-needed
'
,
quoteProps
:
'
as-needed
'
,
...
...
package.json
浏览文件 @
16be5a07
...
@@ -33,18 +33,17 @@
...
@@ -33,18 +33,17 @@
"
@babel/preset-typescript
"
:
"
^7.15.0
"
,
"
@babel/preset-typescript
"
:
"
^7.15.0
"
,
"
@types/canvas-confetti
"
:
"
^1.4.2
"
,
"
@types/canvas-confetti
"
:
"
^1.4.2
"
,
"
@types/jest
"
:
"
^27.0.2
"
,
"
@types/jest
"
:
"
^27.0.2
"
,
"
@typescript-eslint/eslint-plugin
"
:
"
^
4.3
2.0
"
,
"
@typescript-eslint/eslint-plugin
"
:
"
^
5.
2.0
"
,
"
@typescript-eslint/parser
"
:
"
^
4.3
2.0
"
,
"
@typescript-eslint/parser
"
:
"
^
5.
2.0
"
,
"
@vitejs/plugin-vue
"
:
"
^1.9.2
"
,
"
@vitejs/plugin-vue
"
:
"
^1.9.2
"
,
"
@vue/compiler-sfc
"
:
"
^3.2.19
"
,
"
@vue/compiler-sfc
"
:
"
^3.2.19
"
,
"
babel-jest
"
:
"
^27.2.5
"
,
"
babel-jest
"
:
"
^27.2.5
"
,
"
eslint
"
:
"
^
7.32
.0
"
,
"
eslint
"
:
"
^
8.1
.0
"
,
"
eslint-config-prettier
"
:
"
^8.3.0
"
,
"
eslint-config-prettier
"
:
"
^8.3.0
"
,
"
eslint-plugin-import
"
:
"
^2.2
4
.2
"
,
"
eslint-plugin-import
"
:
"
^2.2
5
.2
"
,
"
eslint-plugin-prettier
"
:
"
^4.0.0
"
,
"
eslint-plugin-prettier
"
:
"
^4.0.0
"
,
"
eslint-plugin-simple-import-sort
"
:
"
^7.0.0
"
,
"
eslint-plugin-simple-import-sort
"
:
"
^7.0.0
"
,
"
eslint-plugin-tailwindcss
"
:
"
^1.16.0
"
,
"
eslint-plugin-vue
"
:
"
^8.0.3
"
,
"
eslint-plugin-vue
"
:
"
^7.18.0
"
,
"
husky
"
:
"
^7.0.2
"
,
"
husky
"
:
"
^7.0.2
"
,
"
jest
"
:
"
^27.2.5
"
,
"
jest
"
:
"
^27.2.5
"
,
"
lint-staged
"
:
"
^11.1.2
"
,
"
lint-staged
"
:
"
^11.1.2
"
,
...
...
src/App.vue
浏览文件 @
16be5a07
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
/>
/>
</div>
</div>
<ActionBar
@
action
Handler
=
"handleAction"
/>
<ActionBar
@
action=
"handleAction"
/>
<div
class=
"action-group"
>
<div
class=
"action-group"
>
<button
class=
"action-randomize"
@
click=
"handleGenerate"
>
<button
class=
"action-randomize"
@
click=
"handleGenerate"
>
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
/>
/>
<
/div
>
<
/div
>
<
Confetti
/>
<
Confetti
Canvas
/>
<
div
class
=
"
gradient-bg
"
>
<
div
class
=
"
gradient-bg
"
>
<
div
class
=
"
gradient-top
"
><
/div
>
<
div
class
=
"
gradient-top
"
><
/div
>
...
@@ -93,7 +93,7 @@ import {
...
@@ -93,7 +93,7 @@ import {
}
from
'
@/utils/constant
'
}
from
'
@/utils/constant
'
import
{
recordEvent
}
from
'
@/utils/ga
'
import
{
recordEvent
}
from
'
@/utils/ga
'
import
Confetti
from
'
./components/Confetti
.vue
'
import
Confetti
Canvas
from
'
./components/ConfettiCanvas
.vue
'
const
store
=
useStore
()
const
store
=
useStore
()
...
...
src/components/ActionBar.vue
浏览文件 @
16be5a07
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
class=
"menu-item"
class=
"menu-item"
:class=
"
{ disabled: ac.disabled }"
:class=
"
{ disabled: ac.disabled }"
:title="ac.tip"
:title="ac.tip"
@click="emit('action
Handler
', ac.type)"
@click="emit('action', ac.type)"
>
>
<img
:src=
"ac.icon"
:alt=
"ac.tip"
/>
<img
:src=
"ac.icon"
:alt=
"ac.tip"
/>
</div>
</div>
...
@@ -25,7 +25,7 @@ import { ActionType } from '@/enums'
...
@@ -25,7 +25,7 @@ import { ActionType } from '@/enums'
import
{
useStore
}
from
'
@/store
'
import
{
useStore
}
from
'
@/store
'
const
emit
=
defineEmits
<
{
const
emit
=
defineEmits
<
{
(
e
:
'
action
Handler
'
,
actionType
:
ActionType
):
void
(
e
:
'
action
'
,
actionType
:
ActionType
):
void
}
>
()
}
>
()
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
...
...
src/components/Confetti.vue
→
src/components/Confetti
Canvas
.vue
浏览文件 @
16be5a07
文件已移动
src/components/VueColorAvatar.vue
浏览文件 @
16be5a07
...
@@ -14,6 +14,12 @@
...
@@ -14,6 +14,12 @@
</div>
</div>
</
template
>
</
template
>
<
script
lang=
"ts"
>
export
interface
VueColorAvatarRef
{
avatarRef
:
HTMLDivElement
}
</
script
>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
,
toRefs
,
watchEffect
}
from
'
vue
'
import
{
ref
,
toRefs
,
watchEffect
}
from
'
vue
'
...
@@ -25,7 +31,7 @@ import { widgetData } from '@/utils/dynamic-data'
...
@@ -25,7 +31,7 @@ import { widgetData } from '@/utils/dynamic-data'
import
Background
from
'
./widgets/Background.vue
'
import
Background
from
'
./widgets/Background.vue
'
export
interface
VueColorAvatarProps
{
interface
VueColorAvatarProps
{
option
:
AvatarOption
option
:
AvatarOption
size
?:
number
size
?:
number
}
}
...
@@ -37,10 +43,6 @@ const props = withDefaults(defineProps<VueColorAvatarProps>(), {
...
@@ -37,10 +43,6 @@ const props = withDefaults(defineProps<VueColorAvatarProps>(), {
const
{
option
:
avatarOption
,
size
:
avatarSize
}
=
toRefs
(
props
)
const
{
option
:
avatarOption
,
size
:
avatarSize
}
=
toRefs
(
props
)
export
interface
VueColorAvatarRef
{
avatarRef
:
HTMLDivElement
}
const
avatarRef
=
ref
<
VueColorAvatarRef
[
'
avatarRef
'
]
>
()
const
avatarRef
=
ref
<
VueColorAvatarRef
[
'
avatarRef
'
]
>
()
defineExpose
({
avatarRef
})
defineExpose
({
avatarRef
})
...
...
yarn.lock
浏览文件 @
16be5a07
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录