Skip to content

Commit 5661f53

Browse files
committed
Merge branch 'develop_fixbug'
2 parents 9665645 + 489bb5b commit 5661f53

File tree

9 files changed

+155
-130
lines changed

9 files changed

+155
-130
lines changed

Diff for: .gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ rn_temp/
44
node_modules/
55
.DS_Store
66
coverage/
7-
.idea/workspace.xml
7+
.idea/

Diff for: .idea/taro-ui-sample.iml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: .idea/workspace.xml

+132-115
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: @types/floatButton.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
lightBgColorType,
88
normalSizeType
99
} from "./baseType";
10+
import {IconProps} from './icon'
1011

1112
export interface IProps extends BaseComponent {
1213
/**
@@ -61,7 +62,7 @@ export interface IProps extends BaseComponent {
6162
*
6263
* 默认 `add`
6364
*/
64-
icon?: iconType;
65+
icon?: iconType | IconProps;
6566
/**
6667
* 背景色
6768
*

Diff for: docs/base/floatButton.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import { ClFloatButton } from "mp-colorui";
2323
| shadow | 是否有阴影 | boolean | - | `true` |
2424
| move | 是否可移动 | boolean | - | `false` |
2525
| open | 是否可展开 | boolean | - | `true` |
26-
| icon | 图标 | string | 参考文档 [Icon-iconName](/mp-colorui-doc/base/icon#iconname) | `add` |
26+
| icon | 图标,可以传参为图标名或者直接 icon 类型 | string 、 Icon | 参考文档 [Icon-iconName](/mp-colorui-doc/base/icon#iconname) | `add` |
2727
| bgColor | 背景色 | string | 参考文档 [默认色](/mp-colorui-doc/home/color) | `blue` |
2828
| iconColor | 图标色 | string | 参考文档 [默认色-标准色](/mp-colorui-doc/home/color#标准色) | - |
2929
| direction | 展开方向 | string | `vertical`,`horizontal` | `vertical` |

Diff for: package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mp-colorui",
3-
"version": "0.6.16",
3+
"version": "0.6.17",
44
"description": "MP ColorUI 是一款基于 Taro 框架并且联合 Color-UI CSS 库开发的多端 UI 组件库(支持小程序端和H5端)",
55
"keywords": [
66
"taro",

Diff for: src/components/floatButton/index.tsx

+5-1
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,11 @@ export default function ClFloatButton(props: IProps) {
174174
transition: "all 0.15s linear"
175175
}}
176176
>
177-
<ClIcon iconName={icon} size={size} />
177+
{typeof icon === "string" ? (
178+
<ClIcon iconName={icon as string} size={size} />
179+
) : (
180+
<ClIcon {...icon} />
181+
)}
178182
</View>
179183
</View>
180184
</View>

Diff for: src/utils/copyDoc.js

+11-9
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,11 @@ const fs = require("fs");
22
const path = require("path");
33

44
// 文档所在绝对地址
5-
const docPath =
6-
"/Users/ly/develop/WebProject/WeChatMiniProgram/mp-colorui-doc/";
5+
const docPath = "../../../mp-colorui-doc/";
76
// 打包完成所在地址
8-
const distPath =
9-
"/Users/ly/develop/WebProject/WeChatMiniProgram/mp-colorui/docs/.vuepress/dist/";
7+
const distPath = "../../docs/.vuepress/dist";
108
// code 所在
11-
const publicPath =
12-
"/Users/ly/develop/WebProject/WeChatMiniProgram/mp-colorui/docs/.vuepress/public";
9+
const publicPath = "../../docs/.vuepress/public";
1310

1411
// 删除/移动文件
1512
const transfromFile = (relativePath, type) => {
@@ -21,7 +18,12 @@ const transfromFile = (relativePath, type) => {
2118
if (fs.statSync(currentPath).isDirectory()) {
2219
if (type === "copy")
2320
fs.mkdirSync(
24-
path.join(docPath, relativePath.split(distPath)[1] || "", filename)
21+
path.join(
22+
__dirname,
23+
docPath,
24+
relativePath.split(distPath)[1] || "",
25+
filename
26+
)
2527
);
2628
if (filename !== ".git") transfromFile(currentPath, type);
2729
} else {
@@ -57,7 +59,7 @@ const cos = new COS({
5759
SecretKey: "tdsPqiS6MdpriUAjDbpsodKtSvFQWVM7"
5860
});
5961

60-
const allcodeName = fs.readdirSync(publicPath);
62+
const allcodeName = fs.readdirSync(path.join(__dirname, publicPath));
6163

6264
// 循环上传
6365
allcodeName.forEach(name => {
@@ -66,7 +68,7 @@ allcodeName.forEach(name => {
6668
Bucket: "mp-colorui-1255362963" /* 必须 */,
6769
Region: "ap-chengdu" /* 必须 */,
6870
Key: `code/${name}`,
69-
Body: fs.createReadStream(path.join(docPath, name)),
71+
Body: fs.createReadStream(path.join(__dirname, docPath, name))
7072
// onProgress: function(progressData) {
7173
// console.log(JSON.stringify(progressData));
7274
// }

0 commit comments

Comments
 (0)