sadais-piui 1.2.7-beta167 → 1.2.7-beta169
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.
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
-
:id="formItemId"
|
|
4
3
|
class="pi-form-item"
|
|
5
4
|
:style="[itemStyle, customStyle]"
|
|
6
5
|
:class="getFormItemClass"
|
|
@@ -272,6 +271,14 @@ export default {
|
|
|
272
271
|
default() {
|
|
273
272
|
return formItem.rightIcon
|
|
274
273
|
}
|
|
274
|
+
},
|
|
275
|
+
// 排序
|
|
276
|
+
sort: {
|
|
277
|
+
type: String,
|
|
278
|
+
default() {
|
|
279
|
+
// ''
|
|
280
|
+
return formItem.sort
|
|
281
|
+
}
|
|
275
282
|
}
|
|
276
283
|
},
|
|
277
284
|
data() {
|
|
@@ -283,13 +290,6 @@ export default {
|
|
|
283
290
|
}
|
|
284
291
|
},
|
|
285
292
|
computed: {
|
|
286
|
-
formItemId() {
|
|
287
|
-
// 移除标点符号,只保留英文和数字
|
|
288
|
-
const itemId = this.prop
|
|
289
|
-
? String(this.prop).replace(/[^a-zA-Z0-9]/g, '')
|
|
290
|
-
: ''
|
|
291
|
-
return `form-item-${itemId}`
|
|
292
|
-
},
|
|
293
293
|
getShowRightIcon() {
|
|
294
294
|
return this.$pi.expand.getPropValue(
|
|
295
295
|
this.inheritProps.showRightIcon,
|
|
@@ -428,6 +428,12 @@ export default {
|
|
|
428
428
|
},
|
|
429
429
|
beforeDestroy() {
|
|
430
430
|
this.componentDestroy = true
|
|
431
|
+
if (this._parent && this._parent._children) {
|
|
432
|
+
const index = this._parent._children.indexOf(this)
|
|
433
|
+
if (index !== -1) {
|
|
434
|
+
this._parent._children.splice(index, 1)
|
|
435
|
+
}
|
|
436
|
+
}
|
|
431
437
|
},
|
|
432
438
|
methods: {
|
|
433
439
|
handleItemClick(e) {
|
|
@@ -477,7 +483,6 @@ export default {
|
|
|
477
483
|
validation(trigger) {
|
|
478
484
|
const _getResolve = () => {
|
|
479
485
|
return {
|
|
480
|
-
formItemId: this.formItemId,
|
|
481
486
|
prop: this.prop,
|
|
482
487
|
validateState: this.validateState,
|
|
483
488
|
validateMessage: this.validateMessage
|
package/config/formItem.js
CHANGED