Skip to content

Commit fe97953

Browse files
SinzoLjarmywanganlyyao
authored
feat(qrcode): add config for qrcode component (#3780)
* feat(qrcode): add config for qrcode component * feat(qrcode): 主要功能实现(#3779) * feat(qrcode): 修改部分样式(#3779) * feat(qrcode): 多余defaultprop文件去除、渲染插槽增加(#3779) * feat(qrcode): 清除部分无用代码、修复iconSize属性问题 * feat(qrcode): 增加示例文件 (#3779) * fix(qrcode):  修改组件样式(#3779) * feat(qrcode): 增加使用示例页面(#3779) * feat(qrcode): 增加展示文件 * feat(qrcode): 增加测试文件(#3779) * feat(qrcode): 继续完善测试和演示文件(#3779) * fix(qrcode): 修正文件引入 * fix(qrcode): 修正文案 * fix(qrcode): 修改展示文件样式、路径(#3779) * feat(qrcode): 修改skyline展示文件(#3779) * fix: 更新qrcode工具引用方式 * fix(qrcode): 修改演示文件名(#3779) * fix(qrcode): 修改文件的导入(#3779) * feat(qrcode): 优化展示与部分实现、增加下载方法(#3779) * fix(qrcode): 重新运行 test (#3779) * fix(qrcode): 修改展示文案 (#3779) * fix(qrcode): 修正字体样式 (#3779) * feat(qrcode): 样式文件对齐 (#3779) * fix(qrcode): 修改组件结构 (#3779) * fix(qrcode): 修改测试文件 (#3779) * feat(qrcode): 修改多个示例文件,调整组件结构 (#3779) * fix: 调整展示文件 (#3779) * chore: 清除无用代码 (#3779) * fix(qrcode): 修改展示文件和README (#3779) * fix(qrrcode): 更改单词拼写错误 * fix: 调整展示文件(#3779) * fix: 增加展示文件的组件引入 * fix: 调整展示文件样式 * docs: update css vars --------- Co-authored-by: jarmywang <[email protected]> Co-authored-by: anlyyao <[email protected]>
1 parent 031b209 commit fe97953

Some content is hidden

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

71 files changed

+2847
-7
lines changed

example/app.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"pages/loading/skyline/loading",
1212
"pages/progress/progress",
1313
"pages/progress/skyline/progress",
14+
"pages/qrcode/qrcode",
1415
"pages/cascader/cascader",
1516
"pages/cell/cell",
1617
"pages/cell/skyline/cell",

example/pages/home/data/display.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ const display = {
5454
name: 'Progress',
5555
label: '进度条',
5656
},
57+
{
58+
name: 'QRCode',
59+
label: '二维码',
60+
path: '/pages/qrcode/qrcode',
61+
},
5762
{
5863
name: 'Result',
5964
label: '结果',

example/project.config.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"bigPackageSizeSupport": true
2727
},
2828
"compileType": "miniprogram",
29-
"libVersion": "3.6.3",
29+
"libVersion": "3.8.11",
3030
"appid": "wx6f3e38f61d138c04",
3131
"projectname": "TDesign",
3232
"debugOptions": {
@@ -256,6 +256,12 @@
256256
"query": "",
257257
"scene": null
258258
},
259+
{
260+
"name": "qrcode",
261+
"pathName": "pages/qrcode/qrcode",
262+
"query": "",
263+
"scene": null
264+
},
259265
{
260266
"name": "overlay",
261267
"pathName": "pages/overlay/overlay",

script/generate-css-vars.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@ const combine = {
2121
grid: ['grid', 'grid-item'],
2222
layout: ['row', 'col'],
2323
form: ['form', 'form-item'],
24+
qrcode: ['qrcode', 'qrcode/components/qrcode-canvas', 'qrcode/components/qrcode-status'],
2425
};
2526

2627
const resolveCwd = (...args) => {
2728
args.unshift(process.cwd());
2829
return path.join(...args);
2930
};
3031

31-
const findFilePath = (componentName) => resolveCwd(`src/${componentName}/${componentName}.less`);
32+
const findFilePath = (componentPath, componentName) => resolveCwd(`src/${componentPath}/${componentName}.less`);
3233

3334
const getAllComponentName = async (dirPath) => {
3435
const items = await fs.promises.readdir(dirPath, { withFileTypes: true });
@@ -42,10 +43,10 @@ const generateCssVariables = async (componentName) => {
4243

4344
if (combine[componentName]) {
4445
combine[componentName].forEach((item) => {
45-
lessPath.push(findFilePath(item));
46+
lessPath.push(findFilePath(item, item.includes('/') ? item.split('/').pop() : item));
4647
});
4748
} else {
48-
lessPath.push(findFilePath(componentName));
49+
lessPath.push(findFilePath(componentName, componentName));
4950
}
5051

5152
const validPaths = lessPath.filter((item) => fs.existsSync(item));

site/site.config.mjs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,14 @@ export const docs = [
429429
path: '/miniprogram/components/progress',
430430
component: () => import('@/progress/README.md'),
431431
},
432+
{
433+
title: 'QRCode 二维码',
434+
titleEn: 'QRCode',
435+
name: 'qrcode',
436+
meta: { docType: 'data' },
437+
path: '/miniprogram/components/qrcode',
438+
component: () => import('@/qrcode/README.md'),
439+
},
432440
{
433441
title: 'Result 结果',
434442
titleEn: 'Result',

src/_common

Submodule _common updated 73 files

0 commit comments

Comments
 (0)