Skip to content

Commit 2bfd31c

Browse files
anlyyaozydemailmimaoxiaogoldjunkratwaiterxiaoyy
authored
feat: add chat series components (#4010)
* feat(site): add AI Chat routing * chore(demo): update demo * chore: update the directory structure again * chore: update liveUrl for dev * feat: update qrcode for page * docs: update title * feat(chat): 更新聊天组件及相关示例代码 * fix: 修改common路径 * fix: 修改代码引入路径 * fix: attachments对齐pc端 * fix: chat-loading样式问题修复 * feat(site): add AI Chat routing * chore(demo): update demo * chore: update the directory structure again * chore: update liveUrl for dev * feat: update qrcode for page * docs: update title * feat(chat): 更新聊天组件及相关示例代码 * fix: 修改common路径 * fix: 修改代码引入路径 * fix: attachments对齐pc端 * fix: chat-loading样式问题修复 * style: fixed multiple style errors * fix(site): fix page path error * style(demo): fix style * fix: 修复chatContentProps的使用问题 * chore: fixed multiple errors in multiple components * feat: 文案调整 * feat: chat图片示例调整 * style(ChatMarkdown): use css token * fix(ChatActionbar): update demo * chore: styleIsolation configuration is migrated from options to json * fix: chat示例样式调整;chatSender示例增加背景色;chatSender组件输入框的最大最小高度按照按照rpx传值 * feat(ChatActionBar): update icon * feat(ChatLoading): change circle to dots type * chore(ChatActionbar): named according to BEM * chore(ChatLoading): named according to BEM * chore(ChatThinking): named according to BEM * chore(ChatContent): named according to BEM * refactor(ChatList): remove old chat example files and add new chat list component with examples * feat: 补充遗漏样式 * chore(Attachments): named according to BEM * chore(ChatMessage): named according to BEM * chore: update app.json * chore(ChatMarkdown): named according to BEM * chore(ChatSender): named according to BEM * chore(ChatList): named according to BEM * chore: format * feat: 更改为tdesign-miniprogram引入chat组件 * feat(ChatList): add scrollToBottom method demo * fix: 修复多个组件示例源码展示问题 * docs: update README * docs: update getting-started * feat: 完善文档 * feat: 新增错误状态 * fix: remove isMarkdown property * refactor: rename event from handleAction to actions in ChatActionbar component * refactor: rename event from expandChange to collapsedChange in ChatThinking component * fix: 修复思考过程内容首行换行问题 * feat: refactor: 移除 imageProps 属性,新增 FileItem 尺寸及模式属性 * docs: update README to clarify items property description in attachments * docs: 移除 chat-sender 组件 update:visible 事件说明 * fix(demo): fixed multiple style issues * fix(demo): fixed multiple style issues * feat(ChatSender): 修改文档描述 * feat(Attachments): use the multiply icon instead * fix(ChatLoading): fix text spacing error * refactor(ChatSender): remove type property from upload configuration and update related logic * chore(site): update site.config.mjs file * chore(ChatMessage): setting max-width * fix(Attachments): fix file margin-top erro * feat: 更新聊天内容类型及界面插槽名称 * refactor: 移除未使用样式及更新注释描述 * style: 移除 chat-actionbar 组件未使用样式代码 * docs(Chat): update api docs (#4038) * docs(Chat): update api docs * docs: update * chore: using props.ts file * fix(Demo): fix multiple example bugs * chore: remove irrelevant content * feat: 新增动画与状态属性,优化消息结构及性能 * refactor: update submodule * fix(chat-list): 修复控制台告警 * docs: add code snippet link (#4041) * chore: update _common * fix(Demo): fix console warnings * docs: add code snippet link * docs: remove irrelevant changelogs * docs(chat): fix doc link (#4051) * docs(chat): fix doc link * chore: fix doc * docs: update api docs --------- Co-authored-by: zydemail <1054055589@qq.com> Co-authored-by: nekowu <1142809915@qq.com> Co-authored-by: seerzhang@tencent.com <1016217659@qq.com> Co-authored-by: waiterxiaoyy <738294518@qq.com> Co-authored-by: liweijie0812 <674416404@qq.com>
1 parent da1ff2a commit 2bfd31c

File tree

535 files changed

+10236
-9788
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

535 files changed

+10236
-9788
lines changed

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
**/*.wxs
22
miniprogram_dist
33
node_modules
4+
5+
# special files
6+
echarts.js

.github/workflows/typos-config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ nd = "nd"
99
loosing = "loosing"
1010

1111
[files]
12-
extend-exclude = ["CHANGELOG*.md", "changelog.json"]
12+
extend-exclude = ["CHANGELOG*.md", "changelog.json", "echarts.js"]

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
"build:assets": "cross-env NODE_ENV=production gulp assets:build --gulpfile script/gulpfile.dist.js --cwd ./",
2020
"update:icons": "pnpm -C packages/tdesign-miniprogram/site update:icons",
2121
"update:css": "pnpm -C packages/tdesign-miniprogram/site update:css",
22-
"lintfix": "eslint '{packages/components,packages/tdesign-miniprogram/example}/**/*.{js,ts}' --fix",
23-
"lint": "eslint '{packages/components,packages/tdesign-miniprogram/example}/**/*.{js,ts}'",
24-
"format": "prettier {packages/components,packages/tdesign-miniprogram/example,script}/**/*.{js,ts,wxss,less,wxml,html,json,md,wxs} --write",
22+
"lintfix": "eslint '{packages/components,packages/pro-components,packages/tdesign-miniprogram/example}/**/*.{js,ts}' --fix",
23+
"lint": "eslint '{packages/components,packages/pro-components,packages/tdesign-miniprogram/example}/**/*.{js,ts}'",
24+
"format": "prettier {packages/components,packages/pro-components,packages/tdesign-miniprogram/example,script}/**/*.{js,ts,wxss,less,wxml,html,json,md,wxs} --write",
2525
"site": "pnpm -C packages/tdesign-miniprogram/site site",
2626
"site:dev": "pnpm -C packages/tdesign-miniprogram/site site:dev",
2727
"site:prerender": "pnpm -C packages/tdesign-miniprogram/site site:prerender",
@@ -119,4 +119,4 @@
119119
"eslint --fix"
120120
]
121121
}
122-
}
122+
}

