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)
- [Feature Request] 希望增加开关控制是否将 unocss 写的临时 px 值在编译结果里转换为 rpx HOT 8
- [Bug report]编译为支付宝小程序不会处理custom-tab-bar目录 HOT 1
- 微信 转 web 时使用 `relations` 建立组件关系,使用`getRelationNodes`获取关联组件报错 HOT 1
- [Bug report] 首次运行pnpm run serve出错 HOT 1
- [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 1
- 请问有能让astro或mdx支持适配mpx的集成包吗 HOT 2
- [Feature Request] 支持 Skyline app-bar(全局工具栏)
- [Bug report] 接入火山埋点SDK后报错 HOT 1
- [Bug report]@mpxjs/size-report 插件启动可视化平台显示异常
- setComponentRef 方法在支付宝的分包异步化下读缓存是否存在问题?
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.