arco-design-web-vue-mjs
v0.0.1
Published
将 @arco-design/web-vue 打包成一个mjs文件,方便通过ESM方式引入,实现Vue组件repl实时预览
Downloads
16
Readme
repl import maps 配置
{
"imports": {
"vue": "https://unpkg.com/[email protected]/dist/vue.runtime.esm-browser.js",
"vue/server-renderer": "https://unpkg.com/@vue/[email protected]/dist/server-renderer.esm-browser.js",
"vue-i18n": "https://unpkg.com/[email protected]/dist/vue-i18n.esm-browser.js",
"vue-router": "https://unpkg.com/[email protected]/dist/vue-router.esm-browser.js",
"@vue/devtools-api": "https://unpkg.com/@vue/[email protected]/lib/esm/index.js",
"@vueuse/core": "https://unpkg.com/@vueuse/[email protected]/index.mjs",
"@vueuse/shared": "https://unpkg.com/@vueuse/[email protected]/index.mjs",
"axios": "https://unpkg.com/[email protected]/dist/esm/axios.js",
"axios-mock-adapter": "https://unpkg.com/[email protected]/dist/axios-mock-adapter.js",
"@opentiny/tiny-engine-webcomponent-core": "https://unpkg.com/@opentiny/tiny-engine-webcomponent-core@1/dist/tiny-engine-webcomponent-core.es.js",
"@opentiny/tiny-engine-i18n-host": "https://unpkg.com/@opentiny/tiny-engine-i18n-host@1/dist/lowcode-design-i18n-host.es.js",
"@opentiny/tiny-engine-builtin-component": "https://unpkg.com/@opentiny/tiny-engine-builtin-component@1/dist/index.js",
"vue-demi": "https://unpkg.com/[email protected]/lib/index.mjs",
"pinia": "https://unpkg.com/[email protected]/dist/pinia.esm-browser.js",
"@opentiny/vue": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue.mjs",
"@opentiny/vue-icon": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue-icon.mjs",
"@opentiny/vue-common": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue-common.mjs",
"@opentiny/vue-locale": "https://unpkg.com/@opentiny/vue@~3.14/runtime/tiny-vue-locale.mjs",
"@opentiny/vue-renderless/": "https://unpkg.com/@opentiny/vue-renderless@~3.14/",
"element-plus": "https://unpkg.com/[email protected]/dist/index.full.mjs",
"@arco-design/web-vue": "http://localhost:3000/dist/full.min.mjs"
}
}// 注入组件
import ArcoDesign from '@arco-design/web-vue'
window.__app__.use(ArcoDesign)
// 导入样式
function addCss(href) {
const link = document.createElement('link')
link.setAttribute('rel', 'stylesheet')
link.setAttribute('href', href)
document.head.appendChild(link)
}
addCss("http://localhost:3000/dist/arco-full.css")# 访问文件跨域
npx serve . --cors