Skip to content

Commit 444dfeb

Browse files
committed
fix:policy editor scroll bug
1 parent 0ab8263 commit 444dfeb

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

components/buckets/info-bak.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
<n-select v-model:value="policyFormValue.policy" placeholder="请选择策略" :options="policyOptions" />
163163
</n-form-item>
164164
<n-form-item :span="24" v-if="policyFormValue.policy =='custom'" label="策略原文" path="content">
165-
<json-editor v-model="policyFormValue.content" class="max-h-[60vh] overflow-y-auto" />
165+
<json-editor v-model="policyFormValue.content" class=" overflow-y-auto" />
166166
</n-form-item>
167167
<n-form-item>
168168
<n-button type="primary" @click="submitTagForm">确认</n-button>

components/buckets/info.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<n-select v-model:value="policyFormValue.policy" placeholder="请选择策略" :options="policyOptions" />
8080
</n-form-item>
8181
<n-form-item :span="24" v-if="policyFormValue.policy =='custom'" label="策略原文" path="content">
82-
<json-editor v-model="policyFormValue.content" class="max-h-[60vh] overflow-y-auto" />
82+
<n-scrollbar class="w-full max-h-[60vh] "> <json-editor v-model="policyFormValue.content" /></n-scrollbar>
8383
</n-form-item>
8484
<n-form-item>
8585
<n-button type="primary" @click="submitPolicyForm">确认</n-button>

components/json-editor.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ watch(
3535
</template>
3636
<style scoped>
3737
:deep(.jse-main) {
38-
max-height: 800px;
3938
min-height: 300px;
4039
}
4140
.editor {

components/policies/form-item.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ async function submitForm() {
6262
<n-form-item-grid-item :span="24" label="策略名称" path="name">
6363
<n-input v-model:value="name" />
6464
</n-form-item-grid-item>
65-
<n-form-item-grid-item :span="24" label="策略原文" path="content">
66-
<json-editor v-model="content" class="max-h-[60vh] overflow-y-auto" />
65+
<n-form-item-grid-item :span="24" label="策略原文" path="content" >
66+
<n-scrollbar class="w-full max-h-[60vh] "> <json-editor v-model="content" /></n-scrollbar>
6767
</n-form-item-grid-item>
6868
</n-grid>
6969
</n-form>

0 commit comments

Comments
 (0)