Altra conversione in Typescript , partendo da un progetto di esempio funzionante...

This commit is contained in:
paolo
2018-11-02 20:30:53 +01:00
parent 42b5afd40a
commit 6b00f242ee
34 changed files with 53 additions and 53 deletions

View File

@@ -2,27 +2,27 @@ import { RouteConfig } from 'vue-router';
const routes: RouteConfig[] = [
{ path: '/', component: () => import('@/pages/Index.vue'), meta: { name: 'Home' } },
{ path: '/signup', component: () => import('@/components/views/login/signup.vue'), meta: { name: 'Registration' } },
{ path: '/signin', component: () => import('@/components/views/login/signin.vue'), meta: { name: 'Login' } },
{ path: '/vreg', component: () => import('@/components/views/login/vreg.vue'), meta: { name: 'Verify Reg' } },
{ path: '/signup', component: () => import('@/views/login/signup.vue'), meta: { name: 'Registration' } },
{ path: '/signin', component: () => import('@/views/login/signin.vue'), meta: { name: 'Login' } },
{ path: '/vreg', component: () => import('@/views/login/vreg.vue'), meta: { name: 'Verify Reg' } },
{
path: '/requestresetpwd',
component: () => import('@/components/views/login/requestresetpwd.vue'),
component: () => import('@/views/login/requestresetpwd.vue'),
meta: { name: 'Reset your Password' }
},
{
path: '/updatepwd',
component: () => import('@/components/views/login/updatepassword.vue'),
component: () => import('@/views/login/updatepassword.vue'),
meta: { name: 'Update your Password' }
},
{
path: '/simpleform',
component: () => import('@/components/views/form/simpleForm/simpleForm.vue'),
component: () => import('@/views/form/simpleForm/simpleForm.vue'),
meta: { name: 'SimpleForm' }
},
{
path: '/embeeded',
component: () => import('@/components/views/form/embeeded/embeeded.vue'),
component: () => import('@/views/form/embeeded/embeeded.vue'),
meta: { name: 'Embeeded' }
},
];

View File

@@ -56,7 +56,7 @@
import cardTodo from './cardTodo.vue'
import knobStatistics from './knobStatistics.vue'
import { mapActions } from 'vuex'
import * as types from '../../../../store/mutation-types'
import * as types from '../../../store/mutation-types'
export default {
name: 'Home',
mounted () {

View File

@@ -32,7 +32,7 @@
<script type="text/javascript">
/* eslint-disable */
import {mapActions} from 'vuex'
import * as types from '../../../store/mutation-types'
import * as types from '../../store/mutation-types'
import Vivus from 'vivus'
import logoData from './logoData'
import { Platform } from 'quasar'

View File

@@ -49,10 +49,10 @@
<script>
import {mapActions} from 'vuex'
import * as types from '../../../store/mutation-types'
import {Errori_MongoDb} from '../../../store/modules/user'
import * as types from '../../store/mutation-types'
import {Errori_MongoDb} from '../../store/modules/user'
import {serv_constants} from '../../../store/modules/serv_constants';
import {serv_constants} from '../../store/modules/serv_constants';
export default {

View File

@@ -62,10 +62,10 @@
} from 'vuelidate/lib/validators'
import {mapGetters, mapActions} from 'vuex'
import * as types from '../../../store/mutation-types'
import * as types from '../../store/mutation-types'
import {Errori_MongoDb} from '../../../store/modules/user'
import {serv_constants} from "../../../store/modules/serv_constants";
import {Errori_MongoDb} from '../../store/modules/user'
import {serv_constants} from "../../store/modules/serv_constants";
import axios from 'axios';
import {Loading, QSpinnerFacebook, QSpinnerGears} from 'quasar'

View File

@@ -110,9 +110,9 @@
import { validationMixin } from 'vuelidate';
import { mapGetters, mapActions } from 'vuex'
import * as types from '../../../store/mutation-types'
import * as types from '../../store/mutation-types'
import { Errori_MongoDb } from '../../../store/modules/user'
import { Errori_MongoDb } from '../../store/modules/user'
import axios from 'axios';
import { Loading, QSpinnerFacebook, QSpinnerGears } from 'quasar'
@@ -120,36 +120,6 @@
@Component({
mixins: [validationMixin],
data () {
return {
url: process.env.VUE_APP_URL,
form: {
email: process.env.TEST_EMAIL,
username: process.env.TEST_USERNAME,
password: process.env.TEST_PASSWORD,
repeatPassword: process.env.TEST_PASSWORD,
dateOfBirth: '',
terms: true,
},
duplicate_email: false,
duplicate_username: false,
}
},
computed: {
...mapGetters("user", [
'getUsername',
'getPassword',
'getEmail',
'getDateOfBirth',
]),
...mapGetters("user", [
'getUserServer',
'getServerCode',
]),
env () {
return env
},
},
validations: {
isAsync: true,
form: {
@@ -185,6 +155,36 @@
}
},
data () {
return {
url: process.env.VUE_APP_URL,
form: {
email: process.env.TEST_EMAIL,
username: process.env.TEST_USERNAME,
password: process.env.TEST_PASSWORD,
repeatPassword: process.env.TEST_PASSWORD,
dateOfBirth: '',
terms: true,
},
duplicate_email: false,
duplicate_username: false,
}
},
computed: {
...mapGetters("user", [
'getUsername',
'getPassword',
'getEmail',
'getDateOfBirth',
]),
...mapGetters("user", [
'getUserServer',
'getServerCode',
]),
env () {
return env
},
},
methods: {
...mapActions("user", {
signup: types.USER_SIGNUP,

View File

@@ -59,10 +59,10 @@
<script>
import {mapActions} from 'vuex'
import * as types from '../../../store/mutation-types'
import {Errori_MongoDb} from '../../../store/modules/user'
import * as types from '../../store/mutation-types'
import {Errori_MongoDb} from '../../store/modules/user'
import {serv_constants} from '../../../store/modules/serv_constants';
import {serv_constants} from '../../store/modules/serv_constants';
export default {

View File

@@ -31,10 +31,10 @@
<script>
import {mapActions} from 'vuex'
import * as types from '../../../store/mutation-types'
import {Errori_MongoDb} from '../../../store/modules/user'
import * as types from '../../store/mutation-types'
import {Errori_MongoDb} from '../../store/modules/user'
import {serv_constants} from '../../../store/modules/serv_constants';
import {serv_constants} from '../../store/modules/serv_constants';
export default {