docs: 修改提示和增加代码片段
This commit is contained in:
parent
f3b6eb9878
commit
f33675cd1a
|
@ -1 +1,46 @@
|
||||||
{}
|
{
|
||||||
|
"Test Plugin Class": {
|
||||||
|
"prefix": "plugin",
|
||||||
|
"body": [
|
||||||
|
"import { Plugin } from 'yunzai/core'",
|
||||||
|
"export class App extends Plugin {",
|
||||||
|
" constructor() {",
|
||||||
|
" super()",
|
||||||
|
" this.rule = [",
|
||||||
|
" $1",
|
||||||
|
" ]",
|
||||||
|
" }",
|
||||||
|
"}"
|
||||||
|
],
|
||||||
|
"description": "Create a new App plugin class for Yunzai"
|
||||||
|
},
|
||||||
|
"Image Class with Puppeteer": {
|
||||||
|
"prefix": "image",
|
||||||
|
"body": [
|
||||||
|
"import React from 'react'",
|
||||||
|
"import { Component, Puppeteer } from 'yunzai/utils'",
|
||||||
|
"const Com = new Component()",
|
||||||
|
"export class Image {",
|
||||||
|
" Pup: typeof Puppeteer.prototype = null",
|
||||||
|
" constructor() {",
|
||||||
|
" // init",
|
||||||
|
" this.Pup = new Puppeteer()",
|
||||||
|
" // start",
|
||||||
|
" this.Pup.start()",
|
||||||
|
" }",
|
||||||
|
" /**",
|
||||||
|
" * 为指定用户生成html 生成指定数据下的html文件",
|
||||||
|
" * @returns",
|
||||||
|
" */",
|
||||||
|
" createHello(uid: number, Props) {",
|
||||||
|
" const Address = Com.create(<></>, {",
|
||||||
|
" join_dir: 'hello',",
|
||||||
|
" html_name: `${uid}.html`,",
|
||||||
|
" })",
|
||||||
|
" return this.Pup.render(Address)",
|
||||||
|
" }",
|
||||||
|
"}"
|
||||||
|
],
|
||||||
|
"description": "Creates a class that utilizes Puppeteer from yunzai/utils for rendering HTML."
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
16
README.md
16
README.md
|
@ -1,14 +1,12 @@
|
||||||
# Miao-Yunzai
|
# Miao-Yunzai
|
||||||
|
|
||||||
你应该积极使用 V3 ,它仍然是长期支持并维护的版本
|
|
||||||
|
|
||||||
> 必要环境 Windows/Linux + Chrome/Chromium/Edge
|
> 必要环境 Windows/Linux + Chrome/Chromium/Edge
|
||||||
|
|
||||||
> 必要环境 Node.js>16.14.0 + Redis>5.0.0
|
> 必要环境 Node.js>16.14.0 + Redis>5.0.0
|
||||||
|
|
||||||
> 推荐环境 Node.js@18.18.2 + Rediss@6.0.0
|
> 推荐环境 Node.js@18.18.2 + Rediss@6.0.0
|
||||||
|
|
||||||
[!点击阅读Miao-Yunzai文档了解更多](https://ningmengchongshui.github.io/Miao-Yunzai-Docs/)
|
[☞点击阅读文档了解更多](https://ningmengchongshui.github.io/Miao-Yunzai-Docs/)
|
||||||
|
|
||||||
## 使用教程
|
## 使用教程
|
||||||
|
|
||||||
|
@ -60,18 +58,6 @@ npm run app
|
||||||
npm run login
|
npm run login
|
||||||
```
|
```
|
||||||
|
|
||||||
- 托管
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run start
|
|
||||||
```
|
|
||||||
|
|
||||||
- 杀死进程
|
|
||||||
|
|
||||||
```sh
|
|
||||||
npm run kill
|
|
||||||
```
|
|
||||||
|
|
||||||
## 致谢
|
## 致谢
|
||||||
|
|
||||||
| Nickname | Contribution |
|
| Nickname | Contribution |
|
||||||
|
|
Loading…
Reference in New Issue