Skip to content

Commit

Permalink
fix: 修复 f-select 组件配置 filter 绑定值错误的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyh2001 committed Mar 5, 2024
1 parent 92b3d4a commit c9c7d0b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 50 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

中文 | [英文](https://github.com/FightingDesign/fighting-design/blob/master/CHANGELOG.en-US.md)

## 0.67.3 (2024-03-05)

- 修复 `f-up-load` 组件配置 `show-list` 之后在特定情况下列表无法清空的问题
- 修复 `f-select` 组件配置 `filter` 绑定值错误的问题

## 0.67.2 (2024-03-01)

Expand Down
2 changes: 1 addition & 1 deletion packages/fighting-design/_hooks/use-page/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ export const usePage = (
/** 下一页更多图标的 visible */
const showNextMore = ref<boolean>(false)

watchEffect((): void => {
watchEffect(() => {
/** 当页码超过多少时开始展开省略符号 */
const pagerCount = Number(prop.pagerCount)
const halfPagerCount: number = (pagerCount - 1) / 2
Expand Down
2 changes: 1 addition & 1 deletion packages/fighting-design/input/src/input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
/** type 类型 */
const inputType = ref<InputType>(prop.type)
watchEffect((): void => {
watchEffect(() => {
inputType.value = prop.type
})
Expand Down
5 changes: 1 addition & 4 deletions packages/fighting-design/select/src/select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,6 @@
/** 当前绑定的值 */
const keyword = computed({
get: (): string => {
if (prop.filter) {
return modelValue.value.toString()
}
// 如果插槽没内容,则返回空字符串
if (!options.value.length) return ''
Expand Down Expand Up @@ -87,6 +83,7 @@
return (node as SelectChildren).children.default()[0].children === prop.modelValue
})
console.log(123)
/**
* 如果没有通过插槽找出和绑定值相同的
*
Expand Down
46 changes: 2 additions & 44 deletions start/src/App.vue
Original file line number Diff line number Diff line change
@@ -1,45 +1,3 @@
<template>
<f-button type="primary" @click="visible1 = true">打开</f-button>
<script lang="ts" setup></script>

<f-dialog v-model:visible="visible1" title="标题文字" :on-close-end="closeEnd">
这是一个 Dialog
<f-select v-model="value" placeholder="请选择……" filter>
<f-option v-for="(item, index) in data" :key="index" :value="item.id">{{
item.name
}}</f-option>
</f-select>

<f-up-load v-model:files="files" show-list multiple :on-change="change"></f-up-load>

<template #footer>
<f-button type="default">默认按钮</f-button>
<f-button type="primary">主要按钮</f-button>
</template>
</f-dialog>
</template>

<script setup lang="ts">
import { ref } from 'vue'
const value = ref('')
const visible1 = ref(false)
const files = ref([])
const closeEnd = () => {
files.value = []
console.log(files.value)
}
const change = file => {
console.log(file)
}
const data = ref([
{ id: 1, name: '张三' },
{ id: 2, name: '李四' },
{ id: 3, name: '王五' },
{ id: 4, name: '赵六' },
{ id: 5, name: '神器' },
{ id: 6, name: '奇迹' }
])
</script>
<template></template>

0 comments on commit c9c7d0b

Please sign in to comment.