mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-11 16:57:09 +08:00
style: 代码生成预览样式调整
This commit is contained in:
@@ -9,9 +9,15 @@
|
||||
:footer="false"
|
||||
>
|
||||
<div class="preview-content">
|
||||
<a-layout>
|
||||
<a-layout-sider theme="dark" :resize-directions="['right']" style="height: 700px">
|
||||
<a-tree class="selectPreview" :data="treeData" :show-line="true" @select="onSelectPreview" />
|
||||
<a-layout :has-sider="true">
|
||||
<a-layout-sider theme="dark" style="max-width:600px;height: 700px" :resize-directions="['right']" :width="580">
|
||||
<a-tree class="selectPreview" :data="treeData" :show-line="false" @select="onSelectPreview">
|
||||
<template #icon=" node ">
|
||||
<GiSvgIcon v-if="!node.isLeaf && !node.expanded" :size="16" name="directory-blue" />
|
||||
<GiSvgIcon v-if="!node.isLeaf && node.expanded" :size="16" name="directory-open-blue" />
|
||||
<GiSvgIcon v-if="node.isLeaf" :size="16" name="drive-file" />
|
||||
</template>
|
||||
</a-tree>
|
||||
</a-layout-sider>
|
||||
<a-layout-content>
|
||||
<a-card :header-style="{ height: '50px' }">
|
||||
@@ -131,6 +137,7 @@ const onCopy = () => {
|
||||
copy(currentPreview.value?.content)
|
||||
}
|
||||
}
|
||||
|
||||
watch(copied, () => {
|
||||
if (copied.value) {
|
||||
Message.success('复制成功')
|
||||
@@ -140,6 +147,7 @@ watch(copied, () => {
|
||||
const gen = () => {
|
||||
emit('generate', [previewTableName.value])
|
||||
}
|
||||
|
||||
defineExpose({ onPreview })
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user