Skip to content

Commit

Permalink
release(v2.3.9): 发布了v2.3.9版本
Browse files Browse the repository at this point in the history
release(v2.3.9): 发布了`v2.3.9`版本
  • Loading branch information
HammCn authored Sep 24, 2024
2 parents 09542ad + 2cb5f02 commit daa16d6
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 22 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# AirPower4T 版本发布日志

## v2.3.9

### 🎉 Features:

- feat(Selector): 支持了传入选择器默认筛选器
- feat(Entity): 支持了一个链式调用的setDisable()方法

### 🐞 Bug fixes:

- fix(Selector): 修复树列表和不分页列表渲染失败的BUG
- fix(Input): 修复具名插槽不生效的BUG
- fix(Input): 修复`AInput``append`插槽和装饰器优先级
- fix(TableField): 修复ITableFieldConfig的绝对导入路径

## v2.3.8

### 🎉 Features:
Expand Down
9 changes: 9 additions & 0 deletions base/AirEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,13 @@ export class AirEntity extends AirModel {
excludeId(): this {
return this.exclude(AirConstant.ID)
}

/**
* ## 设置禁用
* @param isDisabled 禁用
*/
setDisable(isDisabled = true): this {
this.isDisabled = isDisabled
return this
}
}
20 changes: 7 additions & 13 deletions component/Input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,13 +167,13 @@
@blur="onBlur"
@focus="emits('focus')"
>
<template v-for="(index, name) in $slots">
<template
v-for="(index, name) in $slots"
#[name]
>
<slot :name="name">
<template v-if="name === 'append'">
{{ customAppend() }}
<template v-if="fieldConfig && fieldConfig.suffixText">
{{ fieldConfig?.suffixText }}
</template>
{{ fieldConfig?.suffixText }}
</template>
<template v-if="name == 'suffix'">
<el-icon
Expand All @@ -186,10 +186,10 @@
</slot>
</template>
<template
v-if="!isCustomAppend && fieldConfig && fieldConfig.suffixText"
v-if="!$slots.append && fieldConfig?.suffixText"
#append
>
{{ fieldConfig?.suffixText }}
{{ fieldConfig.suffixText }}
</template>
</el-input>
</div>
Expand Down Expand Up @@ -221,12 +221,6 @@ import { AirConstant } from '../config/AirConstant'
import { AirDecorator } from '../helper/AirDecorator'
import { AirDictionaryArray } from '../model/extend/AirDictionaryArray'
const isCustomAppend = ref(false)
function customAppend() {
isCustomAppend.value = true
}
const emits = defineEmits(['blur', 'onBlur', 'focus', 'onFocus', 'onChange', 'change', 'update:modelValue', 'onClear', 'clear'])
const props = defineProps({
Expand Down
14 changes: 8 additions & 6 deletions component/Selector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
:service="service"
:search-params="searchParamList"
:add-permission="addPermission"
:default-filter="props.props.param"
@on-search="onSearch"
@on-add="onAdd"
>
Expand All @@ -28,7 +29,7 @@
</template>
</AToolBar>
<ATable
:data-list="response.list"
:data-list="(unPaginate || treeList) ? list : response.list"
:show-select="props.props.mult"
:field-list="fields"
hide-delete
Expand Down Expand Up @@ -73,7 +74,7 @@
</ADialog>
</template>

<script lang="ts" setup generic="E extends AirEntity,S extends AirAbstractEntityService<E>,P extends AirEntity = E">
<script lang="ts" setup generic="E extends AirEntity,S extends AirAbstractEntityService<E>">
import { Component, computed } from 'vue'
import {
AButton, ADialog, APage, ATable, AToolBar,
Expand All @@ -89,6 +90,7 @@ import { AirDialog } from '../helper/AirDialog'
import { AirNotification } from '../feedback/AirNotification'
import { IUseSelectorOption } from '../interface/hooks/IUseSelectorOption'
import { AirRequestPage } from '../model/AirRequestPage'
import { AirAny } from '../type/AirType'
const props = defineProps<{
/**
Expand Down Expand Up @@ -137,6 +139,7 @@ const props = defineProps<{
* ## 选择器标题
*/
title?: string
/**
* ## 不分页
* 默认请求分页接口 如配置了 `treeList` 则此项自动失效
Expand Down Expand Up @@ -168,7 +171,7 @@ const props = defineProps<{
/**
* ## 查询参数
*/
param: P
param: AirAny
/**
* ## 是否多选
Expand Down Expand Up @@ -209,16 +212,15 @@ if (props.treeList) {
hookOptions.treeList = props.treeList
}
if (props.props.param) {
hookOptions.beforeSearch = (requestData: AirRequestPage<E>) => {
requestData.filter = Object.assign(requestData.filter, props.props.param)
}
hookOptions.defaultFilter = props.props.param
}
const {
title,
selectList,
isLoading,
response,
list,
disableConfirm,
onSearch,
onPageChanged,
Expand Down
2 changes: 1 addition & 1 deletion config/AirConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class AirConfig {
/**
* ## `AirPower` 版本号
*/
static readonly version = 'v2.3.8'
static readonly version = 'v2.3.9'

/**
* ## `AppKey`
Expand Down
1 change: 1 addition & 0 deletions interface/decorators/IFormFieldConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export interface IFormFieldConfig extends IFieldConfig {

/**
* ## 后置文字
* 优先级低于 `AInput` 的 `append` 插槽
*/
suffixText?: string;

Expand Down
4 changes: 2 additions & 2 deletions interface/decorators/ITableFieldConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import { IFieldConfig } from './IFieldConfig'
import {
AirMoneyDirection, AirSortable, AirTableAlign, AirTableFixed,
} from '../../type/AirType'
import { ClassConstructor } from '@/airpower/type/ClassConstructor'
import { AirEnum } from '@/airpower/base/AirEnum'
import { ClassConstructor } from '../../type/ClassConstructor'
import { AirEnum } from '../../base/AirEnum'

/**
* # 表格的字段配置接口
Expand Down

0 comments on commit daa16d6

Please sign in to comment.