forked from geolba/tethys.backend
initial commit
This commit is contained in:
commit
4fc3bb0a01
202 changed files with 41729 additions and 0 deletions
70
resources/js/Pages/register-view/register-view-component.ts
Normal file
70
resources/js/Pages/register-view/register-view-component.ts
Normal file
|
@ -0,0 +1,70 @@
|
|||
import { Component, Vue, Prop } from 'vue-facing-decorator';
|
||||
import AuthLayout from '@/Layouts/Auth.vue';
|
||||
// import { Inertia } from '@inertiajs/inertia';
|
||||
import { NButton } from 'naive-ui';
|
||||
import { useForm, InertiaForm, router } from '@inertiajs/vue3';
|
||||
import FormInput from '@/Components/FormInput.vue'; // @/Components/FormInput.vue'
|
||||
// import { defineComponent, reactive } from 'vue';
|
||||
|
||||
// export default defineComponent({
|
||||
// layout: AuthLayout,
|
||||
|
||||
// components: {
|
||||
// NButton,
|
||||
// FormInput,
|
||||
// },
|
||||
|
||||
// setup() {
|
||||
// // const form = useForm({
|
||||
// // email: '',
|
||||
// // password: ''
|
||||
// // });
|
||||
// const form = reactive({
|
||||
// email: null,
|
||||
// password: null,
|
||||
// });
|
||||
|
||||
// const submit = async () => {
|
||||
// await Inertia.post('/app/register', form);
|
||||
// };
|
||||
|
||||
// return { form, submit };
|
||||
// },
|
||||
// });
|
||||
|
||||
export interface IErrorMessage {
|
||||
[key: string]: Array<string>;
|
||||
}
|
||||
|
||||
@Component({
|
||||
options: {
|
||||
layout: AuthLayout,
|
||||
},
|
||||
name: 'RegisterViewComponent',
|
||||
components: {
|
||||
NButton,
|
||||
FormInput,
|
||||
},
|
||||
})
|
||||
export default class RegisterViewComponent extends Vue {
|
||||
// Component Property
|
||||
@Prop({
|
||||
type: Object,
|
||||
default: () => ({}),
|
||||
})
|
||||
errors: IErrorMessage;
|
||||
|
||||
// Data Property
|
||||
form: InertiaForm<any> = useForm({
|
||||
email: '',
|
||||
password: '',
|
||||
});
|
||||
|
||||
results: Array<any> = [];
|
||||
|
||||
// Component method
|
||||
public async submit(): Promise<void> {
|
||||
// await Inertia.post('/app/register', this.form);
|
||||
await router.post('/app/register', this.form);
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue