Skip to content

Commit f0b6f35

Browse files
committed
update README
1 parent d2bbf77 commit f0b6f35

File tree

1 file changed

+35
-34
lines changed

1 file changed

+35
-34
lines changed

README.md

Lines changed: 35 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -49,45 +49,46 @@ body:
4949
</script>
5050
```
5151

52-
### Vue Modal Component
52+
### Vue Validator
5353

54-
prefix: modal
54+
prefix: validator
5555

5656
body:
57+
```
58+
Vue.validator("validatorName", function (val) {
59+
return true
60+
});
61+
```
5762

58-
<template>
59-
<modal :show.sync="showModal">
60-
<h2 slot="header">{{$t("change_password.title")}}</h2>
61-
<div slot="body">
62-
//You component contents goes here, only html.
63-
</div>
64-
<div slot="footer" class="text-center">
65-
</div>
66-
</modal>
67-
</template>
68-
69-
<script>
70-
import Modal from './interface/Modal.vue'
71-
72-
export default {
73-
name: "ComponentName",
74-
components: { Modal },
75-
data(){
76-
return {
77-
//Component Data
78-
showModal: false,
79-
}
80-
},
63+
### Vue Validator Local
64+
65+
prefix: validators
8166

82-
created(){
83-
//On Component created
84-
this.showModal = true;
85-
},
67+
body:
68+
```
69+
[..]
70+
validators: {
71+
nameOfValidator: function (val) {
72+
return true
73+
}
74+
},
75+
[...]
76+
```
8677

87-
methods: {
88-
functionExample(){
89-
//Basic Component method
78+
### Vue Router map
79+
80+
prefix: map
81+
82+
body:
83+
```
84+
router.map({
85+
'/example': {
86+
component: Example,
87+
subRoutes:{
88+
'/subrouter': {
89+
component: SubRouter
90+
}
9091
}
9192
}
92-
}
93-
</script>
93+
})
94+
```

0 commit comments

Comments
 (0)