Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复jsonschema第三方插件的样式问题 #7193

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "ISC",
"dependencies": {
"@blueking/bkcharts": "^2.0.11-alpha.5",
"@blueking/bkui-form": "0.0.35",
"@blueking/bkui-form": "0.0.41",
"@blueking/crypto-js-sdk": "0.0.5",
"@blueking/user-selector": "^1.0.5-beta.2",
"@vue/babel-preset-jsx": "^1.3.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@
<template v-else>
<jsonschema-input-params
v-if="inputs.properties && Object.keys(inputs.properties).length > 0"
:is-view-mode="true"
:inputs="inputs"
:value="inputsFormData">
</jsonschema-input-params>
Expand Down Expand Up @@ -365,7 +366,7 @@
this.subflowLoading = false
}
},

/**
* 加载子流程输入参数表单配置项
* 遍历每个非隐藏的全局变量,由 source_tag、coustom_type 字段确定需要加载的标准插件
Expand Down Expand Up @@ -686,7 +687,7 @@
.rf-tag-form {
margin-left: 20%;
}

.hide-render-icon {
top: 0;
}
Expand Down Expand Up @@ -796,5 +797,5 @@
}
}
}

</style>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="jsonschema-input-params">
<bkui-form
form-type="horizontal"
readonly
:readonly="true"
:value="formData"
:schema="schema"
:layout="{ group: [], container: { gap: '14px' } }">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<template>
<div class="jsonschema-input-params">
<bkui-form
:value="inputFormData"
ref="jsonschemaFormRef"
form-type="horizontal"
:value="inputFormData"
:schema="inputs"
:readonly="isViewMode"
:layout="{ group: [], container: { gap: '14px' } }"
@change="$emit('update', $event)">
</bkui-form>
Expand All @@ -22,6 +24,7 @@
BkuiForm
},
props: {
isViewMode: Boolean,
inputs: {
type: Object,
default: () => ({})
Expand All @@ -40,29 +43,40 @@
value (val) {
this.inputFormData = tools.deepClone(val)
}
},
methods: {
validate () {
return this.$refs.jsonschemaFormRef.validateForm()
}
}
}
</script>
<style lang="scss" scoped>
.jsonschema-input-params {
>>> .bk-form-item {
.bk-label {
width: 130px !important;
font-size: 12px;
}
.bk-form-content {
margin-left: 130px !important;
}
.bk-form-radio {
margin-right: 30px;
.bk-radio-text {
>>> {
.bk-form-item {
.bk-label {
width: 130px !important;
font-size: 12px;
& + .bk-form-content {
margin-left: 130px !important;
}
}
}
.bk-form-checkbox {
margin-right: 30px;
.bk-checkbox-text {
.bk-form-content {
font-size: 12px;
color: #63656e;
}
.bk-form-radio {
margin-right: 30px;
.bk-radio-text {
font-size: 12px;
}
}
.bk-form-checkbox {
margin-right: 30px;
.bk-checkbox-text {
font-size: 12px;
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@
<template v-else>
<jsonschema-input-params
v-if="inputs.properties && Object.keys(inputs.properties).length > 0"
ref="jsonSchemaParams"
:is-view-mode="isViewMode"
:inputs="inputs"
:value="inputsParamValue"
@update="updateInputsValue">
Expand Down Expand Up @@ -1366,9 +1368,10 @@
return this.$refs.basicInfo.validate().then(validator => {
if (this.$refs.inputParams) {
return this.$refs.inputParams.validate()
} else {
return true
} else if (this.$refs.jsonSchemaParams) {
return this.$refs.jsonSchemaParams.validate()
}
return true
})
},
getNodeFullConfig () {
Expand Down
Loading