Skip to content

Commit

Permalink
feat:增加 Writeable 工具类型,可将只读属性转为可写
Browse files Browse the repository at this point in the history
  • Loading branch information
build-admin committed Jun 26, 2024
1 parent 75aafb7 commit a9cdcff
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 0 additions & 1 deletion web/src/components/baInput/components/baUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ defineOptions({
inheritAttrs: false,
})
type Writeable<T> = { -readonly [P in keyof T]: T[P] }
interface Props extends /* @vue-ignore */ Partial<UploadProps> {
type: 'image' | 'images' | 'file' | 'files'
// 上传请求时的额外携带数据
Expand Down
2 changes: 2 additions & 0 deletions web/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ interface ApiResponse<T = any> {
}

type ApiPromise<T = any> = Promise<ApiResponse<T>>

type Writeable<T> = { -readonly [P in keyof T]: T[P] }

0 comments on commit a9cdcff

Please sign in to comment.