mirror of
https://github.com/sahadev/vue-component-creater-ui.git
synced 2025-06-30 13:32:44 +08:00
调整UI
This commit is contained in:
parent
afb6a0c84f
commit
23ba2c6596
@ -1,30 +1,31 @@
|
||||
<template>
|
||||
<div class="top-tools-bar">
|
||||
|
||||
<div class="edit">
|
||||
<el-tooltip class="item" effect="dark" content="ctrl + z" placement="bottom-start">
|
||||
<el-link type="primary" @click="$emit('undo')">撤销(Undo)</el-link>
|
||||
</el-tooltip>
|
||||
<el-link type="primary" @click="$emit('redo')">重做(Redo)</el-link>
|
||||
</div>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="3">
|
||||
<div class="edit">
|
||||
<el-tooltip class="item" effect="dark" content="ctrl + z" placement="bottom-start">
|
||||
<el-link type="primary" @click="$emit('undo')" style="margin-right: 3px;">Undo</el-link>
|
||||
</el-tooltip>
|
||||
<el-link type="primary" @click="$emit('redo')">Redo</el-link>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<el-link type="primary" @click="onPreviewModeChange">{{previewMode ? 'Desktop' : 'Mobile'}}
|
||||
Mode</el-link>
|
||||
</el-col>
|
||||
<el-col :span="3">
|
||||
<div style="display:inline-block;">
|
||||
<el-link type="primary" @click="onEditModeChange">{{editMode ? 'View' : 'Edit'}}
|
||||
Mode</el-link>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<el-link type="primary" @click="$emit('structureVisible')">Inspect Components
|
||||
Structure</el-link>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="display:inline-block;">
|
||||
<span>View Mode: </span>
|
||||
<el-switch v-model="previewMode" active-color="#13ce66" inactive-color="#13ce66"
|
||||
active-icon-class="el-icon-mobile" inactive-icon-class="el-icon-monitor" name="预览模式"
|
||||
@change="$emit('onPreviewModeChange', $event)">
|
||||
</el-switch>
|
||||
</div>
|
||||
|
||||
<div style="display:inline-block;">
|
||||
<span>Edit Mode: </span>
|
||||
<el-switch v-model="editMode" active-color="#13ce66" name="编辑模式" @change="$emit('onEditModeChange', $event)">
|
||||
</el-switch>
|
||||
</div>
|
||||
|
||||
<el-link :underline="false" style="margin-left: 10px;" @click="$emit('structureVisible')"><img
|
||||
style="width: 20px;vertical-align: bottom;margin-right:5px;" :src="iconTreeStructure">Inspect Components
|
||||
Structure</el-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -36,7 +37,6 @@ export default {
|
||||
return {
|
||||
previewMode: false,
|
||||
editMode: true,
|
||||
iconTreeStructure: ("https://static.imonkey.xueersi.com/download/vcc-resource/icon/tree-structure.png"),
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
@ -57,6 +57,16 @@ export default {
|
||||
logout() {
|
||||
window.ssoLogin.logout()
|
||||
},
|
||||
|
||||
onPreviewModeChange() {
|
||||
this.previewMode = !this.previewMode;
|
||||
this.$emit('onPreviewModeChange', this.previewMode);
|
||||
},
|
||||
|
||||
onEditModeChange() {
|
||||
this.editMode = !this.editMode;
|
||||
this.$emit('onEditModeChange', this.editMode);
|
||||
}
|
||||
},
|
||||
fillter: {},
|
||||
};
|
||||
|
@ -364,6 +364,13 @@ export default {
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
|
||||
.icon-s {
|
||||
font-size: 14px;
|
||||
color: #000;
|
||||
margin: 0 2px;
|
||||
}
|
||||
|
||||
.in-element {
|
||||
outline: 2px solid #4dba87 !important;
|
||||
position: relative;
|
||||
|
@ -15,7 +15,7 @@
|
||||
<vue-nestable v-model="treeData" @change="onLevelChange">
|
||||
<template slot-scope="{ item }">
|
||||
<vue-nestable-handle :item="item">
|
||||
拖
|
||||
<i class="el-icon-rank icon-s"></i>
|
||||
</vue-nestable-handle>
|
||||
|
||||
<span @click="onNodeClick(item)">{{ item.text }}</span>
|
||||
|
@ -274,12 +274,13 @@ nav {
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
color: #4dba87;
|
||||
transform: rotate(-90deg);
|
||||
transform: rotate(-90deg) translateY(29px);
|
||||
white-space: nowrap;
|
||||
position: absolute;
|
||||
bottom: 11px;
|
||||
left: 0;
|
||||
transform-origin: -2% 10%;
|
||||
height: 80px;
|
||||
line-height: 80px;
|
||||
transform-origin: 0% 50%;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
@ -290,7 +291,6 @@ nav {
|
||||
|
||||
.bottom-toolbar {
|
||||
flex-grow: 1;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
padding: 20px 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user