zydx-plus 1.18.84 → 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.18.84",
3
+ "version": "1.19.85",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -120,7 +120,7 @@ export default {
120
120
  },
121
121
  editorShow: {
122
122
  type: Boolean,
123
- default: false
123
+ default: true
124
124
  }
125
125
  },
126
126
  emits: ['see','complete','update:data'],
@@ -0,0 +1,7 @@
1
+ import main from './src/textarea';
2
+
3
+ main.install = function(Vue) {
4
+ Vue.component(main.name, main);
5
+ };
6
+
7
+ export default main;
@@ -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>
@@ -64,7 +64,12 @@ export default {
64
64
  default: 0
65
65
  }
66
66
  },
67
- methods: {
67
+ watch: {
68
+ actives(val) {
69
+ this.active = val
70
+ }
71
+ },
72
+ methods: {
68
73
  del(data) {
69
74
  this.$emit('del',data)
70
75
  },
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.18.84',
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