Skip to content

Commit 5c60e7a

Browse files
uyarnWesley-0808github-actions[bot]tdesign-botliweijie0812
authored
chore: release 1.14.2-naruto (#3766)
* feat(Watermark): support layout API (#3726) * feat: support layout * chore: update snapshot --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: merge deploy mode (#3728) * chore(submodule): update common (#3736) * chore(submodule): update common * chore: fix typos --------- Co-authored-by: 黎伟杰 <[email protected]> * chore: add static prefix (#3737) * fix(Tabs): disable drag event registration in non-drag scenarios (#3738) * fix(textarea): add hide scrollbar when autosize is true (#3727) * fix(textarea): 修复内容超长情况下,设置 autosize 没有完整自动撑开高度,存在有滚动条的问题 fix #5567 * chore: update snapshot --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix(tabs): 示例文档文案错误 (#3741) * chore(submodule): update common (#3743) * fix(calendar): fix calendar range issues (#3759) * fix(calendar): 修复了当设定日历的range值为同一年内时,终止月份之后的月份选项没有正常禁用的问题 * fix(calendar): 修正了错误使用的rangeFromTo * fix(calendar): 修复了年份选项错误地使用了月份选项禁用范围判定逻辑的问题 Co-Authored-By: 刘宇轩 (刘lyxAndy) <[email protected]> --------- Co-authored-by: 刘宇轩 (刘lyxAndy) <[email protected]> * fix(menu): fix menu item auto-flip failure (#3744) * fix(popup): force update popper after animation completes * fix(popup): 支持自定义 popper 内容元素类型 * fix(popup): 修复 popperContentElement 的类型处理逻辑 * fix(popup): 添加 popperContentElement 的类型定义 * fix(popup): 修复 popperContentElement 的类型处理,确保正确类型转换 * feat(cascader): support parent node filtering (#3763) * feat(cascader): support parentnode filtering * chore: demo * chore: update snapshot * chore: docs * chore: docs * chore: release 1.14.2 (#3764) * chore: release 1.14.2 * chore: changelog's changes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: update snapshot * chore: release 1.14.2-naruto * chore: fix typo * chore: update common --------- Co-authored-by: Wesley <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: TDesign bot <[email protected]> Co-authored-by: 黎伟杰 <[email protected]> Co-authored-by: 阿菜 Cai <[email protected]> Co-authored-by: engvuchen <[email protected]> Co-authored-by: 树林 <[email protected]> Co-authored-by: 刘宇轩 (刘lyxAndy) <[email protected]>
1 parent c7cada9 commit 5c60e7a

File tree

34 files changed

+441
-113
lines changed

34 files changed

+441
-113
lines changed

CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ docClass: timeline
66
---
77

88

9+
## 🌈 1.14.2 `2025-11-07`
10+
### 🚀 Features
11+
- `Watermark`: 新增 `layout` API,支持生成不同布局的水印 @Wesley-0808 ([#3726](https://github.com/Tencent/tdesign-vue/pull/3726))
12+
- `Cascader`:
13+
- 支持 `filterable``checkStrictly``valueMode = parentFirst`配合使用,展示非叶子节点的效果 @uyarn ([#3763](https://github.com/Tencent/tdesign-vue/pull/3763))
14+
- `option` 新增`onChange``onExpand` 方法,用于多选场景下,自定义节点时自定义点击节点的触发逻辑,具体使用请参考自定义下拉选项的参考示例 @uyarn ([#3763](https://github.com/Tencent/tdesign-vue/pull/3763))
15+
### 🐞 Bug Fixes
16+
- `Cascader`:
17+
- 修复多选自定义节点无法进行展开处理的问题 @uyarn ([#3763](https://github.com/Tencent/tdesign-vue/pull/3763))
18+
- 修复`reserveKeyword` API 无效的问题 @uyarn ([#3763](https://github.com/Tencent/tdesign-vue/pull/3763))
19+
- `Watermark`:
20+
- 修复多行图文水印图片配置了灰度时,整个画布内容也会灰度的问题 @Wesley-0808 ([#3726](https://github.com/Tencent/tdesign-vue/pull/3726))
21+
- 修复 window 不存在场景,构建时报错的问题 @Wesley-0808([#3736](https://github.com/Tencent/tdesign-vue/pull/3736))
22+
- `Textarea`: 修复内容超长情况下,设置 `autosize` 没有完整自动撑开高度,存在有滚动条的问题 @engvuchen ([#3727](https://github.com/Tencent/tdesign-vue/pull/3727))
23+
- `Form`: 修复错误消息 `max``min` 英文翻译错误 @liweijie0812([#3743](https://github.com/Tencent/tdesign-vue/pull/3743))
24+
- `Calendar`:
25+
- 修复了年份选项错误地使用了月份选项禁用范围判定逻辑的问题 @shumuuu ([#3759](https://github.com/Tencent/tdesign-vue/pull/3759))
26+
- 修复了当设定日历的range值为同一年内时,终止月份之后的月份选项没有正常禁用的问题 @shumuuu ([#3759](https://github.com/Tencent/tdesign-vue/pull/3759))
27+
- `Menu`: 修复菜单项自动翻转失效的问题 @RSS1102 ([#3744](https://github.com/Tencent/tdesign-vue/pull/3744))
28+
29+
### 🚧 Others
30+
- `Tabs`: 在非拖拽场景下不注册拖拽事件 @RSS1102 ([#3738](https://github.com/Tencent/tdesign-vue/pull/3738))
31+
32+
933
## 🌈 1.14.1 `2025-09-22`
1034
### 🐞 Bug Fixes
1135
- `Watermark`: 修复 `1.14.0` 版本中多次引入水印组件出现节点渲染颜色过深的问题 @uyarn ([#3721](https://github.com/Tencent/tdesign-vue/pull/3721))

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tdesign-vue",
33
"purename": "tdesign",
4-
"version": "1.14.1-naruto",
4+
"version": "1.14.2-naruto",
55
"description": "tdesign-vue",
66
"title": "tdesign-vue",
77
"keywords": [
@@ -50,7 +50,6 @@
5050
"site": "cd site && npm run build",
5151
"site:prerender": "node script/prerender.mjs",
5252
"site:preview": "cd site && npm run build:preview",
53-
"site:intranet": "cd site && npm run build:intranet",
5453
"postsite:preview": "cp _site/index.html _site/404.html",
5554
"prebuild": "rimraf es/* esm/* lib/* cjs/* dist/* --glob",
5655
"build": "cross-env NODE_ENV=production rollup -c script/rollup.config.js && npm run build:tsc",

site/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"dev": "vite",
55
"build": "vite build",
66
"preview": "vite preview",
7-
"build:preview": "vite build --mode preview",
8-
"build:intranet": "vite build --mode intranet"
7+
"build:preview": "vite build --mode preview"
98
}
109
}

site/vite.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import tdocPlugin from './plugins/plugin-tdoc';
66

77
const publicPathMap = {
88
preview: '/',
9-
intranet: '/vue/',
109
production: 'https://static.tdesign.tencent.com/vue/',
1110
};
1211

src/calendar/calendar.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,11 +206,10 @@ export default mixins(getConfigReceiverMixins<Vue, CalendarConfig>('calendar')).
206206
}
207207

208208
for (let i = begin; i <= end; i++) {
209-
const disabled = this.checkMonthAndYearSelectorDisabled(i, this.curSelectedMonth);
210209
re.push({
211210
value: i,
212211
label: this.t(this.global.yearSelection, { year: i }),
213-
disabled,
212+
disabled: false,
214213
});
215214
}
216215
return re;
@@ -535,13 +534,19 @@ export default mixins(getConfigReceiverMixins<Vue, CalendarConfig>('calendar')).
535534
checkMonthAndYearSelectorDisabled(year: number, month: number): boolean {
536535
let disabled = false;
537536
if (this.rangeFromTo && this.rangeFromTo.from && this.rangeFromTo.to) {
537+
// 读取起止年份
538538
const beginYear = dayjs(this.rangeFromTo.from).year();
539539
const endYear = dayjs(this.rangeFromTo.to).year();
540-
if (year === beginYear) {
541-
const beginMon = parseInt(dayjs(this.rangeFromTo.from).format('M'), 10);
540+
// 读取起止月份
541+
const beginMon = parseInt(dayjs(this.rangeFromTo.from).format('M'), 10);
542+
const endMon = parseInt(dayjs(this.rangeFromTo.to).format('M'), 10);
543+
544+
if (beginYear === endYear) {
545+
// 同一年内,禁用开始月份至结束月份之外的月份选项
546+
disabled = month < beginMon || month > endMon;
547+
} else if (year === beginYear) {
542548
disabled = month < beginMon;
543549
} else if (year === endYear) {
544-
const endMon = parseInt(dayjs(this.rangeFromTo.to).format('M'), 10);
545550
disabled = month > endMon;
546551
}
547552
}

src/cascader/_example-composition/custom-options.vue

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<t-space>
2+
<t-space direction="vertical">
33
<!-- 方式一:使用 options 自定义下拉选项内容 -->
44
<t-cascader
55
v-model="value1"
@@ -33,6 +33,22 @@
3333
style="width: 300px"
3434
>
3535
</t-cascader>
36+
<t-cascader
37+
v-model="value4"
38+
:popup-props="{ overlayClassName: 'tdesign-demo-select__overlay-option' }"
39+
:options="options"
40+
multiple
41+
>
42+
<template #option="{ item, onChange }">
43+
<div class="tdesign-demo__user-option" @click="(e) => handleClick(item, onChange)">
44+
<img src="https://tdesign.gtimg.com/site/avatar.jpg" />
45+
<div class="tdesign-demo__user-option-info">
46+
<div>{{ item.label }}</div>
47+
<div>{{ item.value }}</div>
48+
</div>
49+
</div>
50+
</template>
51+
</t-cascader>
3652
</t-space>
3753
</template>
3854

@@ -42,6 +58,7 @@ import { ref, computed } from 'vue';
4258
const value1 = ref('');
4359
const value2 = ref('');
4460
const value3 = ref('');
61+
const value4 = ref([]);
4562
const options = ref([
4663
{
4764
label: '选项一',
@@ -97,6 +114,12 @@ const getDeepOptions = (options) => {
97114
}),
98115
}));
99116
};
117+
118+
const handleClick = (item, changeCallback) => {
119+
if (!Array.isArray(item.children)) {
120+
changeCallback();
121+
}
122+
};
100123
</script>
101124

102125
<style>

src/cascader/_example-composition/filterable.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<t-cascader v-model="value" :options="options" filterable clearable />
44
<t-cascader v-model="value2" :options="options" filterable clearable multiple :min-collapsed-num="2" />
55
<t-cascader v-model="value3" :filter="filterMethod" :options="options" clearable :min-collapsed-num="2" />
6+
<t-cascader v-model="value4" filterable :options="options" clearable multiple check-strictly />
67
</t-space>
78
</template>
89
<script setup>

src/cascader/_example/custom-options.vue

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<t-space>
2+
<t-space direction="vertical">
33
<!-- 方式一:使用 options 自定义下拉选项内容 -->
44
<t-cascader
55
v-model="value1"
@@ -9,10 +9,10 @@
99
/>
1010
<!-- 方式二:使用插槽自定义下拉选项内容 -->
1111
<t-cascader
12-
v-model="value2"
1312
:popupProps="{ overlayClassName: 'tdesign-demo-select__overlay-option' }"
1413
:options="options"
1514
style="width: 300px"
15+
multiple
1616
>
1717
<template v-slot:option="{ item }">
1818
<div class="tdesign-demo__user-option">
@@ -33,6 +33,22 @@
3333
style="width: 300px"
3434
>
3535
</t-cascader>
36+
<t-cascader
37+
v-model="value4"
38+
:popup-props="{ overlayClassName: 'tdesign-demo-select__overlay-option' }"
39+
:options="options"
40+
multiple
41+
>
42+
<template #option="{ item, onChange }">
43+
<div class="tdesign-demo__user-option" @click="(e) => handleClick(item, onChange)">
44+
<img src="https://tdesign.gtimg.com/site/avatar.jpg" />
45+
<div class="tdesign-demo__user-option-info">
46+
<div>{{ item.label }}</div>
47+
<div>{{ item.value }}</div>
48+
</div>
49+
</div>
50+
</template>
51+
</t-cascader>
3652
</t-space>
3753
</template>
3854

@@ -43,6 +59,7 @@ export default {
4359
value1: '',
4460
value2: '',
4561
value3: '',
62+
value4: [],
4663
options: [
4764
{
4865
label: '选项一',
@@ -105,6 +122,11 @@ export default {
105122
</div>
106123
);
107124
},
125+
handleClick(item, changeCallback) {
126+
if (!Array.isArray(item.children)) {
127+
changeCallback();
128+
}
129+
},
108130
},
109131
};
110132
</script>

src/cascader/_example/filterable.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<t-cascader v-model="value" :options="options" filterable clearable />
44
<t-cascader v-model="value2" :options="options" filterable clearable multiple :min-collapsed-num="2" />
55
<t-cascader v-model="value3" :filter="filterMethod" :options="options" clearable :min-collapsed-num="2" />
6+
<t-cascader v-model="value4" filterable :options="options" clearable multiple check-strictly />
67
</t-space>
78
</template>
89
<script>
@@ -46,6 +47,7 @@ export default {
4647
value: '',
4748
value2: ['1.1'],
4849
value3: '',
50+
value4: [],
4951
};
5052
},
5153
methods: {

0 commit comments

Comments
 (0)