Commit 3a886778 authored by toby's avatar toby

补全模板

parent 6f61b712
var app = require('core')
app.regDirective('<$= name $>', ['$timeout', 'Sys', function($timeout, Sys) {
return {
restrict: 'EA',
transclude: true,
replace: true,
template: __inline('./<$= name $>.tpl'),
scope: {},
link: function(scope, element, attrs, ctrl, transclude) {
},
controller: ['$scope', function(scope) {
}]
}
}]
\ No newline at end of file
.M-<$= className $> {
}
\ No newline at end of file
<section class="M-<$= className $>"></section>
\ No newline at end of file
function Controller(scope,Sys,$timeout) {
}
module.exports = function(mod, app) {
mod.controller('<$= moduleName $>', ['$scope', 'Sys', '$timeout', Controller])
}
\ No newline at end of file
.P-<$= className $> {
}
\ No newline at end of file
<section class="P-<$= className $>"></section>
\ No newline at end of file
import React, {Component} from 'react'
class <$= name | capitalize $> extends Component {
constructor(props) {
super(props)
this.state = {}
}
componentWillMount() {
}
componentDidMount() {
}
componentWillUnmount() {
}
}
export default <$= name | capitalize $>
\ No newline at end of file
.M-<$= className $> {
}
\ No newline at end of file
var Vue = require('vue')
module.exports = Vue.extend({
template: __inline('./<$= name $>.tpl'),
props: {}
})
\ No newline at end of file
.M-<$= className $> {
}
\ No newline at end of file
<div class="M-<$= className $>">
</div>
\ No newline at end of file
var Vue = require('vue')
module.exports = Vue.extend({
template: __inline('./_view/<$= name $>.tpl'),
data: function() {
return {}
},
beforeDestroy: function() {
},
created: function() {
},
route: {
data: function(transition) {
}
},
methods: {
},
components: {
}
})
\ No newline at end of file
.P-<$= className $> {
}
\ No newline at end of file
<section class="P-<$= className $>">
</section>
\ No newline at end of file
<template>
<section class="M-<$= name $>"></section>
</template>
<script>
export default {
props: {
},
data() {
return {}
},
methods: {
}
}
</script>
<style lang="less" scoped>
@import '~common/var';
.M-<$= name $> {}
</style>
<template>
<section class="P-<$= name $>"></section>
</template>
<script>
export default {
data() {
return {}
},
beforeRouteEnter(to, from, next) {
next()
},
created() {
},
methods: {
},
components: {
}
}
</script>
<style lang="less" scoped>
@import '~common/var';
.P-<$= name $> {}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment