cloud-web-corejs 1.0.54-dev.510 → 1.0.54-dev.513

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -168,7 +168,12 @@
168
168
  :editAttachment.sync="editAttachment"
169
169
  :edit.sync="$attrs.edit"
170
170
  ></propertiesDialog>
171
-
171
+ <el-image-viewer
172
+ v-if="showViewer"
173
+ :on-close="closeViewer"
174
+ :initial-index.sync="chooseIndex"
175
+ :url-list="pictureDtoList"
176
+ />
172
177
  </div>
173
178
  </template>
174
179
 
@@ -0,0 +1,104 @@
1
+ <template>
2
+ <div class="bt-input">
3
+ <el-input v-bind="$attrs" v-on="$listeners" type="textarea">
4
+ ></el-input>
5
+ <el-tooltip effect="dark" placement="top" :disabled="!$attrs.value">
6
+ <div slot="content" v-html="handleNewlines($attrs.value)"></div>
7
+ <el-link icon="el-icon-question" @click="openDialog" :disabled="$attrs.disabled || $attrs.readonly" v-if="showIcon">
8
+ </el-link>
9
+ </el-tooltip>
10
+ <el-dialog
11
+ :title="title || $t1('内容')"
12
+ :append-to-body="true"
13
+ :modal-append-to-body="true"
14
+ :close-on-click-modal="false"
15
+ v-if="showDialog"
16
+ :visible.sync="showDialog"
17
+ :modal="false"
18
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
19
+ width="1200px"
20
+ v-el-drag-dialog
21
+ v-el-dialog-center
22
+ >
23
+ <div class="cont" style="height: 450px">
24
+ <el-input
25
+ type="textarea"
26
+ v-model="content"
27
+ :rows="25"
28
+ :placeholder="$attrs.placeholder || $t1('请输入内容')"
29
+ resize="none"
30
+ :disabled="$attrs.disabled"
31
+ :readonly="$attrs.readonly"
32
+ >
33
+ </el-input>
34
+ </div>
35
+ <span slot="footer" class="dialog-footer">
36
+ <el-button type="primary" plain class="button-sty" @click="close">
37
+ <i class="el-icon-close el-icon"></i>
38
+ 取 消
39
+ </el-button>
40
+ <el-button
41
+ type="primary"
42
+ @click="confirm"
43
+ class="button-sty"
44
+ v-if="!$attrs.disabled && !$attrs.readonly"
45
+ >
46
+ <i class="el-icon-check el-icon"></i>
47
+ 确 定
48
+ </el-button>
49
+ </span>
50
+ </el-dialog>
51
+ </div>
52
+ </template>
53
+ <script>
54
+ export default {
55
+ name: "BaseTextarea",
56
+ components: {
57
+ },
58
+ props: {
59
+ title: {
60
+ type: String,
61
+ default: null,
62
+ },
63
+ showIcon: {
64
+ type: Boolean,
65
+ default: true,
66
+ },
67
+ },
68
+ data() {
69
+ return {
70
+ content: null,
71
+ showDialog: false,
72
+ };
73
+ },
74
+ methods: {
75
+ openDialog() {
76
+ this.content = this.$attrs.value;
77
+ this.showDialog = true;
78
+ },
79
+ confirm() {
80
+ this.$emit("input", this.content);
81
+ this.showDialog = false;
82
+ },
83
+
84
+ close() {
85
+ this.showDialog = false;
86
+ },
87
+ handleNewlines(text) {
88
+ if (text && text.includes("\n")) {
89
+ return text.replaceAll("\n", "<br/>");
90
+ } else {
91
+ return text;
92
+ }
93
+ },
94
+ },
95
+ };
96
+ </script>
97
+ <style scoped>
98
+ .el-link.el-link--default.is-disabled {
99
+ color: #606266;
100
+ }
101
+ ::v-deep.el-textarea {
102
+ width: calc(100% - 12px) !important;
103
+ }
104
+ </style>