1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
| <template>
| <div class="upload-container">
| <el-button
| :style="{ background: color, borderColor: color }"
| icon="el-icon-upload"
| size="mini"
| type="primary"
| @click="modalPicTap('2')"
| >
| 上传图片</el-button
| >
| </div>
| </template>
|
| <script>
| export default {
| name: 'EditorSlideUpload',
| props: {
| color: {
| type: String,
| default: '#1890ff',
| },
| },
| data() {
| return {
| dialogVisible: false,
| listObj: {},
| fileList: [],
| };
| },
| methods: {
| modalPicTap(tit) {
| const _this = this;
| this.$modalUpload(
| function (img) {
| let arr = [];
| if (img.length > 10) return this.$message.warning('最多选择10张图片!');
| img.map((item) => {
| arr.push(item.sattDir);
| });
| _this.$emit('successCBK', arr);
| },
| tit,
| 'content',
| );
| },
| },
| };
| </script>
|
| <style lang="scss" scoped>
| .editor-slide-upload {
| margin-bottom: 20px;
| ::v-deep .el-upload--picture-card {
| width: 100%;
| }
| }
| </style>
|
|