Comments (2)
嗯嗯,感谢分享,我们近期也有参考volar对目前mpx插件进行升级重构的计划,也会重点完善模版提示相关的内容。
from mpx.
再补充一个,mpx组件/页面的代码模板填充可以使用 vscode 自带的 Code snippets 完成。
创建文件 .vscode/mpx.code-snippets
{
"mpx component": {
"scope": "vue",
"prefix": ["component"],
"body": [
"<template></template>",
"",
"<script lang=\"ts\">",
"import { createComponent } from '@mpxjs/core'",
"",
"createComponent({})",
"</script>",
"",
"<style scoped></style>",
"",
"<script type=\"application/json\">",
"{",
"\t\"usingComponents\": {}",
"}",
"</script>",
""
],
"description": "生成组件代码"
},
"mpx page": {
"scope": "vue",
"prefix": ["page"],
"body": [
"<template></template>",
"",
"<script lang=\"ts\">",
"import { createPage } from '@mpxjs/core'",
"",
"createPage({})",
"</script>",
"",
"<style scoped></style>",
"",
"<script type=\"application/json\">",
"{",
"\t\"usingComponents\": {}",
"}",
"</script>",
""
],
"description": "生成页面代码"
}
}
这样就可以在mpx文件中 输入 component/page 快速生成组件/页面代码了
from mpx.
Related Issues (20)
- [Bug report]初始化 npm run serve失败,用了楼上的方法仍然失败 HOT 2
- [Bug report]重新安装脚手架后无法create项目
- [Bug report] `mpx.xfetch`的TS类型报错 HOT 1
- <input> does not support [confirm-type] property in bytedance environment![Bug report] HOT 1
- [Bug report] 多次修改样式调试时报:Cannot read property 'call' of undefined HOT 20
- [Bug report]原子类与scoped 样式隔离bug HOT 2
- Skyline是否支持 HOT 1
- webstorm 2024.1.1什么时候支持mpx插件呢 HOT 2
- [Bug report] 关于编译过程中修改样式导致小程序预览提示报错。 HOT 1
- [Bug report] wxml 存在 <template is="xxx" /> 引用模板的时候,template 里边的事件没法编译,使用不了proxyEventHandler HOT 3
- 请问有能让astro或mdx支持适配mpx的集成包吗 HOT 2
- [Feature Request] 支持 Skyline app-bar(全局工具栏) HOT 2
- [Bug report] 接入火山埋点SDK后报错 HOT 1
- [Bug report]@mpxjs/size-report 插件启动可视化平台显示异常 HOT 1
- setComponentRef 方法在支付宝的分包异步化下读缓存是否存在问题? HOT 1
- 是否支持 自动生成页面分包 json 和 统一生成页面路径 .js 或 .ts HOT 4
- [Bug report]是否支持getOpenerEventChannel HOT 4
- [Bug report] wx:class 不兼容多个 class name HOT 1
- [Feature Request] 支持支付宝端的自定义 tabBar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mpx.