fix: tsx type errors

This commit is contained in:
0xJacky 2024-01-14 11:03:30 +08:00
parent 85da74b3f0
commit e093d9276c
No known key found for this signature in database
GPG key ID: B6E4A6E4A561BAF0
7 changed files with 375 additions and 376 deletions

View file

@ -1,6 +1,6 @@
{
"name": "nginx-ui-app-next",
"version": "2.0.0-beta.9",
"version": "2.0.0-beta.10",
"type": "module",
"scripts": {
"dev": "vite",
@ -13,12 +13,12 @@
"dependencies": {
"@ant-design/icons-vue": "^7.0.1",
"@formkit/auto-animate": "^0.8.0",
"@vue/reactivity": "^3.3.10",
"@vue/shared": "^3.3.10",
"@vueuse/core": "^10.6.1",
"ant-design-vue": "4.0.8",
"apexcharts": "^3.36.3",
"axios": "^1.6.2",
"@vue/reactivity": "^3.4.13",
"@vue/shared": "^3.4.13",
"@vueuse/core": "^10.7.2",
"ant-design-vue": "4.1.0",
"apexcharts": "^3.45.1",
"axios": "^1.6.5",
"dayjs": "^1.11.10",
"highlight.js": "^11.9.0",
"lodash": "^4.17.21",
@ -45,30 +45,30 @@
"@types/lodash": "^4.14.202",
"@types/nprogress": "^0.2.0",
"@types/sortablejs": "^1.15.0",
"@typescript-eslint/eslint-plugin": "^6.13.0",
"@typescript-eslint/parser": "^6.13.0",
"@vitejs/plugin-vue": "^4.5.0",
"@typescript-eslint/eslint-plugin": "^6.18.1",
"@typescript-eslint/parser": "^6.18.1",
"@vitejs/plugin-vue": "^5.0.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vue/compiler-sfc": "^3.3.10",
"@vue/tsconfig": "^0.4.0",
"ace-builds": "^1.32.0",
"@vue/compiler-sfc": "^3.4.13",
"@vue/tsconfig": "^0.5.1",
"ace-builds": "^1.32.3",
"autoprefixer": "^10.4.16",
"eslint": "^8.56.0",
"eslint-import-resolver-alias": "^1.1.2",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-regex": "^1.10.0",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-vue": "^9.18.1",
"eslint-plugin-vue": "^9.20.1",
"less": "^4.2.0",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.7",
"typescript": "^5.3.2",
"unplugin-auto-import": "^0.17.1",
"unplugin-vue-components": "^0.25.2",
"unplugin-vue-define-options": "^1.4.0",
"postcss": "^8.4.33",
"tailwindcss": "^3.4.1",
"typescript": "^5.3.3",
"unplugin-auto-import": "^0.17.3",
"unplugin-vue-components": "^0.26.0",
"unplugin-vue-define-options": "^1.4.1",
"vite": "^5.0.11",
"vite-svg-loader": "^5.1.0",
"vue-tsc": "^1.8.22"
"vue-tsc": "^1.8.27"
}
}

694
app/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
// text, record, index, column
import dayjs from 'dayjs'
import type { JSX } from 'vue/jsx-runtime'
export interface customRender {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@ -20,7 +21,7 @@ export const date = (args: customRender) => {
return dayjs(args.text).format('YYYY-MM-DD')
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const mask = (args: customRender, maskObj: any) => {
export const mask = (args: customRender, maskObj: any): JSX.Element => {
let v
if (typeof maskObj?.[args.text] === 'function')

View file

@ -1,6 +1,6 @@
<script setup lang="tsx">
import { Form } from 'ant-design-vue'
import type { Column } from '@/components/StdDesign/types'
import type { Column, JSXElements } from '@/components/StdDesign/types'
import StdFormItem from '@/components/StdDesign/StdDataEntry/StdFormItem.vue'
const props = defineProps<{
@ -42,7 +42,7 @@ function extraRender(extra?: string | (() => string)) {
}
function Render() {
const template = []
const template: JSXElements = []
props.dataList.forEach((v: Column) => {
let show = true

View file

@ -1,5 +1,7 @@
import Curd, {Pagination} from '@/api/curd'
import { Ref } from 'vue'
import type { JSX } from 'vue/jsx'
export type JSXElements = JSX.Element[]
export interface StdDesignEdit {
type?: function // component type

View file

@ -1 +1 @@
{"version":"2.0.0-beta.9","build_id":104,"total_build":308}
{"version":"2.0.0-beta.10","build_id":108,"total_build":312}

View file

@ -1 +1 @@
{"version":"2.0.0-beta.9","build_id":104,"total_build":308}
{"version":"2.0.0-beta.10","build_id":108,"total_build":312}