Skip to content

Commit 9051185

Browse files
uyarntdesign-botngyyuusoraliweijie0812github-actions[bot]
authored
chore: release 1.12.0-naruto (#3621)
* chore: add CHANGELOG (#3569) * chore(submodule): update _common (#3571) * refactor(upload): missing custom fail text implemention (#3574) * chore: update snapshots (#3575) * chore: update snapshots * chore: update snapshot --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * feat(Icon): upgrade tdesign-icons-vue to 0.3.5 (#3577) * feat(select): add option removal handling for multiple selection (#3582) (#3584) * feat(select): add option removal handling for multiple selection (#3582) * chore: naming * chore: naming --------- Co-authored-by: wū yāng <[email protected]> * fix(Select): 修复valueType:object与keys同时设置时的绑定值错误 (#3583) * refactor(color-picker): ensure mode switches based on color value (#3572) * refactor(color-picker): ensure mode switches based on color value * fix(color-picker): ensure gradient and alpha values update correctly * chore: update snapshots * fix(color-picker): update alpha format handling * fix(color-picker): ensure `onChange` includes `color` and `trigger` * fix(color-picker): avoid color update failure in controlled mode * chore: update common * refactor(color-picker): replace logic with functions from common repo * fix(color-picker): incorrect format mapping * chore(color-picker): remove `onClear` * chore: update submodule * docs(color-picker): remove the undeveloped `clear` event * chore: update snapshots * refactor(color-picker): remove unnecessary logic * chore: update snapshot * refactor(color-picker): exclude non-gradient values in gradient-only mode * docs(color-picker): update types and remove undeveloped props * fix(radio-group): highlight failure --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * fix(tag): allow title rendering without max-width restriction (#3592) * chore(submodule): update _common (#3593) * fix(docs): add English component import for Guide (#3595) * feat(tag-input): show move cursor when draggable (#3594) * feat(tag-input): show move cursor when draggable * chore: update snapshot --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * docs: update Chinese title for Dark Mode (#3596) * feat(InputNumber): add `enableRound` support to `decimalPlaces` prop (#3601) * chore(ci): generation vue pkg templates (#3603) * chore(ci): generation vue pkg templates * fix: change package manager from pnpm to npm in template generation script * fix: update package manager to pnpm in workflow and template generation script * 更新 pkg-pr-new.yml * 更新 pkg-pr-new-generate-template.mjs * 更新 pkg-pr-new-generate-template.mjs * 更新 pkg-pr-new-generate-template.mjs * 更新 pkg-pr-new-generate-template.mjs * chore: update diff --------- Co-authored-by: liweijie0812 <[email protected]> * chore: optimize CHANGELOG.md file size (#3606) * chore: optimize CHANGELOG.md file size * chore: update typos config * docs: A new contributor graph that evaluates community activities from all dimensions (#3605) * docs: A new contributor graph that evaluates community activities from all dimensions. * chore: update params * chore: update params * Update README-zh_CN.md * Update README.md * Update README-zh_CN.md --------- Co-authored-by: wū yāng <[email protected]> Co-authored-by: liweijie0812 <[email protected]> * fix(drawer): `cancel-btn` and `confirm-btn` type supports `null` (#3612) * chore: pin cssstyle 4.3.1 (#3618) * fix(Table): sync columnCheckboxKeys on close (#3616) * fix(demo-page): remove`undefined` demo path and sort demos (#3615) refactor(demo-page): 重构 demos 页面优化路由监听及渲染逻辑 * chore: fix win run build (#3617) * chore: fix win run build * chore: add @types/node --------- Co-authored-by: Uyarn <[email protected]> * fix(date-picker): using `popupProps` to control `visible` results in not being able to select time (#3600) * feat(tree): expand-all reactive (#3619) * chore: release 1.12.0 (#3620) * chore: release 1.12.0 * chore: changelog's changes --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> * chore: release 1.12.0-naruto * chore: fix lint * chore: update snapshot --------- Co-authored-by: TDesign bot <[email protected]> Co-authored-by: ngyyuusora <[email protected]> Co-authored-by: liweijie0812 <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: richardji202 <[email protected]> Co-authored-by: MorningUei <[email protected]> Co-authored-by: Rylan <[email protected]> Co-authored-by: betavs <[email protected]> Co-authored-by: 阿菜 Cai <[email protected]> Co-authored-by: Shinji-Li <[email protected]>
1 parent 998da23 commit 9051185

Some content is hidden

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

41 files changed

+3318
-2533
lines changed

.github/workflows/pkg-pr-new.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ jobs:
2323

2424
- run: npm run build
2525

26-
- run: npx pkg-pr-new publish --compact
26+
- run: node ./script/workflows/pkg-pr-new-generate-template.mjs
27+
28+
- run: npx pkg-pr-new publish --compact --template 'tdesign-vue2-demo/**'
29+

.github/workflows/typos-config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ ba = "ba"
44
thead = "thead"
55

66
[files]
7-
extend-exclude = ["CHANGELOG.md"]
7+
extend-exclude = ["CHANGELOG*.md"]

CHANGELOG-0.x.md

Lines changed: 2577 additions & 0 deletions
Large diffs are not rendered by default.

CHANGELOG.md

Lines changed: 268 additions & 1731 deletions
Large diffs are not rendered by default.

README-zh_CN.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ TDesign 欢迎任何愿意参与贡献的参与者。如果需要本地运行代
7676

7777
## 贡献成员
7878

79-
<a href="https://github.com/tencent/tdesign-vue/graphs/contributors">
80-
<img src="https://contrib.rocks/image?repo=tencent/tdesign-vue" />
79+
<a href="https://openomy.app/github/tencent/tdesign-vue" target="_blank" style="display: block; width: 100%;" align="center">
80+
<img src="https://openomy.app/svg?repo=tencent/tdesign-vue&chart=bubble&latestMonth=12" target="_blank" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
8181
</a>
8282

8383
# 反馈

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Contributing is welcome. Read [guidelines for contributing](https://github.com/T
7878

7979
## Contributors
8080

81-
<a href="https://github.com/tencent/tdesign-vue/graphs/contributors">
82-
<img src="https://contrib.rocks/image?repo=tencent/tdesign-vue" />
81+
<a href="https://openomy.app/github/tencent/tdesign-vue" target="_blank" style="display: block; width: 100%;" align="center">
82+
<img src="https://openomy.app/svg?repo=tencent/tdesign-vue&chart=bubble&latestMonth=12" target="_blank" alt="Contribution Leaderboard" style="display: block; width: 100%;" />
8383
</a>
8484

8585
# Feedback

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tdesign-vue",
33
"purename": "tdesign",
4-
"version": "1.11.2-naruto",
4+
"version": "1.12.0-naruto",
55
"description": "tdesign-vue",
66
"title": "tdesign-vue",
77
"keywords": [
@@ -96,7 +96,7 @@
9696
"mitt": "^3.0.0",
9797
"raf": "^3.4.1",
9898
"sortablejs": "^1.15.0",
99-
"tdesign-icons-vue": "^0.3.4",
99+
"tdesign-icons-vue": "^0.3.5",
100100
"tinycolor2": "^1.4.2",
101101
"validator": "^13.5.1"
102102
},
@@ -143,6 +143,7 @@
143143
"cli-color": "^2.0.0",
144144
"commitizen": "^4.0.3",
145145
"cross-env": "^7.0.2",
146+
"cssstyle": "4.3.1",
146147
"cypress": "^13.12.0",
147148
"cz-conventional-changelog": "^3.3.0",
148149
"dom-parser": "^0.1.6",
@@ -174,11 +175,11 @@
174175
"rollup-plugin-ignore-import": "^1.3.2",
175176
"rollup-plugin-multi-input": "^1.1.1",
176177
"rollup-plugin-postcss": "^4.0.1",
177-
"rollup-plugin-static-import": "^0.1.1",
178+
"rollup-plugin-static-import": "^1.0.0",
178179
"rollup-plugin-styles": "^4.0.0",
179180
"rollup-plugin-terser": "~7.0.2",
180181
"rollup-plugin-vue": "^5.1.9",
181-
"tdesign-icons-view": "^0.3.5",
182+
"tdesign-icons-view": "^0.3.6",
182183
"tdesign-publish-cli": "^0.0.12",
183184
"tdesign-site-components": "^0.13.0",
184185
"tdesign-theme-generator": "^1.0.5",
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
import { execSync } from 'child_process';
2+
import { join } from 'path';
3+
import {
4+
rmSync, writeFileSync, readFileSync, existsSync, mkdirSync,
5+
} from 'fs';
6+
7+
const PROJECT_NAME = 'tdesign-vue2-demo';
8+
9+
const TEMPLATES = {
10+
MAIN_JS: `
11+
import Vue from 'vue'
12+
import TDesign from 'tdesign-vue'
13+
import App from './App.vue'
14+
import 'tdesign-vue/dist/tdesign.css'
15+
16+
Vue.use(TDesign)
17+
18+
new Vue({
19+
render: h => h(App)
20+
}).$mount('#app')
21+
`,
22+
23+
APP_VUE: `
24+
<template>
25+
<config-provider :global-config="zhCN">
26+
<Demo />
27+
</config-provider>
28+
</template>
29+
30+
<script>
31+
import zhCN from 'tdesign-vue/es/locale/zh_CN'
32+
33+
export default {
34+
components: {
35+
Demo: () => import('./Demo.vue')
36+
},
37+
data() {
38+
return {
39+
zhCN
40+
}
41+
}
42+
}
43+
</script>
44+
`,
45+
46+
DEMO_VUE: `
47+
<template>
48+
<t-button>按钮</t-button>
49+
</template>
50+
51+
<script>
52+
export default {}
53+
</script>
54+
`,
55+
56+
VITE_CONFIG_JS: `
57+
import { createVuePlugin } from 'vite-plugin-vue2'
58+
59+
export default {
60+
plugins: [
61+
createVuePlugin()
62+
],
63+
resolve: {
64+
alias: {
65+
'@': '/src'
66+
}
67+
}
68+
}
69+
`,
70+
};
71+
72+
function buildExample(projectName, vueVersion, compilerVersion, baseProjectPath, extraDeps = {}) {
73+
const actualProjectName = `${projectName}-compiler-${compilerVersion.replace('~', '').split('.').slice(0, 2).join('-')}`;
74+
75+
console.log(`正在创建项目 ${actualProjectName}...`);
76+
77+
const execPath = baseProjectPath || process.cwd();
78+
79+
execSync(`npm create vite@latest ${actualProjectName} -- --template vanilla`, { stdio: 'inherit', cwd: execPath });
80+
81+
const projectPath = join(execPath, actualProjectName);
82+
83+
const paths = {
84+
main: join(projectPath, 'src/main.js'),
85+
app: join(projectPath, 'src/App.vue'),
86+
demo: join(projectPath, 'src/Demo.vue'),
87+
packageJson: join(projectPath, 'package.json'),
88+
viteConfig: join(projectPath, 'vite.config.js'),
89+
counterJs: join(projectPath, 'src/counter.js'),
90+
styleCss: join(projectPath, 'src/style.css'),
91+
javascriptSvg: join(projectPath, 'src/javascript.svg'),
92+
};
93+
94+
const pkg = JSON.parse(readFileSync(paths.packageJson, 'utf8'));
95+
pkg.dependencies = {
96+
...pkg.dependencies,
97+
vue: vueVersion,
98+
'tdesign-vue': 'latest',
99+
'vue-template-compiler': compilerVersion,
100+
...extraDeps,
101+
};
102+
103+
pkg.devDependencies = {
104+
...pkg.devDependencies,
105+
'vite-plugin-vue2': '^2.0.3',
106+
vite: '^4.4.5',
107+
};
108+
109+
writeFileSync(paths.packageJson, JSON.stringify(pkg, null, 2));
110+
111+
// 删除不需要的文件
112+
[paths.counterJs, paths.styleCss, paths.javascriptSvg].forEach((file) => {
113+
if (existsSync(file)) rmSync(file);
114+
});
115+
116+
// 写入新文件
117+
writeFileSync(paths.main, TEMPLATES.MAIN_JS.trim());
118+
writeFileSync(paths.app, TEMPLATES.APP_VUE.trim());
119+
writeFileSync(paths.demo, TEMPLATES.DEMO_VUE.trim());
120+
writeFileSync(paths.viteConfig, TEMPLATES.VITE_CONFIG_JS.trim());
121+
122+
console.log(`项目 ${actualProjectName} 创建成功!请运行以下命令:\ncd ${actualProjectName} && pnpm install && pnpm dev`);
123+
}
124+
125+
try {
126+
mkdirSync(PROJECT_NAME, { recursive: true });
127+
const projectPath = join(process.cwd(), PROJECT_NAME);
128+
buildExample(PROJECT_NAME, '~2.6.10', '~2.6.10', projectPath);
129+
} catch (error) {
130+
console.error('构建过程中发生错误:', error);
131+
process.exit(1);
132+
}

site/site.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ const docs = [
6060
componentEn: () => import('@common/theme.en-US.md'),
6161
},
6262
{
63-
title: '暗黑模式',
63+
title: '深色模式',
6464
titleEn: 'Dark Mode',
6565
name: 'dark-mode',
6666
path: '/vue/dark-mode',
@@ -630,6 +630,7 @@ const docs = [
630630
name: 'guide',
631631
path: '/vue/components/guide',
632632
component: () => import('tdesign-vue/guide/guide.md'),
633+
componentEn: () => import('tdesign-vue/guide/guide.en-US.md'),
633634
},
634635
{
635636
title: 'Message 全局提示',

site/src/components/demo-page.vue

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
2-
<component v-if="demo" :is="demo"></component>
2+
<component v-if="demoComponent" :is="demoComponent"></component>
33
<ul class="empty-demo" v-else>
4-
<li v-for="demoName in demoList[componentName]" :key="demoName">
4+
<li v-for="demoName in demoList[componentName] || []" :key="demoName">
55
<router-link :to="{ path: `/vue/demos/${componentName}/${demoName}` }">
66
<t-button theme="default" variant="text">{{ demoName }}</t-button>
77
</router-link>
@@ -16,22 +16,19 @@ const demoObject = {};
1616
const demoList = {};
1717
Object.keys(demoReq).forEach((key) => {
1818
const match = key.match(/([\w-]+)._example.([\w-]+).vue/);
19-
const [, componentName, demoName] = match;
19+
if (!match) return;
2020
21+
const [, componentName, demoName] = match;
2122
demoObject[`${componentName}-${demoName}`] = demoReq[key].default;
22-
demoList[componentName] = [demoName].concat(demoList[componentName]);
23+
demoList[componentName] = (demoList[componentName] ?? []).concat(demoName);
2324
});
2425
2526
export default {
2627
name: 'demos',
2728
28-
components: {
29-
...demoObject,
30-
},
31-
3229
data() {
3330
return {
34-
demo: null,
31+
demoComponent: null,
3532
demoList,
3633
};
3734
},
@@ -40,31 +37,24 @@ export default {
4037
componentName() {
4138
return this.$route.params.componentName;
4239
},
43-
currentDemos() {
44-
return this.demoList[this.componentName].join('<br />');
40+
demoKey() {
41+
const { componentName, demoName } = this.$route.params;
42+
return componentName && demoName ? `${componentName}-${demoName}` : null;
4543
},
4644
},
4745
4846
watch: {
49-
$route(v) {
50-
if (v.name !== 'demos') return;
51-
this.renderDemo();
47+
'$route.params': {
48+
handler() {
49+
this.renderDemo();
50+
},
51+
immediate: true,
5252
},
5353
},
5454
55-
mounted() {
56-
this.renderDemo();
57-
},
58-
5955
methods: {
6056
renderDemo() {
61-
const { componentName, demoName } = this.$route.params;
62-
console.log('%c 所有 demo 路径参考: \n', 'color: #0052d9;', demoObject);
63-
if (componentName && demoName) {
64-
this.demo = `${componentName}-${demoName}`;
65-
} else {
66-
this.demo = '';
67-
}
57+
this.demoComponent = this.demoKey ? demoObject[this.demoKey] : null;
6858
},
6959
},
7060
};

src/_common

Submodule _common updated 87 files

src/auto-complete/_usage/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<script setup lang="jsx">
1111
/* eslint-disable */
12-
import { ref, onMounted } from '@vue/composition-api';
12+
import { ref, onMounted } from 'vue';
1313
import configJson from './props.json';
1414
1515
const configList = ref(configJson);

src/color-picker/_usage/props.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
[
2-
{
3-
"name": "closeBtn",
4-
"type": "Boolean",
5-
"defaultValue": true,
6-
"options": []
7-
},
82
{
93
"name": "disabled",
104
"type": "Boolean",

src/color-picker/color-picker.en-US.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,23 @@ name | type | default | description | required
88
-- | -- | -- | -- | --
99
borderless | Boolean | false | \- | N
1010
clearable | Boolean | false | \- | N
11-
closeBtn | String / Boolean / Slot / Function | true | Typescript:`string \| boolean \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
1211
colorModes | Array | ["monochrome", "linear-gradient"] | Typescript:`Array<'monochrome' \| 'linear-gradient'>` | N
1312
disabled | Boolean | undefined | \- | N
1413
enableAlpha | Boolean | false | \- | N
1514
enableMultipleGradient | Boolean | true | \- | N
16-
format | String | RGB | options: RGB/RGBA/HSL/HSLA/HSB/HSV/HSVA/HEX/CMYK/CSS | N
15+
format | String | RGB | When `enableAlpha` is true, `HEX8/RGBA/HSLA/HSVA` are valid。options: HEX/HEX8/RGB/RGBA/HSL/HSLA/HSV/HSVA/CMYK/CSS | N
1716
inputProps | Object | - | Typescript:`InputProps`[Input API Documents](./input?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts) | N
18-
multiple | Boolean | false | \- | N
1917
popupProps | Object | - | Typescript:`PopupProps`[Popup API Documents](./popup?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts) | N
20-
recentColors | Array | [] | used color recently。`.sync` is supported。Typescript:`boolean \| Array<string> \| null` | N
21-
defaultRecentColors | Array | [] | used color recently。uncontrolled property。Typescript:`boolean \| Array<string> \| null` | N
18+
recentColors | Array | [] | used color recently。`.sync` is supported。Typescript:`Array<string> \| boolean \| null` | N
19+
defaultRecentColors | Array | [] | used color recently。uncontrolled property。Typescript:`Array<string> \| boolean \| null` | N
2220
selectInputProps | Object | - | Typescript:`SelectInputProps`[SelectInput API Documents](./select-input?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts) | N
2321
showPrimaryColorPreview | Boolean | true | \- | N
2422
size | String | medium | options: small/medium/large。Typescript:`SizeEnum`[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N
25-
swatchColors | Array | - | swatch colors。Typescript:`Array<string> \| null` | N
23+
swatchColors | Array | undefined | swatch colors。Typescript:`Array<string> \| null \| undefined` | N
2624
value | String | - | color value。`v-model` is supported | N
2725
defaultValue | String | - | color value。uncontrolled property | N
2826
onChange | Function | | Typescript:`(value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts)。<br/>`type ColorPickerChangeTrigger = 'palette-saturation-brightness' \| 'palette-saturation' \| 'palette-brightness' \| 'palette-hue-bar' \| 'palette-alpha-bar' \| 'input' \| 'preset' \| 'recent' `<br/> | N
27+
onClear | Function | | Typescript:`(context: { e: MouseEvent }) => void`<br/> | N
2928
onPaletteBarChange | Function | | Typescript:`(context: { color: ColorObject }) => void`<br/>[see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts)。<br/>`interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; saturation: number; value: number; isGradient: boolean; linearGradient?: string; }`<br/> | N
3029
onRecentColorsChange | Function | | Typescript:`(value: Array<string>) => void`<br/> | N
3130

@@ -34,5 +33,6 @@ onRecentColorsChange | Function | | Typescript:`(value: Array<string>) => voi
3433
name | params | description
3534
-- | -- | --
3635
change | `(value: string, context: { color: ColorObject; trigger: ColorPickerChangeTrigger })` | [see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts)。<br/>`type ColorPickerChangeTrigger = 'palette-saturation-brightness' \| 'palette-saturation' \| 'palette-brightness' \| 'palette-hue-bar' \| 'palette-alpha-bar' \| 'input' \| 'preset' \| 'recent' `<br/>
36+
clear | `(context: { e: MouseEvent })` | \-
3737
palette-bar-change | `(context: { color: ColorObject })` | [see more ts definition](https://github.com/Tencent/tdesign-vue/tree/develop/src/color-picker/type.ts)。<br/>`interface ColorObject { alpha: number; css: string; hex: string; hex8: string; hsl: string; hsla: string; hsv: string; hsva: string; rgb: string; rgba: string; saturation: number; value: number; isGradient: boolean; linearGradient?: string; }`<br/>
3838
recent-colors-change | `(value: Array<string>)` | \-

0 commit comments

Comments
 (0)