Skip to content

Commit

Permalink
fix(CustomReply): 修复自定义回复项的拖动,并微调一些颜色
Browse files Browse the repository at this point in the history
  • Loading branch information
JustAnotherID committed May 26, 2024
1 parent e148e7e commit b7db470
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/utils/custom-reply-condition.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const deleteSelf = () => {
</script>

<template>
<div style="border-left: .1rem solid #008; padding-left: .3rem; margin-bottom: .8rem;">
<div class="mb-3 pl-2 border-l-2 border-orange-500">
<div style="display: flex; justify-content: space-between;">
<el-select v-model="cond.condType">
<el-option
Expand Down
15 changes: 7 additions & 8 deletions src/components/utils/nested.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,19 @@
<li class="reply-item" style="padding-right: .5rem; list-style: none; margin-bottom: 0.5rem;">
<div style="display: flex; justify-content: space-between;">
<el-checkbox v-model="el.enable">开启</el-checkbox>
<div style="display: flex; align-items: center;">
<el-icon v-if="!el.notCollapse" class="handle" style="padding: 0.2rem 0.7rem; font-size: 1.3rem; color: #999">
<el-space alignment="center">
<el-icon class="handle" v-if="!el.notCollapse">
<rank />
</el-icon>
<i class="fa fa-align-justify handle"></i>
<el-button size="small" plain @click="el.notCollapse = !el.notCollapse">
{{ el.notCollapse ? '收缩' : '展开' }}
</el-button>
<el-button :icon="Delete" plain type="danger" size="small" @click="deleteItem(index)">删除</el-button>
</div>
</el-space>
</div>

<template v-if="!el.notCollapse">
<div style="padding-left: 1rem; border-left: .2rem solid orange;">
<div class="pl-4 border-l-4 border-orange-500">
<div v-for="(cond, index2) in (el.conditions || [])" :key="index2">
<div v-if="cond.condType === 'textMatch'" style="display: flex;" class="mobile-changeline">
文本匹配: {{ cond.value }}
Expand All @@ -37,17 +36,17 @@
</template>
<template v-else>
<div>条件(需同时满足,即and):</div>
<div style="padding-left: 1rem; border-left: .2rem solid orange;">
<div class="pl-4 border-l-4 border-orange-500">
<custom-reply-condition v-for="(_, index2) in (el.conditions || [])" :key="index2"
v-model="el.conditions[index2]" @delete="deleteAnyItem(el.conditions, index2)"/>

<el-button type="success" size="small" :icon="Plus" @click="addCond(el.conditions)">增加</el-button>
</div>

<div>结果(顺序执行):</div>
<div style="padding-left: 1rem; border-left: .2rem solid skyblue;">
<div class="pl-4 border-l-4 border-blue-500">
<div v-for="(i, index) in (el.results || [])" :key="index"
style="border-left: .1rem solid #008; padding-left: .3rem; margin-bottom: .8rem;">
class="mb-3 pl-2 border-l-2 border-blue-500">
<div style="display: flex; justify-content: space-between;">
<el-select v-model="i.resultType">
<el-option
Expand Down

0 comments on commit b7db470

Please sign in to comment.