运行环境:Google Chrome 版本 77.0.3865.120(正式版本) (64 位)
Firefox 69.0.3 (64 位)
Spread JS版本:
12.0.0
运行方式:
协同办公,一个浏览器监听cell的点击事件取得cell的row/col/style(通过getActualStyle方法获得)/sheetArea,通过网络传给另一个浏览器,另一个浏览器执行设置style(通过setStyle方法实现)
问题情况:
如果原cell没有格式的话,没有问题,如果原cell包含样式,则在setStyle时会报js错误
取得的style对象信息如下:
{
backColor: null,
backgroundImage: undefined,
backgroundImageLayout: undefined,
borderBottom: {
color: "#000000",
level: 10,
style: 1,
},
borderLeft: {
color: "#000000",
level: 10,
style: 1,
},
borderRight: {
color: "#000000",
level: 10,
style: 1,
},
borderTop: {
color: "#000000",
level: 10,
style: 1,
},
cellPadding: undefined,
cellType: undefined,
diagonalDown: null,
diagonalUp: null,
font: "normal normal 14.7px Arial",
foreColor: "#000000",
formatter: undefined,
hAlign: 3,
imeMode: 1,
isVerticalText: undefined,
labelOptions: undefined,
locked: true,
name: "__builtInStyle13",
parentName: undefined,
quotePrefix: undefined,
shrinkToFit: undefined,
tabStop: undefined,
textDecoration: undefined,
textIndent: 0,
themeFont: undefined,
vAlign: 1,
watermark: undefined,
wordWrap: true,
yn: 3028,
_autoFormatter: undefined,
}
错误信息如下:
gc.spread.sheets.all.12.0.0.min.js:27 Uncaught TypeError: d.Uo is not a function
at v.Yo (gc.spread.sheets.all.12.0.0.min.js:27)
at ma.Dq (gc.spread.sheets.all.12.0.0.min.js:29)
at ma.getActualStyle (gc.spread.sheets.all.12.0.0.min.js:29)
at oa.Ym (gc.spread.sheets.all.12.0.0.min.js:25)
at ha.TI (gc.spread.sheets.all.12.0.0.min.js:39)
at ha.GI (gc.spread.sheets.all.12.0.0.min.js:39)
at ha.DI (gc.spread.sheets.all.12.0.0.min.js:39)
at ha.AI (gc.spread.sheets.all.12.0.0.min.js:39)
at ha._l (gc.spread.sheets.all.12.0.0.min.js:39)
at ha.jp (gc.spread.sheets.all.12.0.0.min.js:39)
希望各位大佬帮忙解决一下。不胜感激!
|
|