zydx-plus 1.18.79 → 1.18.81

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.79",
3
+ "version": "1.18.81",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <we-toolbar v-if="!readOnly && toolbar.length > 0" class="toolbar" :handle="handle" />
2
+ <we-toolbar v-show="!readOnly && toolbar.length > 0" class="toolbar" :handle="handle" />
3
3
  <we-editable class="editable" :style="{'min-height': height + 'px'}" :handle="handle" v-model:json="formData.html" />
4
4
  <div class="but" v-if="!readOnly && toolbar.length > 0">
5
5
  <button class="def-but" v-if="butShow" @click="confirm">完成</button>
@@ -64,17 +64,27 @@ export default defineComponent({
64
64
  watch: {
65
65
  html() {
66
66
  this.formData.html = this.html
67
+ },
68
+ readOnly(e) {
69
+ this.opts.editable.config.readOnly = e
67
70
  }
68
71
  },
69
72
  methods: {
70
73
  confirm() {
71
74
  this.syncContent() //强制同步数据
72
75
  this.$emit('confirm', this.formData.html)
76
+ },
77
+ getContent() {
78
+ this.syncContent() //强制同步数据
79
+ return this.formData.html
73
80
  }
74
81
  },
75
82
  mounted() {
76
83
  setTimeout(() => {
77
84
  this.formData.html = this.html
85
+ setTimeout(() => {
86
+ if(this.readOnly) this.opts.editable.config.readOnly = this.readOnly
87
+ },0)
78
88
  },0)
79
89
  },
80
90
  setup(props) {
@@ -92,7 +102,7 @@ export default defineComponent({
92
102
  editable: {
93
103
  config: {
94
104
  placeholder: props.placeholder,
95
- readOnly: props.readOnly,
105
+ readOnly: false,
96
106
  autoFocus: (props.html !== ''),
97
107
  MENU_CONF: {
98
108
  // 上传图片
@@ -124,7 +134,7 @@ export default defineComponent({
124
134
  }
125
135
  return -1
126
136
  }
127
- return { handle, formData, syncContent }
137
+ return { opts, handle, formData, syncContent }
128
138
  }
129
139
  })
130
140
  </script>
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div :style="heightStyle">
3
3
  <div class="ed-head">
4
- <div class="ed-title" v-if="titleShow">{{ title }}</div>
4
+ <div class="ed-title" v-if="titleShow" :style="titleStyle">{{ title }}</div>
5
5
  <div class="ed-but" v-if="readOnly">
6
6
  <div class="ed-head-but" v-for="(item,index) in toolbar">
7
7
  <button v-if="item.key === 'but'" class="but" @click="item.onClick(item,info)" :style="{color: (item.active)? '#00ff00' :'#000'}">{{ item.title }}</button>
@@ -70,6 +70,14 @@ export default {
70
70
  type: String,
71
71
  default: ''
72
72
  },
73
+ titleStyle: {
74
+ type: Object,
75
+ default: {
76
+ 'font-size': '16px',
77
+ 'font-weight': 'bold',
78
+ 'color': '#000'
79
+ }
80
+ },
73
81
  readOnly: {
74
82
  type: Boolean,
75
83
  default: true
@@ -293,7 +301,6 @@ export default {
293
301
  flex: 1;
294
302
  text-align: left;
295
303
  line-height: 22px;
296
- font-size: 14px;
297
304
  }
298
305
  .enclosure-list{
299
306
  display: flex;
package/src/index.js CHANGED
@@ -55,7 +55,7 @@ function install(app) {
55
55
  }
56
56
 
57
57
  export default {
58
- version: '1.18.79',
58
+ version: '1.18.81',
59
59
  install,
60
60
  Calendar,
61
61
  Message,