meixioacomponent 0.3.38 → 0.3.41
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/lib/meixioacomponent.common.js +124 -108
- package/lib/meixioacomponent.umd.js +124 -108
- package/lib/meixioacomponent.umd.min.js +10 -10
- package/package.json +1 -1
- package/packages/components/proForm/proForm/pro_form.vue +16 -14
- package/packages/components/proForm/proForm/pro_form_item.vue +16 -4
package/package.json
CHANGED
|
@@ -38,25 +38,27 @@
|
|
|
38
38
|
@formItemConfirm="formItemConfirm"
|
|
39
39
|
@disableWatcherResult="disableWatcherResult"
|
|
40
40
|
:disableWatcher="setWatcher(item.key)"
|
|
41
|
-
v-if="formType == 'default'
|
|
41
|
+
v-if="formType == 'default'"
|
|
42
42
|
>
|
|
43
43
|
<template slot="template" v-if="item.type == 'template'">
|
|
44
44
|
<slot :name="`form-${item.key}`" :scope="module"></slot>
|
|
45
45
|
</template>
|
|
46
|
+
<template slot="area" v-if="item.type == 'area'">
|
|
47
|
+
<baseAreaVue
|
|
48
|
+
v-model="item.value"
|
|
49
|
+
:disable="item.disabled"
|
|
50
|
+
:ref="`area-${item.key}`"
|
|
51
|
+
:style="{ width: `100%` }"
|
|
52
|
+
:class="[`form-item-${item.key}`]"
|
|
53
|
+
@confirmAreaValue="
|
|
54
|
+
formItemConfirm({
|
|
55
|
+
config: item,
|
|
56
|
+
})
|
|
57
|
+
"
|
|
58
|
+
></baseAreaVue>
|
|
59
|
+
</template>
|
|
46
60
|
</pro_form_itemVue>
|
|
47
|
-
|
|
48
|
-
v-model="item.value"
|
|
49
|
-
:disable="item.disabled"
|
|
50
|
-
v-if="item.type == 'area'"
|
|
51
|
-
:ref="`area-${item.key}`"
|
|
52
|
-
:style="{ width: formItemWidth }"
|
|
53
|
-
:class="[`form-item-${item.key}`]"
|
|
54
|
-
@confirmAreaValue="
|
|
55
|
-
formItemConfirm({
|
|
56
|
-
config: item,
|
|
57
|
-
})
|
|
58
|
-
"
|
|
59
|
-
></baseAreaVue>
|
|
61
|
+
|
|
60
62
|
<baseUploadVue
|
|
61
63
|
v-model="item.value"
|
|
62
64
|
:max="formConfig.max"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
'form-item-wrap': true,
|
|
9
9
|
}"
|
|
10
10
|
>
|
|
11
|
-
<div class="item-content" v-if="
|
|
11
|
+
<div class="item-content" v-if="!typeOftemplate && !isEdit">
|
|
12
12
|
<p
|
|
13
13
|
v-if="!spContentType"
|
|
14
14
|
class="content-value"
|
|
@@ -185,10 +185,13 @@
|
|
|
185
185
|
type="textarea"
|
|
186
186
|
v-model="module"
|
|
187
187
|
:disabled="isDisabled"
|
|
188
|
+
:maxlength="config.maxlength"
|
|
188
189
|
v-if="config.type == 'textarea'"
|
|
190
|
+
:show-word-limit="config.maxlength ? true : false"
|
|
189
191
|
></el-input>
|
|
190
192
|
<!-- 插槽 -->
|
|
191
193
|
<slot name="template" v-else-if="config.type == 'template'"></slot>
|
|
194
|
+
<slot name="area" v-else-if="config.type == 'area'"></slot>
|
|
192
195
|
</div>
|
|
193
196
|
<!-- 确定的按钮 -->
|
|
194
197
|
<div class="bottom-handle-wrap" v-show="isEdit && !form">
|
|
@@ -213,7 +216,6 @@
|
|
|
213
216
|
</template>
|
|
214
217
|
|
|
215
218
|
<script>
|
|
216
|
-
import { FilterTime } from '../../../utils/utils'
|
|
217
219
|
//
|
|
218
220
|
import componentConfig from '../../../config/componentConfig'
|
|
219
221
|
export default {
|
|
@@ -228,7 +230,7 @@ export default {
|
|
|
228
230
|
},
|
|
229
231
|
mounted() {
|
|
230
232
|
this.$nextTick(() => {
|
|
231
|
-
const { labelPosition } = this.$props
|
|
233
|
+
const { labelPosition, width } = this.$props
|
|
232
234
|
if (labelPosition != 'top') {
|
|
233
235
|
this.$refs.formItemRef.parentNode.style.cssText += `width:${width}`
|
|
234
236
|
}
|
|
@@ -303,6 +305,17 @@ export default {
|
|
|
303
305
|
}
|
|
304
306
|
return false
|
|
305
307
|
},
|
|
308
|
+
|
|
309
|
+
typeOftemplate() {
|
|
310
|
+
const { type } = this.$props.config
|
|
311
|
+
|
|
312
|
+
if (type == 'template' || type == 'area') {
|
|
313
|
+
return true
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
return false
|
|
317
|
+
},
|
|
318
|
+
|
|
306
319
|
contentValue() {
|
|
307
320
|
let type = this.$props.config.type
|
|
308
321
|
switch (type) {
|
|
@@ -425,7 +438,6 @@ export default {
|
|
|
425
438
|
},
|
|
426
439
|
targetFocus() {
|
|
427
440
|
let ref = this.$refs.target
|
|
428
|
-
console.log(ref)
|
|
429
441
|
if (ref) {
|
|
430
442
|
ref.focus()
|
|
431
443
|
}
|