|
|
@@ -8,15 +8,21 @@
|
|
|
class="tabs-content-pane"
|
|
|
v-for="(item, index) in customEvents"
|
|
|
:key="item.key"
|
|
|
- :tab="item.name"
|
|
|
:disabled="!item.isShow"
|
|
|
- ></a-tab-pane>
|
|
|
+ >
|
|
|
+ <template #tab>
|
|
|
+ <span>
|
|
|
+ <CopyrightCircleOutlined v-show="getEvent(item.key)"/>
|
|
|
+ {{item.name}}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </a-tab-pane>
|
|
|
</a-tabs>
|
|
|
- <div class="code-content" :style="{ height: `calc(100vh - ${type === '0' ? '120' : '80'}px)` }">
|
|
|
+ <div class="code-content" :style="{ height: `calc(100vh - ${type == '0' ? '120' : '65'}px)` }">
|
|
|
<div class="editor-wrapper">
|
|
|
<div class="editor-left">
|
|
|
<a-collapse v-model:activeKey="expandedKeys" style="width: 100%; height: 100%; overflow: auto">
|
|
|
- <a-collapse-panel key="1" header="表单数据快捷代码(双击获取)">
|
|
|
+ <a-collapse-panel key="1" header="表单数据快捷代码(双击获取)" class="custom-collapse-panel">
|
|
|
<a-tree
|
|
|
show-icon
|
|
|
:tree-line="true"
|
|
|
@@ -88,25 +94,26 @@
|
|
|
@asyncGetEditor="getEditor"
|
|
|
v-model:modelValue="editorJsCode"
|
|
|
width="100%"
|
|
|
- height="100%"
|
|
|
+ height="calc(100% - 30px)"
|
|
|
language="javascript"
|
|
|
:editorOptions="editorOptions"
|
|
|
ref="MonacoEditorRef"
|
|
|
/>
|
|
|
+ <div class="copy-btn-box">
|
|
|
+ <a-button @click="copyCode" data-clipboard-action="copy" :data-clipboard-text="editorJsCode" type="dashed"
|
|
|
+ class="copy-btn">
|
|
|
+ 复制代码
|
|
|
+ </a-button>
|
|
|
+ <a-button @click="saveCode" type="primary" :loading="submitLoading"> 保存(Ctrl
|
|
|
+ + S)
|
|
|
+ </a-button>
|
|
|
+ <a-button @click="viewCode" type="dashed" class="copy-btn"> 查看历史</a-button>
|
|
|
+ </div>
|
|
|
</a-spin>
|
|
|
<CodeHistory :activekey="activeKey" :config="config" ref="codeHistory"/>
|
|
|
</div>
|
|
|
|
|
|
- <div class="copy-btn-box">
|
|
|
- <a-button @click="copyCode" data-clipboard-action="copy" :data-clipboard-text="editorJsCode" type="dashed"
|
|
|
- class="copy-btn">
|
|
|
- 复制代码
|
|
|
- </a-button>
|
|
|
- <a-button @click="saveCode" type="primary" :loading="submitLoading"> 保存(Ctrl
|
|
|
- + S)
|
|
|
- </a-button>
|
|
|
- <a-button @click="viewCode" type="dashed" class="copy-btn"> 查看历史</a-button>
|
|
|
- </div>
|
|
|
+
|
|
|
</div>
|
|
|
</a-drawer>
|
|
|
</template>
|
|
|
@@ -202,6 +209,7 @@ export default {
|
|
|
expandedKeys: ['1'],
|
|
|
editor: null,
|
|
|
currentJsCode: '',
|
|
|
+ type: '0',
|
|
|
};
|
|
|
},
|
|
|
async mounted() {
|
|
|
@@ -214,13 +222,15 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
+ getEvent(key) {
|
|
|
+ return JSON.parse(sessionStorage.getItem('_scriptKeys_')).includes(key)
|
|
|
+ },
|
|
|
viewCode() {
|
|
|
this.$refs.codeHistory.showDrawer(this.activeKey);
|
|
|
},
|
|
|
copyFieldCode(code) {
|
|
|
|
|
|
},
|
|
|
-
|
|
|
onFSelect(value) {
|
|
|
//记录点击次数
|
|
|
this.treeClickCount++;
|
|
|
@@ -948,8 +958,14 @@ const commonParams = [
|
|
|
|
|
|
.editor-left {
|
|
|
width: 500px;
|
|
|
- padding: 0 20px;
|
|
|
- height: 100%;
|
|
|
+ height: calc(100% - 5px);
|
|
|
+ overflow-y: auto;
|
|
|
+ border: 1px solid #ccc; /* 添加灰色边框 */
|
|
|
+ border-radius: 8px; /* 添加圆角边框 */
|
|
|
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
|
|
|
+ background-color: #fff; /* 设置背景颜色 */
|
|
|
+ padding: 6px; /* 添加内边距 */
|
|
|
+ margin: 6px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -965,4 +981,8 @@ const commonParams = [
|
|
|
.header-des {
|
|
|
color: #4fbf67;
|
|
|
}
|
|
|
+.ant-tabs .ant-tabs-tab .anticon {
|
|
|
+ margin-right: 2px;
|
|
|
+}
|
|
|
+
|
|
|
</style>
|