Comments (4)
@tua-mp/service v0.1.5 已内置 yaml 的支持了~
from tua-mp.
我第一反应是在 template 里写 lang="yaml"
,然后写个 loader 把 yaml 转 json 就行,晚上我试试看哈...
from tua-mp.
我试了下可以,装一个 yaml-loader,然后在 tua-mp.config.js 里加一下 loader 配置
module.exports = {
chainWebpack: (config) => {
config.module
.rule('yaml')
.test(/\.yaml$/)
.use('yaml').loader('yaml-loader')
}
}
最后比如在 Todos.vue 里这么写就行了
<config lang="yaml">
navigationBarTitleText: 'tua-mp todos'
usingComponents:
Todo: ./comps/Todo/Todo
Filter: /comps/Filter/Filter
</config>
from tua-mp.
可以参阅
- https://github.com/tuateam/tua-mp-service
- https://cli.vuejs.org/guide/webpack.html#simple-configuration
from tua-mp.
Related Issues (20)
- 兼容原生 setData
- 重新赋值后,依赖没有被继承
- 数组中嵌套较深的元素没有继承依赖
- 组件这边要一遍一遍写 index.js index.vue HOT 2
- project.config.json 建议放在项目的根目录 HOT 2
- computed 函数被误触发了多次
- 合并 @tua-mp/cli 和 @tua-mp/service 到主仓库中
- 希望支持vue的mixins HOT 1
- service 兼容 vue cli v3 的系列 plugin
- 框架定义的内部属性例如 `__TUA_PATH__` 应该是不可枚举的 HOT 1
- 支持 babel v7
- watch 函数中 setter 失效 HOT 1
- 请问如何引入原生自定义组件? HOT 1
- 在 created/onLoad 中触发 setter,组件的 props 并不会更新
- 原生 setData 处理过程中又触发了 setter 造成更新数据死循环
- 使用 TypeScript 重构
- 升级 rollup 到 v1.0
- feat(cli): 支持自定义模板
- feat(cli): auto generate index.d.ts for apis
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 tua-mp.