Match-id-be80bcf863acd6eafda87190c0a84c7b575b2ee3
This commit is contained in:
commit
6b81437bf3
|
@ -16,6 +16,13 @@
|
||||||
if [ -n "${releaseVersion}" ] ; then
|
if [ -n "${releaseVersion}" ] ; then
|
||||||
echo "==== Horizon Upgrade ${releaseVersion} ===="
|
echo "==== Horizon Upgrade ${releaseVersion} ===="
|
||||||
cd ./build/horizon || { echo 'ERROR: Build directory not found' ; exit 1; }
|
cd ./build/horizon || { echo 'ERROR: Build directory not found' ; exit 1; }
|
||||||
|
|
||||||
|
cd umd
|
||||||
|
# umd生产包多暴露全局名HorizonDOM
|
||||||
|
# 以解决webpack的externals react-dom和react都指向Horizon时,webpack随机使用key名造成源码交付问题
|
||||||
|
sed -i '$a window.HorizonDOM = window.Horizon;' horizon.production.js
|
||||||
|
cd -
|
||||||
|
|
||||||
# 写入新版本号
|
# 写入新版本号
|
||||||
npm version "${releaseVersion}"
|
npm version "${releaseVersion}"
|
||||||
cat >.npmrc <<- EndOfMessage
|
cat >.npmrc <<- EndOfMessage
|
||||||
|
@ -27,8 +34,8 @@ email = cloudsop@huawei.com
|
||||||
EndOfMessage
|
EndOfMessage
|
||||||
|
|
||||||
echo "==== Publish new version===="
|
echo "==== Publish new version===="
|
||||||
# npm仓库发布接口返回HTML,屏蔽错误码
|
|
||||||
npm publish || echo 'WARNING: Parsing publish response failed'
|
npm publish
|
||||||
npm view @cloudsop/horizon@"${releaseVersion}"
|
npm view @cloudsop/horizon@"${releaseVersion}"
|
||||||
else
|
else
|
||||||
echo "No release version, quit."
|
echo "No release version, quit."
|
||||||
|
|
|
@ -105,6 +105,10 @@ export function updateCommonProp(dom: Element, attrName: string, value: any, isN
|
||||||
value = null;
|
value = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (attrName === '') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isNativeTag || propDetails === null) {
|
if (!isNativeTag || propDetails === null) {
|
||||||
// 特殊处理svg的属性,把驼峰式的属性名称转成'-'
|
// 特殊处理svg的属性,把驼峰式的属性名称转成'-'
|
||||||
if (getDomTag(dom) === 'svg' || getNamespaceCtx() === NSS.svg) {
|
if (getDomTag(dom) === 'svg' || getNamespaceCtx() === NSS.svg) {
|
||||||
|
|
|
@ -82,4 +82,11 @@ describe('Dom Attribute', () => {
|
||||||
expect(window.getComputedStyle(div).getPropertyValue('width')).toBe('10px');
|
expect(window.getComputedStyle(div).getPropertyValue('width')).toBe('10px');
|
||||||
expect(window.getComputedStyle(div).getPropertyValue('height')).toBe('20px');
|
expect(window.getComputedStyle(div).getPropertyValue('height')).toBe('20px');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('空字符串做属性名', () => {
|
||||||
|
const emptyStringProps = { '': '' };
|
||||||
|
expect(() => {
|
||||||
|
Horizon.render(<div {...emptyStringProps}/>, container);
|
||||||
|
}).not.toThrow();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue