時間:2023-04-29 21:09:02 | 來源:網(wǎng)站運營
時間:2023-04-29 21:09:02 來源:網(wǎng)站運營
vue-manage-system:后臺管理系統(tǒng)解決方案:基于Vue.js 2.x系列 + Element UI 的后臺管理系統(tǒng)解決方案。github地址:lin-xin/manage-system
demo地址:lin-xin.gitee.io/example/work/
git clone https://github.com/lin-xin/manage-system.git // 把模板下載到本地cd manage-system // 進入模板目錄npm install // 安裝項目依賴,等待安裝完成之后
// 開啟服務(wù)器,瀏覽器訪問 http://localhost:8080npm run dev
// 執(zhí)行構(gòu)建命令,生成的dist文件夾放在服務(wù)器下即可訪問npm run build
<template> <div> <datasource language="en" :table-data="information.data" :columns="columns" :pagination="information.pagination" :actions="actions" v-on:change="changePage" v-on:searching="onSearch"></datasource> </div></template><script> import Datasource from 'vue-datasource'; // 導入quillEditor組件 export default { data: function(){ return { information: { pagination: {...}, // 頁碼配置 data: [...] }, columns: [...], // 列名配置 actions: [...] // 功能配置 } }, components: { Datasource // 聲明組件Datasource }, methods: { changePage(values) {...}, onSearch(searchQuery) {...} } }</script>
<template> <div> <quill-editor ref="myTextEditor" v-model="content" :config="editorOption"></quill-editor> </div></template><script> import { quillEditor } from 'vue-quill-editor'; // 導入quillEditor組件 export default { data: function(){ return { content: '', // 編輯器的內(nèi)容 editorOption: { // 編輯器的配置 // something config } } }, components: { quillEditor // 聲明組件quillEditor } }</script>
<template> <div> <markdown-editor v-model="content" :configs="configs" ref="markdownEditor"></markdown-editor> </div></template><script> import { markdownEditor } from 'vue-simplemde'; // 導入markdownEditor組件 export default { data: function(){ return { content:'', // markdown編輯器內(nèi)容 configs: { // markdown編輯器配置參數(shù) status: false, // 禁用底部狀態(tài)欄 initialValue: 'Hello BBK', // 設(shè)置初始值 renderingConfig: { codeSyntaxHighlighting: true, // 開啟代碼高亮 highlightingTheme: 'atom-one-light' // 自定義代碼高亮主題 } } } }, components: { markdownEditor // 聲明組件markdownEditor } }</script>
<template> <div> <img :src="src"> // 用于顯示上傳的圖片 <vue-core-image-upload :class="['pure-button','pure-button-primary','js-btn-crop']" :crop="true" // 是否裁剪 text="上傳圖片" url="" // 上傳路徑 extensions="png,gif,jpeg,jpg" // 限制文件類型 @:imageuploaded="imageuploaded"> // 監(jiān)聽圖片上傳完成事件 </vue-core-image-upload> </div></template><script> import VueCoreImageUpload from 'vue-core-image-upload'; // 導入VueCoreImageUpload組件 export default { data: function(){ return { src:'../img/1.jpg' // 默認顯示圖片地址 } }, components: { VueCoreImageUpload // 聲明組件VueCoreImageUpload }, methods:{ imageuploaded(res) { // 定義上傳完成執(zhí)行的方法 console.log(res) } } }</script>
<template> <div> <schart :canvasId="canvasId" :type="type" :width="width" :height="height" :data="data" :options="options" ></schart> </div></template> <script> import Schart from 'vue-schart'; // 導入Schart組件 export default { data: function(){ return { canvasId: 'myCanvas', // canvas的id type: 'bar', // 圖表類型 width: 500, height: 400, data: [ {name: '2014', value: 1342}, {name: '2015', value: 2123}, {name: '2016', value: 1654}, {name: '2017', value: 1795}, ], options: { // 圖表可選參數(shù) title: 'Total sales of stores in recent years' } } }, components: { Schart } }</script>
{ path: '/vuetable', component: resolve => require(['../components/page/VueTable.vue'], resolve) // vue-datasource組件},
第二步:刪除引入該組件的文件。在目錄 src/components/page/ 刪除 VueTable.vue 文件。<el-menu-item index="vuetable">Vue表格組件</el-menu-item>
第四步:卸載該組件。執(zhí)行以下命令:npm un vue-datasource -S
完成。import 'element-ui/lib/theme-default/index.css'; // 默認主題// import '../static/css/theme-green/index.css'; // 淺綠色主題
第二步:打開 src/App.vue 文件,找到 style 標簽引入樣式的地方,切換成淺綠色主題。@import "../static/css/main.css";@import "../static/css/color-dark.css"; /*深色主題*//*@import "../static/css/theme-green/color-green.css"; !*淺綠色主題*!*/
第三步:打開 src/components/common/Sidebar.vue 文件,找到 el-menu 標簽,把 theme="dark" 去掉即可。關(guān)鍵詞:解決,方案,系統(tǒng),管理,后臺
微信公眾號
版權(quán)所有? 億企邦 1997-2025 保留一切法律許可權(quán)利。