mirror of
https://gitee.com/chu1204505056/vue-admin-beautiful.git
synced 2025-04-05 19:41:43 +08:00
移除不常用组件
This commit is contained in:
parent
32ef0ae2d6
commit
a3bf52dfe1
@ -93,27 +93,12 @@ const data = [
|
||||
},
|
||||
{
|
||||
path: "table",
|
||||
component: "EmptyLayout",
|
||||
redirect: "noRedirect",
|
||||
component: "@/views/vab/table/index",
|
||||
name: "Table",
|
||||
meta: {
|
||||
title: "表格",
|
||||
permissions: ["admin"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "comprehensiveTable",
|
||||
name: "ComprehensiveTable",
|
||||
component: "@/views/vab/table/index",
|
||||
meta: { title: "综合表格" },
|
||||
},
|
||||
{
|
||||
path: "inlineEditTable",
|
||||
name: "InlineEditTable",
|
||||
component: "@/views/vab/table/inlineEditTable",
|
||||
meta: { title: "行内编辑" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "map",
|
||||
@ -240,12 +225,6 @@ const data = [
|
||||
component: "@/views/vab/imgComparison/index",
|
||||
meta: { title: "图像拖拽比对", permissions: ["admin"] },
|
||||
},
|
||||
{
|
||||
path: "markdown",
|
||||
name: "Markdown",
|
||||
component: "@/views/vab/markdown/index",
|
||||
meta: { title: "markdown阅读器", permissions: ["admin"] },
|
||||
},
|
||||
{
|
||||
path: "smallComponents",
|
||||
name: "SmallComponents",
|
||||
|
@ -131,27 +131,12 @@ export const asyncRoutes = [
|
||||
},
|
||||
{
|
||||
path: "table",
|
||||
component: EmptyLayout,
|
||||
redirect: "noRedirect",
|
||||
component: () => import("@/views/vab/table/index"),
|
||||
name: "Table",
|
||||
meta: {
|
||||
title: "表格",
|
||||
permissions: ["admin"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "comprehensiveTable",
|
||||
name: "ComprehensiveTable",
|
||||
component: () => import("@/views/vab/table/index"),
|
||||
meta: { title: "综合表格" },
|
||||
},
|
||||
{
|
||||
path: "inlineEditTable",
|
||||
name: "InlineEditTable",
|
||||
component: () => import("@/views/vab/table/inlineEditTable"),
|
||||
meta: { title: "行内编辑" },
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
path: "map",
|
||||
@ -287,12 +272,6 @@ export const asyncRoutes = [
|
||||
component: () => import("@/views/vab/imgComparison/index"),
|
||||
meta: { title: "图像拖拽比对", permissions: ["admin"] },
|
||||
},
|
||||
{
|
||||
path: "markdown",
|
||||
name: "Markdown",
|
||||
component: () => import("@/views/vab/markdown/index"),
|
||||
meta: { title: "markdown阅读器", permissions: ["admin"] },
|
||||
},
|
||||
{
|
||||
path: "smallComponents",
|
||||
name: "SmallComponents",
|
||||
|
@ -1,68 +0,0 @@
|
||||
<template>
|
||||
<div class="markdown-container markdown-body">
|
||||
<el-select v-model="value" placeholder="请选择" @change="handleChange">
|
||||
<el-option
|
||||
v-for="(item, index) in options"
|
||||
:key="index"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<div v-html="prettierList"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import marked from "marked";
|
||||
import "github-markdown-css/github-markdown.css";
|
||||
import { getList } from "@/api/markdown";
|
||||
export default {
|
||||
name: "Markdown",
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
elementLoadingText: "正在加载...",
|
||||
options: [
|
||||
{
|
||||
value: "0",
|
||||
label: "Prettier",
|
||||
},
|
||||
],
|
||||
value: "0",
|
||||
prettierList: null,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.fetchData();
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
handleChange(val) {
|
||||
this.value = val;
|
||||
this.fetchData();
|
||||
},
|
||||
async fetchData() {
|
||||
this.listLoading = true;
|
||||
switch (this.value) {
|
||||
case "0":
|
||||
const { data } = await getList();
|
||||
this.prettierList = marked(data || "", {
|
||||
renderer: new marked.Renderer(),
|
||||
gfm: true,
|
||||
tables: true,
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
sanitize: false,
|
||||
smartLists: true,
|
||||
smartypants: false,
|
||||
});
|
||||
|
||||
break;
|
||||
}
|
||||
setTimeout(() => {
|
||||
this.listLoading = false;
|
||||
}, 500);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,109 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-table
|
||||
v-loading="listLoading"
|
||||
:data="list"
|
||||
:element-loading-text="elementLoadingText"
|
||||
>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
type="selection"
|
||||
width="55"
|
||||
></el-table-column>
|
||||
<el-table-column show-overflow-tooltip label="序号" width="95">
|
||||
<template #default="scope">
|
||||
{{ scope.$index + 1 }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column show-overflow-tooltip min-width="300px" label="标题">
|
||||
<template #default="{ row }">
|
||||
<template v-if="row.edit">
|
||||
<el-input v-model="row.title" style="width: 300px" />
|
||||
<el-button
|
||||
class="cancel-btn"
|
||||
type="warning"
|
||||
@click="cancelEdit(row)"
|
||||
>
|
||||
取消
|
||||
</el-button>
|
||||
</template>
|
||||
<span v-else>{{ row.title }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
label="作者"
|
||||
prop="author"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
show-overflow-tooltip
|
||||
align="center"
|
||||
label="操作"
|
||||
width="200"
|
||||
>
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.edit"
|
||||
type="success"
|
||||
size="small"
|
||||
@click="confirmEdit(row)"
|
||||
>
|
||||
保存
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
type="primary"
|
||||
size="small"
|
||||
icon="el-icon-edit"
|
||||
@click="row.edit = !row.edit"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getList } from "@/api/table";
|
||||
|
||||
export default {
|
||||
name: "InlineEditTable",
|
||||
data() {
|
||||
return {
|
||||
list: null,
|
||||
listLoading: true,
|
||||
elementLoadingText: "正在加载...",
|
||||
queryForm: {
|
||||
pageNo: 1,
|
||||
pageSize: 20,
|
||||
title: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
async getList() {
|
||||
this.listLoading = true;
|
||||
const { data } = await getList(this.queryForm);
|
||||
this.list = data.map((v) => {
|
||||
this.$set(v, "edit", false);
|
||||
v.originalTitle = v.title;
|
||||
return v;
|
||||
});
|
||||
this.listLoading = false;
|
||||
},
|
||||
cancelEdit(row) {
|
||||
row.title = row.originalTitle;
|
||||
row.edit = false;
|
||||
},
|
||||
confirmEdit(row) {
|
||||
row.edit = false;
|
||||
row.originalTitle = row.title;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user