Skip to content

Commit

Permalink
fix: 修复插件策略参数配置回填值错误及必填样式和滚动高度问题,默认必填展开一项
Browse files Browse the repository at this point in the history
# Reviewed, transaction id: 15555
  • Loading branch information
hyunfa committed Aug 16, 2024
1 parent 8851640 commit d6ab49c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
22 changes: 22 additions & 0 deletions frontend/src/components/RussianDolls/DollForm.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@

.bk-form-item + .bk-form-item {
margin-top: 16px;

}
.bk-form-item {
&.is-required .bk-label:after {
content: none;
}
&.is-required >.bk-label {
position: relative;

&:after {
height: 8px;
line-height: 1;
content: '*';
color: #EA3636;
font-size: 12px;
position: absolute;
display: inline-block;
vertical-align: middle;
top: 50%;
transform: translate(3px, -50%);
}
}
}

.nodeman-icon {
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/RussianDolls/DollForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export default defineComponent({
};
// 补齐form需要的数据
const completionArrayData = (list, form) => {
if (typeof form === 'string') return form;
// 很关键。form一定要保证是个obj
const formData = typeof form === 'object' && !Array.isArray(form)
? deepClone(form)
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/RussianDolls/item/DollArray.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default defineComponent({
const realIndex = index + 1;
updateFormData?.({ ...props.item, property: getRealProp(props.valueProp, realIndex) }, 'add', index + 1);
};
!props.value?.length && props.item.required && addItem(-1);
const deleteItem = (index = 0) => {
updateFormData?.({ ...props.item, property: getRealProp(props.valueProp, index) }, 'delete', index);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,9 @@ export default class CreateRule extends Mixins(routerBackMixin, FormLabelMixin)
}
</script>
<style lang="postcss" scoped>
.rule-create {
height: calc(100vh - 52px);
}
$bgColor: #f5f7fa;
.header {
Expand Down

0 comments on commit d6ab49c

Please sign in to comment.