-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨Q&A:常见问题答疑-第二弹 #366
Comments
Title: ✨Q&A: Frequently Asked Questions-Part 2 |
问题四:本地使用mockServer时,可以正常出码,但是使用本地连接服务端时,点击出码按钮会报错:不支持的浏览器。 A:当前下载文件的api限制只能用https与本地的安全协议(localhost),若需要支持http请求,则需自行开发在不支持https的场景下,下载为zip压缩包的功能 |
Question 4: When using mockServer locally, the code can be output normally. However, when using the local connection server, clicking the code output button will report an error: Unsupported browser. |
本地启动时报错:PageSetting.vue:69 Uncaught ReferenceError: ref is not defined 解决方案:更新develop最新代码,报错原因是:由于当前我们并没有锁定间接依赖的版本,所以在我们重新执行npm install时,代码里用的babel里一套间接依赖最近发了新包,这个新包与老的plugin-vue-jsx不兼容,相当于你的node_modules里拥有了新的babel,但是用的是老的vuejsx。所以需要升级vue-jsx。 具体解决的pr在 #347 |
问题:保存源码到本地,为什么会变成下载zip |
Question: When saving the source code locally, why does it become a download zip |
问题:如何在TinyEngine绑定ref 答 问题:服务器部署之后需要使用https访问吗? 问题: 请求canvas时,想直接请求canvas.html,不需要路径转换,如何处理? 问题:对于官方提供的element-plus表格组件,右侧属性column绑定变量没有在画布中呈现 布局里绝对定位相关问题,可检查一下此pr #751 答:3.14下的tinyvue应该要搭配 vue3.4.23 |
问题一: 本地执行pnpm dev启动,页面一直loading,进不去
答:
使用开发者工具看一下控制台是否产生报错,若报错如下:
GET https://npm.onmicrosoft.cn/@opentiny/vue-theme-3.11/index.css net::ERR ABORTED 403 (URLGolbalBlocked)
Access to script at "https://npm.onmicrosoft.cn/vue@3/dist/vue.runtime.esm-browser.js' from origin "http://127.0.0.1:888/ 127.0.0.1/:1g’ has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://npm.onmicrosoft.cn/vue@3/dist/vue.runtime.esm-browser.js net: :ERR_FAILED
解决方案
当前使用的cdn地址为:"npm.onmicrosoft.cn",这个地址用户的电脑可能访问不了,导致无法拿到我们依赖的组件库等内容,可尝试将npm.onmicrosoft.cn替换为unpkg.com,替换文件和位置如下:
packages/design-core/.env.development
image
packages/design-core/.env.prod
image
packages/blockToWebComponentTemplate/vite.config.js
image
在tiny-engine项目中,找到以上文件,把对应的字符串npm.onmicrosoft.cn替换为unpkg.com,替换后保存重新启动项目
问题二:本地启动没有问题,打包好之后部署到环境上,报错如下(或类似):
解决方案
当前使用的cdn地址为:"npm.onmicrosoft.cn",这个地址用户的电脑可能访问不了,导致无法拿到我们依赖的组件库等内容,可尝试将npm.onmicrosoft.cn替换为unpkg.com,替换文件和位置如下:
packages/design-core/.env.development
image
packages/design-core/.env.prod
image
packages/blockToWebComponentTemplate/vite.config.js
image
在tiny-engine项目中,找到以上文件,把对应的字符串npm.onmicrosoft.cn替换为unpkg.com,替换后保存重新打包部署。
问题三:本地执行打包命令后,生成的产物在哪个文件夹?
答: tiny-engine/packages/design-core/dist/
The text was updated successfully, but these errors were encountered: