Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export default myHelper {
- myHelperFunction(param) {
- return param;
- }
- }
- <template>
- <v-text-field :rules="[myRule]"></v-text-field>
- </template>
- <script>
- import myHelper from './myHelper.js';
- export default {
- name: 'MyComponent',
- data() {
- return {
- myCls: new myHelper(),
- myRule: this.callHelperFunction,
- };
- },
- components: {
- myHelper,
- },
- mounted() {
- this.myCls.myHelperFunction();
- },
- methods: {
- callHelperFunction(param) {
- this.myCls.myHelperFunction(param);
- }
- },
- };
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement