Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
koishi-plugin-pics
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
koishi-plugin-pics
Commits
ea1f3277
Commit
ea1f3277
authored
Mar 20, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix readme
parent
40028cfe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
README.md
README.md
+7
-7
No files found.
README.md
View file @
ea1f3277
...
@@ -80,7 +80,7 @@ export class PicSource {
...
@@ -80,7 +80,7 @@ export class PicSource {
// 图源介绍
// 图源介绍
description
:
string
;
description
:
string
;
// 是否为默认图源。用户未指定参数时使用默认图源。
// 是否为默认图源。用户未指定参数时使用默认图源。
d
efault
:
boolean
;
isD
efault
:
boolean
;
// 获取随机图片。 picTags 可能是空数组。
// 获取随机图片。 picTags 可能是空数组。
randomPic
(
picTags
:
string
[]):
PicResult
|
Promise
<
PicResult
>
;
randomPic
(
picTags
:
string
[]):
PicResult
|
Promise
<
PicResult
>
;
...
@@ -134,7 +134,7 @@ export interface PicSourceInfo {
...
@@ -134,7 +134,7 @@ export interface PicSourceInfo {
// 图源介绍
// 图源介绍
description
:
string
;
description
:
string
;
// 是否为默认图源。用户未指定参数时使用默认图源。
// 是否为默认图源。用户未指定参数时使用默认图源。
d
efault
:
boolean
;
isD
efault
:
boolean
;
}
}
```
```
...
@@ -148,16 +148,16 @@ export interface PicSourceInfo {
...
@@ -148,16 +148,16 @@ export interface PicSourceInfo {
```
ts
```
ts
export
class
PicSourceConfig
{
export
class
PicSourceConfig
{
@
DefineSchema
({
type
:
'
string
'
,
d
efault
:
[],
desc
:
'
图源标签
'
})
@
DefineSchema
({
type
:
'
string
'
,
isD
efault
:
[],
desc
:
'
图源标签
'
})
tags
:
string
[];
tags
:
string
[];
@
DefineSchema
({
d
efault
:
1
,
desc
:
'
图源权重
'
})
@
DefineSchema
({
isD
efault
:
1
,
desc
:
'
图源权重
'
})
weight
:
number
;
weight
:
number
;
@
DefineSchema
({
d
efault
:
1
,
desc
:
'
图源名称
'
,
required
:
true
})
@
DefineSchema
({
isD
efault
:
1
,
desc
:
'
图源名称
'
,
required
:
true
})
name
:
string
;
name
:
string
;
@
DefineSchema
({
desc
:
'
图源描述
'
})
@
DefineSchema
({
desc
:
'
图源描述
'
})
description
?:
string
;
description
?:
string
;
@
DefineSchema
({
desc
:
'
是否为默认图源
'
})
@
DefineSchema
({
desc
:
'
是否为默认图源
'
})
d
efault
?:
boolean
;
isD
efault
?:
boolean
;
// 给目标对象注入上述对象。
// 给目标对象注入上述对象。
applyTo
(
target
:
PicSourceInfo
)
{
applyTo
(
target
:
PicSourceInfo
)
{
...
@@ -165,7 +165,7 @@ export class PicSourceConfig {
...
@@ -165,7 +165,7 @@ export class PicSourceConfig {
target
.
weight
||=
this
.
weight
;
target
.
weight
||=
this
.
weight
;
target
.
name
||=
this
.
name
;
target
.
name
||=
this
.
name
;
target
.
description
||=
this
.
description
;
target
.
description
||=
this
.
description
;
target
.
default
=
this
.
d
efault
;
target
.
isDefault
=
this
.
isD
efault
;
}
}
}
}
```
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment