feat:更换字体图标

This commit is contained in:
zyh
2023-09-20 16:15:02 +08:00
parent 6ae9e9297d
commit 600fa76954
12 changed files with 76 additions and 18 deletions

View File

@@ -103,6 +103,26 @@
color: $--color-text-regular;
}
}
.notebook-editor{
position: relative;
box-sizing: border-box;
height: 100%;
padding: 10px;
.markdownEditor {
height: 100% !important;
}
.notebook-editor-btn{
height: 41px;
position: absolute;
top: 10px;
right: 20px;
display: flex;
align-items: center;
.nz-btn-size-normal{
height: 32px;
}
}
}
}
.notebook-add{
padding-bottom: 60px;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -5,6 +5,13 @@
"css_prefix_text": "nz-icon-",
"description": "",
"glyphs": [
{
"icon_id": "37448064",
"name": "Notebook",
"font_class": "Notebook",
"unicode": "e803",
"unicode_decimal": 59395
},
{
"icon_id": "37390892",
"name": "Doughnut chart",

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,17 @@
<template>
<div class="mt-10 rich-text-container" v-cloak style="height: 100%;width: 100%;">
<div :id="'chartContainer' + chartInfo.id" ref="chartContainer" class="text-content" >
<div class="notebook-editor" v-if="from==='notebook'&&chartInfo.param.isEdit" >
<markdownEditor :edit-data="chartInfo.param.text" @textChange="textChange"></markdownEditor>
<div class="notebook-editor-btn">
<button class="nz-btn nz-btn-size-normal nz-btn-style-light margin-r-10" @click="cancel">
<span>{{$t('overall.cancel')}}</span>
</button>
<button class="nz-btn nz-btn-size-normal nz-btn-style-normal" @click="save">
<span>{{$t('overall.save')}}</span>
</button>
</div>
</div>
<div v-else :id="'chartContainer' + chartInfo.id" ref="chartContainer" class="text-content">
<el-scrollbar style="height: 100%;" class="el-scrollbar-normal">
<v-md-preview v-if="chartInfo.param.editorType==='markdown'" :text="text"></v-md-preview>
<div v-else class="el-scrollbar-normal__color" style="height: 100%;" v-html="text"></div>
@@ -10,8 +21,12 @@
</template>
<script>
import markdownEditor from '@/components/chart/markdownEditor'
export default {
name: 'chart-text',
components: {
markdownEditor
},
props: {
chartInfo: {},
chartData: {},
@@ -23,6 +38,15 @@ export default {
}
},
methods: {
save () {
this.chartInfo.param.isEdit = false
},
cancel () {
this.chartInfo.param.isEdit = false
},
textChange (val) {
console.log(val)
},
resize () {
}

View File

@@ -1,7 +1,5 @@
<template>
<div>
<v-md-editor v-model="text" @change="textChange" mode="edit" height="390px" :leftToolbar="leftToolbar" right-toolbar="" class="markdownEditor"></v-md-editor>
</div>
</template>
<script>

View File

@@ -29,7 +29,7 @@
<div @click="download('pdf')">{{$t('notebook.downloadAs',{format:'PDF'})}}</div>
</el-dropdown-item>
<el-dropdown-item v-has="'dashboard_view'">
<div @click="download('markdown')">{{$t('notebook.downloadAs',{format:'markdown'})}}</div>
<div @click="download('html')">{{$t('notebook.downloadAs',{format:'markdown'})}}</div>
</el-dropdown-item>
<el-dropdown-item v-has="'dashboard_view'">
<div @click="downloadJson()">{{$t('notebook.downloadNotebook')}} JSON</div>

View File

@@ -511,7 +511,8 @@ export default {
varValue: '',
result: 'show'
},
editorType: 'markdown'
editorType: 'markdown',
isEdit: true
}
}
delete this.editChart.elements