File tree Expand file tree Collapse file tree 5 files changed +19
-4
lines changed
Expand file tree Collapse file tree 5 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,14 @@ template:
1212 - SQL查询中不能使用星号(*),必须明确指定字段名.
1313 - SQL查询的字段名不要自动翻译,别名必须为英文。
1414 - 计算占比,百分比类型字段,保留两位小数,以%结尾。
15- - 生成SQL时,必须避免关键字冲突:
15+ - 生成SQL时,必须避免关键字冲突。
1616 - 如数据库引擎是 PostgreSQL、Oracle,则在schema、表名、字段名、别名外层加双引号;
1717 - 如数据库引擎是 MySQL,则在表名、字段名、别名外层加反引号;
1818 - 如数据库引擎是 Microsoft SQL Server,则在schema、表名、字段名、别名外层加方括号。
19+ - 以PostgreSQL为例,查询Schema为TEST表TABLE下所有数据,则生成的SQL为:
20+ SELECT * FROM "TEST"."TABLE"
21+ - 注意在表名外双引号的位置,千万不要生成为:
22+ SELECT * FROM "TEST.TABLE"
1923 - 如果生成SQL的字段内有时间格式的字段(重要):
2024 - 若提问中没有指定查询顺序,则默认按时间升序排序
2125 - 若提问是时间,且没有指定具体格式,则格式化为yyyy-MM-dd HH:mm:ss的格式
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ withDefaults(
2222 <logo _fold v-if =" !hideAvatar" />
2323 </el-icon >
2424 </div >
25- <div :class =" { 'row-full': msg.role === 'assistant' }" >
25+ <div style = " width : 100 % " :class =" { 'row-full': msg.role === 'assistant' }" >
2626 <slot ></slot >
2727 </div >
2828 </div >
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ function clickPredict() {
2323 <span v-else-if =" message?.record?.predict_record_id" class =" prefix-title" @click =" clickPredict" >
2424 {{ t('qa.data_predict') }}
2525 </span >
26- <span >{{ message?.content }}</span >
26+ <span style = " width : 100 % " >{{ message?.content }}</span >
2727 </div >
2828</template >
2929
Original file line number Diff line number Diff line change @@ -113,6 +113,12 @@ export class Bar extends BaseG2Chart {
113113 }
114114 return `${ value } ${ _data . isPercent ? '%' : '' } `
115115 } ,
116+ position : ( data : any ) => {
117+ if ( data [ y [ 0 ] . value ] < 0 ) {
118+ return 'left'
119+ }
120+ return 'right'
121+ } ,
116122 transform : [
117123 { type : 'contrastReverse' } ,
118124 { type : 'exceedAdjust' } ,
Original file line number Diff line number Diff line change @@ -102,7 +102,12 @@ export class Column extends BaseG2Chart {
102102 }
103103 return `${ value } ${ _data . isPercent ? '%' : '' } `
104104 } ,
105- position : 'top' ,
105+ position : ( data : any ) => {
106+ if ( data [ y [ 0 ] . value ] < 0 ) {
107+ return 'bottom'
108+ }
109+ return 'top'
110+ } ,
106111 transform : [
107112 { type : 'contrastReverse' } ,
108113 { type : 'exceedAdjust' } ,
You can’t perform that action at this time.
0 commit comments