Skip to content

Commit

Permalink
fix(Props): 修复类型约束后代码不提示类型注释
Browse files Browse the repository at this point in the history
  • Loading branch information
HammCn committed Aug 22, 2023
1 parent 77af3f7 commit 5061786
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 3 additions & 4 deletions config/AirProps.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import { PropType } from 'vue'
import { AirEntity } from '../base/AirEntity'
import { AirProps } from '../type/AirType'

/**
* # 使用无参DialogProps配置
* @author Hamm
*/
export function airProps(): AirProps {
export function airProps() {
return {
/**
* # 弹窗的确认按钮被点击事件
Expand Down Expand Up @@ -38,7 +37,7 @@ export function airProps(): AirProps {
* ### 💡 [可选]泛型: Param的类型
* @param value [可选]默认参数
*/
export function airPropsParam<P>(value: P | null = null): AirProps {
export function airPropsParam<P>(value: P | null = null) {
return Object.assign(airProps(), {
/**
* # 支持一个传入参数
Expand Down Expand Up @@ -68,7 +67,7 @@ export function airPropsId() {
*/
export function airPropsSelector<
S extends AirEntity = AirEntity, P extends AirEntity = AirEntity
>(value: P | null = null): AirProps {
>(value: P | null = null) {
return Object.assign(airProps(), {
/**
* # 是否使用多选
Expand Down
3 changes: 0 additions & 3 deletions type/AirType.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { ElForm, ElTable, ElTree } from 'element-plus'

import type Node from 'element-plus/es/components/tree/src/model/node'
import { IJson } from '../interface/IJson'

/**
* # 一些定义的类型
Expand Down Expand Up @@ -32,5 +31,3 @@ export type AirTreeNode = Node;
* # 图标类型字符串类型
*/
export type AirIconType = 'DELETE_LIST' | 'DELETE' | 'EDIT' | 'DETAIL' | 'ADD' | 'FINISH' | 'SEARCH' | 'SETTING' | 'PUBLISH' | 'SAVE' | 'EXPORT' | 'IMPORT' | 'MORE' | 'LOCK' | 'UPLOAD' | 'LOGOUT' | 'DOWNLOAD' | 'CHECKIN' | 'SELECT' | 'MOVE_UP' | 'MOVE_DOWN' | 'CONFIRM' | 'CHECKBOX' | 'CLOCK' | 'MONITOR' | 'COMPARE' | 'CLOSE'

export type AirProps = IJson

0 comments on commit 5061786

Please sign in to comment.