yujialong 1 year ago
parent 5abfd1dc32
commit 71dd3009e2
  1. 4
      public/styles/css/editor.css
  2. 59
      src/components/modules/link.vue
  3. 5
      src/components/modules/module.vue

@ -100,7 +100,9 @@
}
.tiny-wrap .people .pic {
max-width: 400px;
margin-right: 50px;
}
.tiny-wrap .people .texts {
margin-left: 50px;
}
.tiny-wrap .people h6 {
font-size: 24px;

@ -1,9 +1,16 @@
<template>
<!-- 设置链接 -->
<div>
<el-dialog title="设置链接地址" :visible.sync="visible" width="500px" :close-on-click-modal="false" :before-close="close">
<el-form :model="data" class="model" label-width="120px">
<el-form-item prop="connectionType" label="连接类型">
<el-dialog title="设置链接地址"
:visible.sync="visible"
width="500px"
:close-on-click-modal="false"
:before-close="close">
<el-form :model="data"
class="model"
label-width="120px">
<el-form-item prop="connectionType"
label="连接类型">
<el-radio-group v-model="data.connectionType">
<!-- <el-radio :label="0"></el-radio> -->
<el-radio :label="1">站内链接</el-radio>
@ -12,9 +19,8 @@
</el-radio-group>
</el-form-item>
<template v-if="data.connectionType === 1">
<el-form-item label="站内链接">
<el-cascader
ref="column"
<el-form-item label="栏目">
<el-cascader ref="column"
v-model="data.columnId"
:options="columns"
:props="columnProps"
@ -22,8 +28,7 @@
</el-form-item>
<el-form-item label="文章">
<el-select v-model="data.articleId">
<el-option
v-for="item in articles"
<el-option v-for="item in articles"
:key="item.id"
:label="item.title"
:value="item.id">
@ -31,18 +36,19 @@
</el-select>
</el-form-item>
</template>
<el-form-item v-show="data.connectionType === 2" prop="linkAddress" label="站外链接">
<el-input
placeholder="请输入站外链接"
<el-form-item v-show="data.connectionType === 2"
prop="linkAddress"
label="站外链接">
<el-input placeholder="请输入站外链接"
v-model.trim="data.linkAddress"
clearable
></el-input>
clearable></el-input>
</el-form-item>
<template v-if="data.connectionType === 3">
<el-form-item prop="site" label="站点选择">
<el-select v-model="data.site" @change="getOtherColumn">
<el-option
v-for="item in sites"
<el-form-item prop="site"
label="站点选择">
<el-select v-model="data.site"
@change="getOtherColumn">
<el-option v-for="item in sites"
:key="item.id"
:label="item.siteName"
:value="item.id">
@ -50,8 +56,7 @@
</el-select>
</el-form-item>
<el-form-item label="栏目">
<el-cascader
ref="otherColumn"
<el-cascader ref="otherColumn"
v-model="data.otherColumnId"
:options="otherColumns"
:props="columnProps"
@ -59,8 +64,7 @@
</el-form-item>
<el-form-item label="文章">
<el-select v-model="data.otherArticleId">
<el-option
v-for="item in articles"
<el-option v-for="item in articles"
:key="item.id"
:label="item.title"
:value="item.id">
@ -68,17 +72,19 @@
</el-select>
</el-form-item>
</template>
<el-form-item prop="isOpen" label="新窗口打开">
<el-switch
v-model="data.isOpen"
<el-form-item prop="isOpen"
label="新窗口打开">
<el-switch v-model="data.isOpen"
:active-value="1"
:inactive-value="0">
</el-switch>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<span slot="footer"
class="dialog-footer">
<el-button @click="$emit('update:visible', false)">取消</el-button>
<el-button type="primary" @click="linkSubmit">确定</el-button>
<el-button type="primary"
@click="linkSubmit">确定</el-button>
</span>
</el-dialog>
</div>
@ -200,5 +206,4 @@ export default {
};
</script>
<style lang="scss" scoped>
</style>

@ -122,7 +122,12 @@
:file-list="fileList"
:headers="headers"
:action="api.upload">
<el-button>上传视频</el-button>
<div slot="tip"
class="el-upload__tip">
<p>请上传大小1G以内的视频</p>
</div>
</el-upload>
<!-- 图片视频都可上传 -->
<el-upload v-if="item.type === 'media'"

Loading…
Cancel
Save