Vue搭建后臺(tái)系統(tǒng)需要注意的問題
一、UI框架
推薦 Elemnet ui
二、圖表
vue-schart
npm install vue-schart -S
<template>
<div id="app">
<schart :canvasId="canvasId"
:type="type"
:width="width"
:height="height"
:data="data"
:options="options"
></schart>
</div>
</template>
<script>
import Schart from 'vue-schart';
export default {
data() {
return {
canvasId: 'myCanvas',
type: 'bar',
width: 500,
height: 400,
data: [
{name: '2014', value: 1342},
{name: '2015', value: 2123},
{name: '2016', value: 1654},
{name: '2017', value: 1795},
],
options: {
title: 'Total sales of stores in recent years'
}
}
},
components:{
Schart
}
}
</script>
三、富文本編輯器
vue-quill-editor
npm install vue-quill-editor
npm install quill
import Vue from 'vue'
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)
<template>
<div class="edit_container">
<quill-editor
v-model="content"
ref="myQuillEditor"
:options="editorOption"
@blur="onEditorBlur($event)" @focus="onEditorFocus($event)"
@change="onEditorChange($event)">
</quill-editor>
<button v-on:click="saveHtml">保存</button>
</div>
</template>
<script>
export default {
name: 'App',
data(){
return {
content: `<p>hello world</p>`,
editorOption: {}
}
},computed: {
editor() {
return this.$refs.myQuillEditor.quill;
},
},methods: {
onEditorReady(editor) { // 準(zhǔn)備編輯器
},
onEditorBlur(){}, // 失去焦點(diǎn)事件
onEditorFocus(){}, // 獲得焦點(diǎn)事件
onEditorChange(){}, // 內(nèi)容改變事件
saveHtml:function(event){
alert(this.content);
}
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
四、markdown編輯器
npm install mavon-editor --save
<template>
<div>
<mavon-editor ref="editor" v-model="doc"> </mavon-editor>
</div>
</template>
<script>
import {mavonEditor} from "mavon-editor";
import "mavon-editor/dist/css/index.css";
export default {
name: "Create",
components: {mavonEditor},
data(){
return {
doc: '',
}
}
}
</script>
總結(jié)
以上所述是小編給大家介紹的Vue搭建后臺(tái)系統(tǒng)需要注意的問題,希望對(duì)大家有所幫助,如果大家有任何疑問請(qǐng)給我留言,小編會(huì)及時(shí)回復(fù)大家的。在此也非常感謝大家對(duì)腳本之家網(wǎng)站的支持!
如果你覺得本文對(duì)你有幫助,歡迎轉(zhuǎn)載,煩請(qǐng)注明出處,謝謝!
相關(guān)文章
關(guān)于vue設(shè)置環(huán)境變量全流程
這篇文章主要介紹了關(guān)于vue設(shè)置環(huán)境變量全流程,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2022-03-03
vue.js項(xiàng)目 el-input 組件 監(jiān)聽回車鍵實(shí)現(xiàn)搜索功能示例
今天小編就為大家分享一篇vue.js項(xiàng)目 el-input 組件 監(jiān)聽回車鍵實(shí)現(xiàn)搜索功能示例,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來(lái)看看吧2018-08-08
在vant中使用時(shí)間選擇器和popup彈出層的操作
這篇文章主要介紹了在vant中使用時(shí)間選擇器和popup彈出層的操作,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。一起跟隨小編過來(lái)看看吧2020-11-11
vue中利用simplemde實(shí)現(xiàn)markdown編輯器(增加圖片上傳功能)
這篇文章主要介紹了vue中利用simplemde實(shí)現(xiàn)markdown編輯器(增加圖片上傳功能),本文通過實(shí)例代碼相結(jié)合的形式給大家介紹的非常詳細(xì),具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2019-04-04
Vue開發(fā)工具之vuejs-devtools安裝教程及常見問題解決(最詳細(xì))
這篇文章主要介紹了Vue開發(fā)工具vuejs-devtools超級(jí)詳細(xì)安裝教程以及常見問題解決本篇文章是最詳細(xì)的vue開發(fā)工具vuejs-devtools安裝教程,需要的朋友可以參考下2022-11-11
使用命令行工具npm新創(chuàng)建一個(gè)vue項(xiàng)目的方法
Vue.js 提供一個(gè)官方命令行工具,可用于快速搭建大型單頁(yè)應(yīng)用。下面小編給大家分享使用命令行工具npm新創(chuàng)建一個(gè)vue項(xiàng)目的方法,需要的朋友參考下吧2017-12-12

