Merge pull request #4777 from dataease/pr@dev@refactor_calc_field

refactor: 计算字段函数为空时增加提示
This commit is contained in:
Junjun 2023-03-14 12:54:33 +08:00 committed by GitHub
commit f8f4f66647
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 57 additions and 42 deletions

View File

@ -1520,7 +1520,8 @@ export default {
p_center: 'Center',
table_auto_break_line: 'Auto Line Feed',
table_break_line_tip: 'If open this option,the table item height will disabled.',
step: 'Step(px)'
step: 'Step(px)',
no_function: 'Function not enterplease input.'
},
dataset: {
scope_edit: 'Effective only when editing',

View File

@ -1514,7 +1514,8 @@ export default {
p_center: '居中',
table_auto_break_line: '自動換行',
table_break_line_tip: '開啟自動換行,表格行高設置將失效',
step: '步長(px)'
step: '步長(px)',
no_function: '函數尚未支持直接引用,請在字段表達式中手動輸入。'
},
dataset: {
scope_edit: '僅編輯時生效',

View File

@ -1,4 +1,4 @@
import {$confirm} from "@/utils/message";
import { $confirm } from '@/utils/message'
export default {
fu: {
@ -1515,7 +1515,8 @@ export default {
p_center: '居中',
table_auto_break_line: '自动换行',
table_break_line_tip: '开启自动换行,表格行高设置将失效',
step: '步长(px)'
step: '步长(px)',
no_function: '函数尚未支持直接引用,请在字段表达式中手动输入。'
},
dataset: {
scope_edit: '仅编辑时生效',

View File

@ -260,26 +260,32 @@
clearable
/>
<el-row class="function-height">
<el-popover
v-for="(item,index) in functionData"
:key="index"
class="function-pop"
placement="right"
width="200"
trigger="hover"
:open-delay="500"
>
<p class="pop-title">{{ item.name }}</p>
<p class="pop-info">{{ item.func }}</p>
<p class="pop-info">{{ item.desc }}</p>
<span
slot="reference"
class="function-style"
@click="insertParamToCodeMirror(item.func)"
>{{
item.func
}}</span>
</el-popover>
<div v-if="functionData && functionData.length > 0">
<el-popover
v-for="(item,index) in functionData"
:key="index"
class="function-pop"
placement="right"
width="200"
trigger="hover"
:open-delay="500"
>
<p class="pop-title">{{ item.name }}</p>
<p class="pop-info">{{ item.func }}</p>
<p class="pop-info">{{ item.desc }}</p>
<span
slot="reference"
class="function-style"
@click="insertParamToCodeMirror(item.func)"
>{{
item.func
}}</span>
</el-popover>
</div>
<div
v-else
class="class-na"
>{{ $t('chart.no_function') }}</div>
</el-row>
</div>
</div>

View File

@ -236,24 +236,30 @@
clearable
/>
<el-row class="function-height">
<el-popover
v-for="(item, index) in functionData"
:key="index"
class="function-pop"
placement="right"
width="200"
trigger="hover"
:open-delay="500"
>
<p class="pop-title">{{ item.name }}</p>
<p class="pop-info">{{ item.func }}</p>
<p class="pop-info">{{ item.desc }}</p>
<span
slot="reference"
class="function-style"
@click="insertParamToCodeMirror(item.func)"
>{{ item.func }}</span>
</el-popover>
<div v-if="functionData && functionData.length > 0">
<el-popover
v-for="(item, index) in functionData"
:key="index"
class="function-pop"
placement="right"
width="200"
trigger="hover"
:open-delay="500"
>
<p class="pop-title">{{ item.name }}</p>
<p class="pop-info">{{ item.func }}</p>
<p class="pop-info">{{ item.desc }}</p>
<span
slot="reference"
class="function-style"
@click="insertParamToCodeMirror(item.func)"
>{{ item.func }}</span>
</el-popover>
</div>
<div
v-else
class="class-na"
>{{ $t('chart.no_function') }}</div>
</el-row>
</div>
</div>