zydx-plus 1.18.85 → 1.19.85
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.
package/package.json
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="text" :style="{'min-height': height + 'px'}" contenteditable="true" ref="textarea"></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import Textarea from "@/App.vue";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
name: "zydx-textarea",
|
|
10
|
+
components: {Textarea},
|
|
11
|
+
props: {
|
|
12
|
+
value: {
|
|
13
|
+
type: String,
|
|
14
|
+
default: ''
|
|
15
|
+
},
|
|
16
|
+
height: {
|
|
17
|
+
type: Number,
|
|
18
|
+
default: 200
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
watch: {
|
|
22
|
+
value(val) {
|
|
23
|
+
this.$refs.textarea.innerHTML = val
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
mounted() {
|
|
27
|
+
this.$refs.textarea.innerHTML = this.value
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
getContent() {
|
|
31
|
+
const html = this.$refs.textarea.innerHTML
|
|
32
|
+
return html.replace(/<div>/g, '<br>').replace(/<\/div>/g, '').replace(/<p>/g, '<br>').replace(/<\/p>/g, '')
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style scoped>
|
|
39
|
+
.text{
|
|
40
|
+
width: 100%;
|
|
41
|
+
border: 1px solid #ccc;
|
|
42
|
+
padding: 10px;
|
|
43
|
+
box-sizing: border-box;
|
|
44
|
+
}
|
|
45
|
+
</style>
|
package/src/index.js
CHANGED
|
@@ -21,6 +21,7 @@ import editor2 from './components/editor2/index';
|
|
|
21
21
|
import dragPopup from './components/dragPopup/index';
|
|
22
22
|
import bizTaskInfo from './components/biz_taskInfo/index';
|
|
23
23
|
import read from './components/read/index';
|
|
24
|
+
import textarea from './components/textarea/index';
|
|
24
25
|
|
|
25
26
|
const components = [
|
|
26
27
|
Calendar,
|
|
@@ -43,7 +44,8 @@ const components = [
|
|
|
43
44
|
editor2,
|
|
44
45
|
dragPopup,
|
|
45
46
|
bizTaskInfo,
|
|
46
|
-
read
|
|
47
|
+
read,
|
|
48
|
+
textarea
|
|
47
49
|
];
|
|
48
50
|
|
|
49
51
|
function install(app) {
|
|
@@ -55,7 +57,7 @@ function install(app) {
|
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export default {
|
|
58
|
-
version: '1.
|
|
60
|
+
version: '1.19.85',
|
|
59
61
|
install,
|
|
60
62
|
Calendar,
|
|
61
63
|
Message,
|
|
@@ -79,6 +81,7 @@ export default {
|
|
|
79
81
|
editor2,
|
|
80
82
|
dragPopup,
|
|
81
83
|
bizTaskInfo,
|
|
82
|
-
read
|
|
84
|
+
read,
|
|
85
|
+
textarea
|
|
83
86
|
};
|
|
84
87
|
|