Skip to content

Commit

Permalink
fix: beauty element select comp, see https://sonic-cloud.wiki/d/3093-…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhouYixun committed May 27, 2023
1 parent 0d452fc commit ed2bcc2
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 27 deletions.
40 changes: 21 additions & 19 deletions src/components/ElementSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,33 +115,36 @@ onMounted(() => {
:rules="[{ required: true, message: place, trigger: 'change' }]"
:prop="'elements[' + index + ']'"
>
<el-card>
<span style="font-size: 14px; color: #99a9bf; margin-right: 10px">{{
$t('element.modelFilter')
}}</span>
<el-select v-model="moduleId" size="small" @change="findByModule">
<el-option
v-for="item in moduleList"
:key="item.name"
:value="item.id"
:label="item.name"
>
</el-option>
</el-select>

<div style="margin-top: 10px">
<span style="font-size: 14px; color: #99a9bf; margin-right: 10px">{{
$t('element.nameFilter')
}}</span>
<div>
<el-select
v-model="step.elements[index]"
filterable
style="width: 100%"
remote
:remote-method="findByName"
value-key="id"
:placeholder="$t('element.namePlace')"
@visible-change="findByProjectIdAndEleType"
>
<template #prefix>
<span style="font-size: 14px; color: #99a9bf; margin:0 10px">{{
$t('element.nameFilter')
}}</span>
</template>
<div style="display: flex;justify-content: center;align-items: center;margin: 5px 0">
<span style="font-size: 14px; color: #99a9bf; margin:0 10px">{{
$t('element.modelFilter')
}}</span>
<el-select v-model="moduleId" size="small" @change="findByModule">
<el-option
v-for="item in moduleList"
:key="item.name"
:value="item.id"
:label="item.name"
>
</el-option>
</el-select>
</div>
<el-option
v-for="item in pageData['content']"
v-if="pageData['content'] !== null"
Expand Down Expand Up @@ -195,6 +198,5 @@ onMounted(() => {
</div>
</el-select>
</div>
</el-card>
</el-form-item>
</template>
2 changes: 1 addition & 1 deletion src/config/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const localeList = [
},
{
text: 'English',
building: true,
building: false,
event: LOCALE.EN_US,
},
{
Expand Down
2 changes: 1 addition & 1 deletion src/locales/lang/en_US.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
const element = {
currentIteration: 'Current iteration element',
modelFilter: 'Model Filter',
nameFilter: 'Name Filter',
nameFilter: 'Selected Element',
namePlace: 'Please input element name to search',
iterationList: 'Iterate Element List',
whenList: 'When the parent step exists',
Expand Down
4 changes: 2 additions & 2 deletions src/locales/lang/ja_JP.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
const element = {
currentIteration: '当前迭代控件',
modelFilter: '模块筛选',
nameFilter: '名称筛选',
namePlace: '请输入控件名称筛选',
nameFilter: '已选控件',
namePlace: '可输入控件名称筛选',
iterationList: '迭代控件列表',
whenList: '当父级步骤存在',
thenList: '时,可选择本控件作为',
Expand Down
4 changes: 2 additions & 2 deletions src/locales/lang/zh_CN.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
const element = {
currentIteration: '当前迭代控件',
modelFilter: '模块筛选',
nameFilter: '名称筛选',
namePlace: '请输入控件名称筛选',
nameFilter: '已选控件',
namePlace: '可输入控件名称筛选',
iterationList: '迭代控件列表',
whenList: '当父级步骤存在',
thenList: '时,可选择本控件作为',
Expand Down
4 changes: 2 additions & 2 deletions src/locales/lang/zh_TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
const element = {
currentIteration: '当前迭代控件',
modelFilter: '模块筛选',
nameFilter: '名称筛选',
namePlace: '请输入控件名称筛选',
nameFilter: '已选控件',
namePlace: '可输入控件名称筛选',
iterationList: '迭代控件列表',
whenList: '当父级步骤存在',
thenList: '时,可选择本控件作为',
Expand Down

0 comments on commit ed2bcc2

Please sign in to comment.