Skip to content

Commit

Permalink
fix: create-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
logustra committed Mar 11, 2021
1 parent b7aa46e commit b58120b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
8 changes: 4 additions & 4 deletions create/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -275,25 +275,25 @@ const createModule = {
}

const actions = {
'atom': componentName => {
'atoms': componentName => {
name = componentName

createComponent.default('atoms')
},

'molecule': componentName => {
'molecules': componentName => {
name = componentName

createComponent.default('molecules')
},

'organism': componentName => {
'organisms': componentName => {
name = componentName

createComponent.default('organisms')
},

'template': componentName => {
'templates': componentName => {
name = componentName

createComponent.default('templates')
Expand Down
19 changes: 12 additions & 7 deletions create/templates/components/vexample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,27 @@

<script lang="ts">
import {
Vue,
Component
} from 'vue-property-decorator'
defineComponent,
onMounted
} from 'vue'
export default defineComponent({
name: 'VExample',
const Props = Vue.extend({
props: {
example: {
type: String,
required: true,
default: ''
}
},
setup (props) {
onMounted (() => {
console.log(props.example)
})
}
})
@Component
export default class VExample extends Props {}
</script>

<style lang="scss">
Expand Down

0 comments on commit b58120b

Please sign in to comment.