Skip to content
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

自定义一个类似@opentiny/vue里面的组件并引入tiny-engine平台,编辑时显示,预览和导出代码到tiny-engine-generate-preview时不显示,tiny-engine-generate-preview的项目暂时是可以手动Install解决🐛 [Bug]: #451

Closed
sunyuehhh opened this issue Apr 25, 2024 · 3 comments

Comments

@sunyuehhh
Copy link

Environment

v18.20.2

Version

v18.20.2

Version

3.10.0

Link to minimal reproduction

https://www.npmjs.com/package/opentiny-vue-sy?activeTab=code

Step to reproduce

引入组件,拖到画布中,点击预览

What is expected

No response

What is actually happening

No response

What is your project name

tiny-engine

Any additional comments (optional)

No response

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: Customize a component similar to @opentiny/vue and introduce it into the tiny-engine platform. It will be displayed when editing. It will not be displayed when previewing and exporting the code to tiny-engine-generate-preview. tiny-engine-generate -Preview projects can be solved by manual installation for the time being🐛 [Bug]:

@sunyuehhh
Copy link
Author

解决了,需要在importMap文件中添加一下
const tinyVue3Imports = {
// 推荐之后统一使用@opentiny/vue去引入依赖,兼容后续录入的组件来源于tiny-vue
'@opentiny/vue': ${VITE_CDN_DOMAIN}/@opentiny/vue@${opentinyVueVersion}/runtime/tiny-vue.mjs,
'@opentiny/vue-icon': ${VITE_CDN_DOMAIN}/@opentiny/vue@${opentinyVueVersion}/runtime/tiny-vue-icon.mjs,
'@opentiny/vue-common': ${VITE_CDN_DOMAIN}/@opentiny/vue@${opentinyVueVersion}/runtime/tiny-vue-common.mjs,
'@opentiny/vue-locale': ${VITE_CDN_DOMAIN}/@opentiny/vue@${opentinyVueVersion}/runtime/tiny-vue-locale.mjs,
'@opentiny/vue-renderless/': ${VITE_CDN_DOMAIN}/@opentiny/vue-renderless@${opentinyVueVersion}/,
}

@chilingling
Copy link
Member

issue resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants