-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
120 changed files
with
122 additions
and
474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 2 | ||
indent_style = space | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
*.png -text | ||
*.jpg -text | ||
*.ico -text | ||
*.webp -text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,111 @@ | ||
<template> | ||
1 | ||
<div class="starter-container page"> | ||
<div class="content"> | ||
<content /> | ||
</div> | ||
<div class="chooser"> | ||
<div> | ||
<div class="chooser-header"> | ||
<span>我使用 Koishi……</span> | ||
</div> | ||
<div class="chooser-select"> | ||
<div class="chooser-select-item" | ||
v-for="(value, key) in choices" :key="key" | ||
:class="{ selected: chooserUsage === key }" | ||
@click="chooserUsage = key"> | ||
> {{ value.text }} | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div> | ||
<div class="chooser-header"> | ||
<span>{{ choices[chooserUsage].caption }}</span> | ||
</div> | ||
<div class="chooser-select"> | ||
<div class="chooser-select-item" | ||
v-for="(value, key) in choices[chooserUsage].children" :key="key" | ||
@click="$router.push(value)"> | ||
> {{ key }} | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue' | ||
const chooserUsage = ref('non-dev') | ||
const choices = { | ||
'non-dev': { | ||
text: '用于搭建机器人服务', | ||
caption: '我的运行环境是……', | ||
children: { | ||
'Windows': './desktop', | ||
'macOS': './desktop', | ||
'Linux': './desktop', | ||
'Android': './mobile', | ||
}, | ||
}, | ||
dev: { | ||
text: '用于开发', | ||
caption: '我希望 Koishi 作为……', | ||
children: { | ||
'一个独立的项目': './boilerplate', | ||
'其他 Node 项目的依赖': './direct', | ||
}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.starter-container { | ||
height: 100vh; | ||
box-sizing: border-box; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
max-width: 840px; | ||
margin: 0 auto; | ||
} | ||
.content { | ||
padding: 2rem 2.5rem; | ||
@media (max-width: 719px) { | ||
padding: 1rem 2rem; | ||
} | ||
} | ||
.chooser { | ||
&-header { | ||
background-color: var(--c-bg-home); | ||
padding: 12px 36px; | ||
font-size: 1.2rem; | ||
} | ||
&-select { | ||
display: flex; | ||
justify-content: space-between; | ||
&-item { | ||
flex: 1; | ||
padding: 24px 36px; | ||
font-size: 1.2rem; | ||
font-weight: bold; | ||
cursor: pointer; | ||
background-color: var(--c-bg-dark); | ||
transition: background-color 0.3s ease; | ||
&:hover, &.selected { | ||
background-color: var(--c-primary); | ||
} | ||
} | ||
@media (max-width: 719px) { | ||
flex-direction: column; | ||
&-item { | ||
padding: 16px 36px; | ||
} | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 文档贡献指南 | ||
|
||
## 术语表 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 项目结构 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 从 v3 迁移 | ||
|
||
## 包名变更 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.1 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/472) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.2 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/482) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.3 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/501) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.4 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/522) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.5 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/552) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.6 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/578) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.7 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/625) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# v4.8 版本介绍 | ||
|
||
- [Roadmap](https://github.com/koishijs/koishi/issues/662) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 适配器 (Adapter) | ||
|
||
本章将介绍与适配器相关的内容,这是一个相当底层的概念,因此如果你并不打算编写一个平台实现,你完全可以跳过本章节。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 指令 (Command) | ||
|
||
指令系统是 Koishi 的核心功能之一。通过 `ctx.command()` 方法获得的是指令的实例,它含有下面的方法: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 上下文 (Context) | ||
|
||
**上下文 (Context)** 是 Koishi 的重要概念。你的每一个插件,中间件,监听器和指令都被绑定在上下文上。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 内置数据结构 | ||
|
||
Koishi 的数据库 API 实际上分为两部分: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 求值表达式 (Evaluation) | ||
|
||
## 数值运算 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 数据模型 (Model) | ||
|
||
## 数据类型 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 查询表达式 (Query) | ||
|
||
## 逻辑运算 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 术语表 | ||
|
||
本页收集了一些 Koishi 设计中的重要概念,按字母表序排列。如果你在阅读文档时对某个概念感到迷惑,可以随时回到这里查看解释。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 资源存储 (Assets) | ||
|
||
::: warning | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 机器人管理 (Bots) | ||
|
||
::: warning | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 国际化 (I18n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 事件系统 (Lifecycle) | ||
|
||
::: tip | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 输出与日志 | ||
|
||
::: danger 注意 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 插件系统 (Registry) | ||
|
||
## 实例属性 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
sidebarDepth: 2 | ||
--- | ||
|
||
# 网络服务 (Router) | ||
|
||
::: tip | ||
|
Oops, something went wrong.