packages/components/common/style/theme/_dark.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@
129129
--td-bg-color-secondarycontainer-active: var(--td-gray-color-11); // 色彩 - 次级容器 - active
130130
--td-bg-color-component-active: var(--td-gray-color-10); // 色彩 - 组件 - active
131131
--td-bg-color-component-disabled: var(--td-gray-color-12); // 色彩 - 组件 - disabled
132+
--td-bg-color-secondarycomponent: var(--td-gray-color-10); // 色彩 - 次级组件
133+
--td-bg-color-secondarycomponent-active: var(--td-gray-color-8); // 色彩 - 次级组件 - active
132134

133135
// 特殊组件背景色,目前只用于 button、input 组件多主题场景,浅色主题下固定为白色,深色主题下为 transparent 适配背景颜色
134136
--td-bg-color-specialcomponent: transparent;

packages/components/form-item/form-item.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@ import { validate, ValidateStatus } from './form-model';
33
import config from '../common/config';
44
import { SuperComponent, wxComponent, RelationsOptions } from '../common/src/index';
55

6-
76
const { prefix } = config;
87
const name = `${prefix}-form-item`;
98

109
@wxComponent()
1110
export default class FormItem extends SuperComponent {
1211
externalClasses = [
13-
1412
`${prefix}-class`,
1513
`${prefix}-class-label`,
1614
`${prefix}-class-controls`,
@@ -21,7 +19,6 @@ export default class FormItem extends SuperComponent {
2119
properties = props as any;
2220

2321
data = {
24-
2522
prefix,
2623
classPrefix: name,
2724
errorList: [],
@@ -36,7 +33,6 @@ export default class FormItem extends SuperComponent {
3633
};
3734

3835
relations: RelationsOptions = {
39-
4036
'../form/form': {
4137
type: 'parent',
4238
linked(target) {
@@ -78,7 +74,6 @@ export default class FormItem extends SuperComponent {
7874
};
7975

8076
lifetimes = {
81-
8277
ready() {
8378
this.initFormItem();
8479
},
@@ -90,7 +85,6 @@ export default class FormItem extends SuperComponent {
9085
};
9186

9287
methods = {
93-
9488
// 处理描述信息链接点击事件
9589
handlePreviewImage(e) {
9690
const { url } = e.currentTarget.dataset;
@@ -272,4 +266,3 @@ export default class FormItem extends SuperComponent {
272266
},
273267
};
274268
}
275-

packages/components/form-item/props.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const props: TdFormItemProps = {
1919
/** 表单项说明内容 */
2020
help: {
2121
type: String,
22-
2322
},
2423
/** 字段标签名称 */
2524
label: {
@@ -52,7 +51,6 @@ const props: TdFormItemProps = {
5251
showErrorMessage: {
5352
type: null,
5453
value: undefined,
55-
5654
},
5755
};
5856

packages/components/form/_example/horizontal/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ Component({
206206
},
207207

208208
onRemove(e) {
209-
const {index} = e.detail;
210-
const {photo} = this.data.formData;
209+
const { index } = e.detail;
210+
const { photo } = this.data.formData;
211211
photo.splice(index, 1);
212212
this.setData({
213213
'formData.photo': photo,

packages/components/form/_example/vertical/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ Component({
202202
},
203203

204204
onRemove(e) {
205-
const {index} = e.detail;
206-
const {photo} = this.data.formData;
205+
const { index } = e.detail;
206+
const { photo } = this.data.formData;
207207
photo.splice(index, 1);
208208
this.setData({
209209
'formData.photo': photo,

packages/components/tab-panel/tab-panel.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<view
44
wx:if="{{!lazy || hasActivated}}"
55
class="class {{prefix}}-class {{classPrefix}} {{active ? classPrefix + '--active': classPrefix + '--inactive'}}"
6-
style="{{_._style([style, customStyle, (hide ? 'display: none' : '')])}}"
6+
style="{{_._style([style, customStyle, (hide ? 'display: none;' : '')])}}"
77
id="{{id}}"
88
aria-role="tabpanel"
99
>

packages/components/tabs/tabs.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@tabs: ~'@{prefix}-tabs';
44
@item: ~'@{tabs}__item';
55

6-
@tab-font-size: var(--td-tab-font-size, 28rpx);
6+
@tab-font-size: var(--td-tab-font-size, @font-size-base);
77
@tab-nav-bg-color: var(--td-tab-nav-bg-color, @bg-color-container);
88

99
@tab-item-height: var(--td-tab-item-height, 96rpx);

0 commit comments

Comments
 (0)