f60b31044a9a117244e7cd5d51f29b53d425a409..a71b6416b467cd3b2ec24efd68accc85223e8a3b
2022-03-01 inleft
预览调整
a71b64 diff | tree
2022-02-28 inleft
添加md预览弹窗
9c695b diff | tree
4 files modified
1 files added
70 ■■■■■ changed files
src/components/group/MyPreviewModal.vue 46 ●●●●● patch | view | raw | blame | history
src/components/group/articleListScorll.vue 2 ●●● patch | view | raw | blame | history
src/components/group/tool.vue 7 ●●●●● patch | view | raw | blame | history
src/components/swichLabel/main1-show.vue 11 ●●●● patch | view | raw | blame | history
src/components/swichLabel/main3-show.vue 4 ●●●● patch | view | raw | blame | history
src/components/group/MyPreviewModal.vue
New file
@@ -0,0 +1,46 @@
<template>
    <div class="myModal">
        <a-modal v-model="visible" title="编辑预览"  width="60%" :footer="null"
            :bodyStyle="{'overflow':'overlay','width': '100%','height': '100%'}">
            <div style="display: flex;">
                <a-textarea style="height: 750px;min-width: 50%" v-model="text"  />
                <div class="markdown-body article-detail" style="min-width: 50%;border: 1px solid #d9d9d9;">
                    <vue-markdown  :source="text"></vue-markdown>
                </div>
            </div>
        </a-modal>
    </div>
</template>
<script>
    import VueMarkdown from 'vue-markdown'
    import md5 from 'js-md5';
    export default {
        components: {
            VueMarkdown
        },
        data() {
            return {
                visible: false,
                text: "### 十里平湖 \r> ##### (卢照邻)  \r> 化自《长安古意》 \r* 十里平湖霜满天 \r* 寸寸青丝愁华年 \r* 对月形单望相护 \r* 只羡鸳鸯不羡仙 \r![](http://blog.inleft.com/photo/example.jpg)",
            }
        },
        methods: {
            getCalendarContainer(trigger) {
                return this.$refs.myModal;
            },
            showModal() {
                this.visible = true;
            },
            handleCancel(e) {
                this.visible = false;
            },
        },
    }
</script>
<style>
</style>
src/components/group/articleListScorll.vue
@@ -76,7 +76,7 @@
                busy: false,
                size: "small",
                total: 1,
                pageSize: 10,
                pageSize: 6,
                current: 1,
                defaultPageSize:10
            };
src/components/group/tool.vue
@@ -8,6 +8,10 @@
            <!-- <a-button @click="showDrawer2">
                抽屉2
            </a-button> -->
            <a-button @click="showPreview">
                预览
                <a-icon type="youtube" />
            </a-button>
            <a-button @click="showModal">
                日志
                <a-icon type="plus-circle" />
@@ -40,6 +44,9 @@
            showModal() {
                this.$emit('showModal')
            },
            showPreview() {
                this.$emit('showPreview')
            },
            showScreen() {
                this.$emit('showScreen')
                if (this.screen) {
src/components/swichLabel/main1-show.vue
@@ -1,6 +1,7 @@
<template>
    <div>
        <MyModal ref="myModal"></MyModal>
        <MyPreviewModal ref="MyPreviewModal"></MyPreviewModal>
        <div class="blog-drawer">
            <a-drawer placement="left" :closable="false" :visible="visible1" :getContainer="'body'"
@@ -37,7 +38,8 @@
                <a-col v-bind="colApiRight" ref="myDrawer">
                    <!-- <boxRight></boxRight> -->
                    <tool @showModal="showModal" @showDrawer1="showDrawer1" @showScreen="showScreen"></tool>
                    <tool @showModal="showModal" @showPreview="showPreview" @showDrawer1="showDrawer1"
                        @showScreen="showScreen"></tool>
                </a-col>
            </a-row>
        </div>
@@ -51,6 +53,7 @@
    import articleListScorll from "../group/articleListScorll.vue"
    import tool from "../group/tool.vue"
    import MyModal from "../group/MyModal.vue"
    import MyPreviewModal from "../group/MyPreviewModal.vue"
    export default {
@@ -60,6 +63,7 @@
            articleListScorll,
            tool,
            MyModal,
            MyPreviewModal,
        },
        methods: {
            showScreen() {
@@ -83,6 +87,9 @@
            },
            showModal() {
                this.$refs.myModal.showModal();
            },
            showPreview() {
                this.$refs.MyPreviewModal.showModal();
            },
            afterVisibleChange(val) {},
            showDrawer1() {
@@ -162,8 +169,6 @@
</script>
<style lang="less">
    @font-face {
        font-family: 'HYTangMeiRen';
        // font-display: swap;
src/components/swichLabel/main3-show.vue
@@ -3,8 +3,8 @@
        <a-row>
            <a-col v-bind="colApiMain " class="holdHeight">
                <a-page-header title="我的网盘" style="padding: 0px;" @back="() => this.$router.go(-1)" />
                <!-- <net-file></net-file> -->
                <myVideo></myVideo>
                <net-file></net-file>
                <!-- <myVideo></myVideo> -->
            </a-col>
        </a-row>
    </div>