reverted back from vue typescript to javascript to fix bad performance...
This commit is contained in:
@@ -9,18 +9,15 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
import BELayout from '@/layouts/BELayout.vue'
|
||||
import FlashMessages from '@/components/FlashMessages.vue'
|
||||
import { NMessageProvider } from 'naive-ui'
|
||||
|
||||
defineOptions({
|
||||
layout: BELayout
|
||||
})
|
||||
|
||||
const props = defineProps({
|
||||
flashMessages: Object
|
||||
})
|
||||
const props = defineProps(['flashMessages'])
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
@@ -12,16 +12,12 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import FlashMessages from '@/components/FlashMessages.vue'
|
||||
import { NMessageProvider } from 'naive-ui'
|
||||
|
||||
const props = defineProps({
|
||||
test: String,
|
||||
flashMessages: Object
|
||||
})
|
||||
const props = defineProps(['test', 'flashMessages'])
|
||||
|
||||
const helloWorld = ref<String>("helloWorld")
|
||||
const helloWorld = ref("helloWorld")
|
||||
|
||||
</script>
|
||||
@@ -45,10 +45,8 @@
|
||||
</n-form>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { FormInst } from 'naive-ui'
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import { NMessageProvider, NInput, NForm, NFormItem } from 'naive-ui'
|
||||
import { router } from '@inertiajs/vue3'
|
||||
import LoginLayout from '@/layouts/LoginLayout.vue'
|
||||
import FlashMessages from '@/components/FlashMessages.vue'
|
||||
@@ -61,7 +59,7 @@
|
||||
password: '',
|
||||
})
|
||||
|
||||
const formRef = ref<FormInst | null>(null)
|
||||
const formRef = ref(null)
|
||||
|
||||
const rules = ref({
|
||||
username: {
|
||||
@@ -77,7 +75,7 @@
|
||||
})
|
||||
|
||||
function onClickLogin(){
|
||||
formRef.value?.validate((errors: any) => {
|
||||
formRef.value?.validate((errors) => {
|
||||
if(!errors) router.post('login', form.value)
|
||||
})
|
||||
}
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script setup>
|
||||
</script>
|
||||
@@ -11,16 +11,12 @@
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
||||
import type { User } from '../../types/User'
|
||||
import type { DataTableColumns } from 'naive-ui'
|
||||
import type { VNode } from 'vue'
|
||||
<script setup>
|
||||
|
||||
import { h } from 'vue'
|
||||
import BELayout from '@/layouts/BELayout.vue'
|
||||
import FlashMessages from '@/components/FlashMessages.vue'
|
||||
import { NIcon, NButton, NDataTable, NMessageProvider } from 'naive-ui'
|
||||
import { NIcon, NButton } from 'naive-ui'
|
||||
|
||||
import {
|
||||
AdminPanelSettingsFilled as Admin,
|
||||
@@ -30,12 +26,9 @@ import {
|
||||
|
||||
defineOptions({ layout: BELayout })
|
||||
|
||||
const props = defineProps<{
|
||||
users?: User[],
|
||||
flashMessages?: Object
|
||||
}>()
|
||||
const props = defineProps(['users', 'flashMessages'])
|
||||
|
||||
const columns: DataTableColumns<User> = [
|
||||
const columns = [
|
||||
{
|
||||
title: "Admin",
|
||||
key: "is_admin",
|
||||
@@ -58,7 +51,7 @@ const columns: DataTableColumns<User> = [
|
||||
key: "actions",
|
||||
className: "space-x-4",
|
||||
render(row) {
|
||||
let arr: VNode[] = []
|
||||
let arr = []
|
||||
arr[0] = h(
|
||||
NButton,
|
||||
{
|
||||
@@ -84,11 +77,11 @@ const columns: DataTableColumns<User> = [
|
||||
}
|
||||
]
|
||||
|
||||
function clickEdit(id: Number){
|
||||
function clickEdit(id){
|
||||
console.log("Edit clicked: "+id)
|
||||
}
|
||||
|
||||
function clickDelete(id: Number){
|
||||
function clickDelete(id){
|
||||
console.log("Delete clicked: "+id)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup>
|
||||
import BELayout from '@/layouts/BELayout.vue'
|
||||
//import FlashMessages from '@/components/FlashMessages.vue'
|
||||
|
||||
defineOptions({ layout: BELayout })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user