From 6abe3bb5b1389f72c6388d990a2e5a68b6f2c111 Mon Sep 17 00:00:00 2001
From: ningmengchongshui <916415899@qq.com>
Date: Mon, 10 Jun 2024 10:05:51 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=88=AA=E5=9B=BE?=
=?UTF-8?q?=E5=A4=84=E7=90=86=E7=B1=BB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
example/apps.ts | 7 +++++++
{src => example}/hello.tsx | 0
example/index.tsx | 25 +++++++++++++++++++++++++
src/utils/component.ts | 9 +++++----
4 files changed, 37 insertions(+), 4 deletions(-)
create mode 100644 example/apps.ts
rename {src => example}/hello.tsx (100%)
create mode 100644 example/index.tsx
diff --git a/example/apps.ts b/example/apps.ts
new file mode 100644
index 0000000..5101381
--- /dev/null
+++ b/example/apps.ts
@@ -0,0 +1,7 @@
+import { Messages } from '../src/core/index.js'
+const message = new Messages({
+ priority: 9000
+})
+message.response(/^你好/, async e => {
+ e.reply('你好')
+})
diff --git a/src/hello.tsx b/example/hello.tsx
similarity index 100%
rename from src/hello.tsx
rename to example/hello.tsx
diff --git a/example/index.tsx b/example/index.tsx
new file mode 100644
index 0000000..af1d4d0
--- /dev/null
+++ b/example/index.tsx
@@ -0,0 +1,25 @@
+import React from 'react'
+import { Component, Puppeteer } from '../src/utils/index.js'
+import Hello from './hello.tsx'
+const Com = new Component()
+const Pup = new Puppeteer()
+export class Image {
+ constructor() {
+ // 启动
+ Pup.start()
+ }
+ /**
+ *
+ * @returns
+ */
+ async getHelloComponent() {
+ // 生成 html 地址
+ const Address = Com.create(