Skip to content
This repository has been archived by the owner on May 7, 2022. It is now read-only.

支持加载 mipjs mipcss 组件js #1

Open
xuexb opened this issue Nov 23, 2017 · 4 comments
Open

支持加载 mipjs mipcss 组件js #1

xuexb opened this issue Nov 23, 2017 · 4 comments
Assignees

Comments

@xuexb
Copy link
Owner

xuexb commented Nov 23, 2017

No description provided.

@xuexb xuexb self-assigned this Nov 23, 2017
@xuexb
Copy link
Owner Author

xuexb commented Nov 23, 2017

比如要引用 mip.js 时输入 mipjs 按回车将自动插件 <script src="https://mipcache.bdstatic.com/static/v1/mip.js"></script> 这样的,同样的 mip.css 也同样语法。

但组件的文件如何引用呢?比如引用 <script src="https://mipcache.bdstatic.com/static/v1/mip-gototop/mip-gototop.js"></script> 这个,触发键用啥? loadmip-xxxx ?感觉不太好额。。。

@yugasun 感觉呢~

@yugasun
Copy link

yugasun commented Nov 24, 2017

@xuexb 我的想法是 输入 mipjs 然后提示所有 js列表,如果用户继续输入,比如 mipjsgoto 然后通过后面的 goto 检索出组件列表,当用户选择其中一个,回车后再注入 script 标签。

@xuexb
Copy link
Owner Author

xuexb commented Nov 24, 2017

额,你说这个 snippet 或可能实现不了。。。

@yugasun
Copy link

yugasun commented Nov 24, 2017

@xuexb 如果是没法展现搜索列表,我们可以折中实现,比如,你制定规则,基于关键字映射,直接写进说明文档,比如:

mipjs - <script src="https://mipcache.bdstatic.com/static/v1/mip.js"></script>
mipgototop - <script src="https://mipcache.bdstatic.com/static/v1/mip-gototop/mip-gototop.js"></script>

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

No branches or pull requests

2 participants