x = d3.scaleBand().rangeRound([0, width]).paddingInner(0.1);
xAxis = d3.axisBottom(this.x).ticks(10);
x.domain(dummyData.map( d => d.name ));
svg
.append('g')
.attr('class', 'x axis')
.attr('transform', `translate( 0 , ${height})`)
.call(xAxis)
.selectAll('.tick')
.append('foreignObject')
.append('xhtml:div'))
.style('background-image', d => `url(${d.imgUrl})`)
.style('background-size','30px')
.style('background-repeat', 'no-repeat')
我想输出类似
var item = $(documentListItem + "[index=" + documentListSelectedIndex + "]");
item[0].scrollIntoView({ behavior: "instant", block: "center", inline: "nearest" });
答案 0 :(得分:0)
使用UNION
,例如:
SELECT id,name,add1 from mytable
UNION
SELECT id,name,add2 from mytable
编辑:为了获得更好的性能,您可以改用UNION ALL,这将为您提供相同的结果:
SELECT id,name,add1 from mytable
UNION ALL
SELECT id,name,add2 from mytable