feat:更换字体图标
This commit is contained in:
@@ -103,6 +103,26 @@
|
|||||||
color: $--color-text-regular;
|
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{
|
.notebook-add{
|
||||||
padding-bottom: 60px;
|
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
@@ -5,6 +5,13 @@
|
|||||||
"css_prefix_text": "nz-icon-",
|
"css_prefix_text": "nz-icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "37448064",
|
||||||
|
"name": "Notebook",
|
||||||
|
"font_class": "Notebook",
|
||||||
|
"unicode": "e803",
|
||||||
|
"unicode_decimal": 59395
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "37390892",
|
"icon_id": "37390892",
|
||||||
"name": "Doughnut chart",
|
"name": "Doughnut chart",
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -1,6 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="mt-10 rich-text-container" v-cloak style="height: 100%;width: 100%;">
|
<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">
|
<el-scrollbar style="height: 100%;" class="el-scrollbar-normal">
|
||||||
<v-md-preview v-if="chartInfo.param.editorType==='markdown'" :text="text"></v-md-preview>
|
<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>
|
<div v-else class="el-scrollbar-normal__color" style="height: 100%;" v-html="text"></div>
|
||||||
@@ -10,8 +21,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import markdownEditor from '@/components/chart/markdownEditor'
|
||||||
export default {
|
export default {
|
||||||
name: 'chart-text',
|
name: 'chart-text',
|
||||||
|
components: {
|
||||||
|
markdownEditor
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
chartInfo: {},
|
chartInfo: {},
|
||||||
chartData: {},
|
chartData: {},
|
||||||
@@ -23,6 +38,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
save () {
|
||||||
|
this.chartInfo.param.isEdit = false
|
||||||
|
},
|
||||||
|
cancel () {
|
||||||
|
this.chartInfo.param.isEdit = false
|
||||||
|
},
|
||||||
|
textChange (val) {
|
||||||
|
console.log(val)
|
||||||
|
},
|
||||||
resize () {
|
resize () {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
|
||||||
<v-md-editor v-model="text" @change="textChange" mode="edit" height="390px" :leftToolbar="leftToolbar" right-toolbar="" class="markdownEditor"></v-md-editor>
|
<v-md-editor v-model="text" @change="textChange" mode="edit" height="390px" :leftToolbar="leftToolbar" right-toolbar="" class="markdownEditor"></v-md-editor>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<div @click="download('pdf')">{{$t('notebook.downloadAs',{format:'PDF'})}}</div>
|
<div @click="download('pdf')">{{$t('notebook.downloadAs',{format:'PDF'})}}</div>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item v-has="'dashboard_view'">
|
<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>
|
||||||
<el-dropdown-item v-has="'dashboard_view'">
|
<el-dropdown-item v-has="'dashboard_view'">
|
||||||
<div @click="downloadJson()">{{$t('notebook.downloadNotebook')}} JSON</div>
|
<div @click="downloadJson()">{{$t('notebook.downloadNotebook')}} JSON</div>
|
||||||
|
|||||||
@@ -511,7 +511,8 @@ export default {
|
|||||||
varValue: '',
|
varValue: '',
|
||||||
result: 'show'
|
result: 'show'
|
||||||
},
|
},
|
||||||
editorType: 'markdown'
|
editorType: 'markdown',
|
||||||
|
isEdit: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
delete this.editChart.elements
|
delete this.editChart.elements
|
||||||
|
|||||||
Reference in New Issue
Block a user