antd 指定版本5.11.0

This commit is contained in:
Wang Kejun 2023-11-10 10:44:59 +08:00
parent a33c910824
commit 054352b411
4 changed files with 31 additions and 22 deletions

View File

@ -539,8 +539,7 @@ function translatePropertiesToPropertyDefinitions(properties) {
type: String, type: String,
value: properties[prop], value: properties[prop],
}; };
} } else {
else {
definitions[prop] = String; definitions[prop] = String;
} }
break; break;
@ -566,25 +565,27 @@ function translatePropertiesToPropertyDefinitions(properties) {
type: Array, type: Array,
value: properties[prop], value: properties[prop],
}; };
} } else {
else {
definitions[prop] = Array; definitions[prop] = Array;
} }
} } else {
else {
if (Object.keys(properties[prop]).length > 0) { if (Object.keys(properties[prop]).length > 0) {
definitions[prop] = { definitions[prop] = {
type: Object, type: Object,
value: properties[prop], value: properties[prop],
}; };
} } else {
else {
definitions[prop] = Object; definitions[prop] = Object;
} }
} }
break; break;
} }
case 'function': case 'function': {
Object.assign(definitions, {
[prop]: Object,
});
break;
}
default: { default: {
// 小程序也支持传函数 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html // 小程序也支持传函数 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html
// 其它什么类型都写null小程序能识别出来 // 其它什么类型都写null小程序能识别出来

View File

@ -587,7 +587,11 @@ function translatePropertiesToPropertyDefinitions(properties) {
} }
break; break;
} }
case 'function': case 'function': {
Object.assign(definitions, {
[prop]: Object,
});
}
default: { default: {
// 小程序也支持传函数 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html // 小程序也支持传函数 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html
// 其它什么类型都写null小程序能识别出来 // 其它什么类型都写null小程序能识别出来

View File

@ -31,16 +31,16 @@
"weapp.socket.io": "^2.2.1" "weapp.socket.io": "^2.2.1"
}, },
"peerDependencies": { "peerDependencies": {
"@ant-design/icons": "^5.2.6", "@ant-design/icons": ">=5.2.6",
"antd": "^5.8.3", "antd": ">=5.11.0",
"antd-mobile": "^5.32.0", "antd-mobile": ">=5.33.0",
"antd-mobile-icons": "^0.3.0", "antd-mobile-icons": ">=0.3.0",
"react": "^18.2.0", "react": ">=18.2.0",
"react-dom": "^18.2.0", "react-dom": ">=18.1.0",
"react-router-dom": "^6.3.0" "react-router-dom": ">=6.3.0"
}, },
"devDependencies": { "devDependencies": {
"@ant-design/icons": "^5.2.6", "@ant-design/icons": "5.2.6",
"@babel/cli": "^7.12.13", "@babel/cli": "^7.12.13",
"@babel/core": "^7.12.13", "@babel/core": "^7.12.13",
"@babel/plugin-proposal-class-properties": "^7.12.13", "@babel/plugin-proposal-class-properties": "^7.12.13",
@ -57,9 +57,9 @@
"@types/react-dom": "^18.2.14", "@types/react-dom": "^18.2.14",
"@types/uuid": "^9.0.6", "@types/uuid": "^9.0.6",
"@types/wechat-miniprogram": "^3.4.5", "@types/wechat-miniprogram": "^3.4.5",
"antd": "^5.9.0", "antd": "5.11.0",
"antd-mobile": "^5.32.0", "antd-mobile": "5.33.0",
"antd-mobile-icons": "^0.3.0", "antd-mobile-icons": "0.3.0",
"assert": "^2.0.0", "assert": "^2.0.0",
"copyfiles": "^2.4.1", "copyfiles": "^2.4.1",
"cross-env": "^7.0.2", "cross-env": "^7.0.2",

View File

@ -815,7 +815,11 @@ function translatePropertiesToPropertyDefinitions(properties?: DataOption) {
} }
break; break;
} }
case 'function': case 'function': {
Object.assign(definitions, {
[prop]: Object,
});
}
default: { default: {
// 小程序也支持传函数 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html // 小程序也支持传函数 https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/wxml-wxss.html
// 其它什么类型都写null小程序能识别出来 // 其它什么类型都写null小程序能识别出来