docs: readme

This commit is contained in:
ShawnPhang 2023-09-13 18:08:31 +08:00
parent 5d1491d0d9
commit df0bbb03ef
3 changed files with 10 additions and 12 deletions

View File

@ -1,4 +1,4 @@
**[在线体验](https://design.palxp.com/)** | **[中文文档网站](https://xp.palxp.cn/)** | [架构及目录说明](https://xp.palxp.cn/#/articles/1689321259854)
**[在线体验](https://design.palxp.cn/)** | **[中文文档网站](https://xp.palxp.cn/)** | [架构及目录说明](https://xp.palxp.cn/#/articles/1689321259854)
---
@ -55,10 +55,8 @@ npm run serve
> 将会同时运行前端界面与图片生成服务(`3000`端口为前端项目,`7001`端口为图片生成服务)
>
> ![](https://xp.palxp.cn/images/2023-7-16-1689498291322.png)
> 如果你本地没有成功启动两个服务,可能是 win 系统不兼容,手动进 `screenshot` 目录安装依赖(`npm install`)并启动服务(`npm run dev`)
> 或者使用 VSCode 自带的终端来运行命令,不要使用 CMD。
合成图片时本地会启动一个 Chrome 浏览器实例。
>
> 如果你本地没有成功启动两个服务,可能是 win 系统不兼容,手动进 `screenshot` 目录安装依赖(`npm install`)并启动服务(`npm run dev`) 或者使用 VSCode 自带的终端来运行命令,注意不要使用 CMD。
### 打包
@ -104,15 +102,15 @@ A本项目支持本地运行体验完整功能如需部署到生产
Q**后端源码不开源吗?**
A考虑到服务端的开发语言、数据库类型都可能不尽相同且本项目中实现简单代码不具备参考性所以暂时只提供接口 API 文档。(仅是一些增删改查,实现的技术难度并不高
A考虑到服务端的开发语言、数据库类型都可能不尽相同且本项目中实现简单代码不具备参考性所以暂时只提供接口 API 文档。(目前仅是一些增删改查)
### 其它
项目最早使用 Vue2 开发,后改用 Vue3 重构,所以有部分代码混合了 Options 写法。
或许你在工作中有类似的研发需求,或者对开发编辑器感兴趣,希望这个项目能给到你一些微薄帮助!
或许你在工作中有类似的需求,或许你也对开发编辑器感兴趣,希望这个项目能给到你一些微薄帮助!
目前本项目也还在不断迭代中,有很多的不足之处,我也是一边学习一边成长。开源不易,希望看到这里的你可以给本项目点个 **Star** 支持一下~ 感谢!
目前本项目也还在迭代中,有很多的不足,我也是一边学习一边成长。开源不易,希望看到这里的你可以给本项目点个 **Star** 支持一下~
[![Star History Chart](https://api.star-history.com/svg?repos=palxiao/poster-design&type=Date)](https://star-history.com/#palxiao/poster-design&Date)

View File

@ -3,7 +3,7 @@
* @Date: 2021-09-30 14:47:22
* @Description:
* @LastEditors: ShawnPhang <https://m.palxp.cn>
* @LastEditTime: 2023-09-12 11:18:10
* @LastEditTime: 2023-09-13 16:45:02
*/
const isDev = process.env.NODE_ENV === 'development'
const puppeteer = require('puppeteer')
@ -19,7 +19,7 @@ const saveScreenshot = async (url: string, { path, width, height, thumbPath, siz
return new Promise(async (resolve: Function) => {
// 启动浏览器
const browser = await puppeteer.launch({
headless: !isDev,
headless: true, // !isDev,
executablePath: isDev ? null : executablePath,
ignoreHTTPSErrors: true, // 忽略https安全提示
args: ['no-first-run', 'single-process', 'disable-gpu', 'no-zygote', 'disable-dev-shm-usage', '--no-sandbox', '--disable-setuid-sandbox', `--window-size=${width},${height}`], // 优化配置

View File

@ -3,7 +3,7 @@
* @Date: 2021-08-01 11:12:17
* @Description: 前端出图 - 用于封面
* @LastEditors: ShawnPhang <https://m.palxp.cn>
* @LastEditTime: 2023-09-13 17:36:36
* @LastEditTime: 2023-09-13 17:44:29
-->
<template>
<div id="cover-wrap"></div>
@ -31,7 +31,7 @@ export default defineComponent({
proxy?.updateZoom(100)
const opts = {
useCORS: true, //
scale: 0.1,
scale: 0.2,
}
setTimeout(async () => {
const clonePage: HTMLElement = document.getElementById('page-design-canvas').cloneNode(true)