sadais-piui 1.2.7-beta165 → 1.2.7-beta167
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,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view
|
|
3
|
+
:id="formItemId"
|
|
3
4
|
class="pi-form-item"
|
|
4
|
-
:style="[
|
|
5
|
+
:style="[itemStyle, customStyle]"
|
|
5
6
|
:class="getFormItemClass"
|
|
6
7
|
@tap="handleItemClick"
|
|
7
8
|
>
|
|
@@ -282,6 +283,13 @@ export default {
|
|
|
282
283
|
}
|
|
283
284
|
},
|
|
284
285
|
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
|
+
},
|
|
285
293
|
getShowRightIcon() {
|
|
286
294
|
return this.$pi.expand.getPropValue(
|
|
287
295
|
this.inheritProps.showRightIcon,
|
|
@@ -469,6 +477,7 @@ export default {
|
|
|
469
477
|
validation(trigger) {
|
|
470
478
|
const _getResolve = () => {
|
|
471
479
|
return {
|
|
480
|
+
formItemId: this.formItemId,
|
|
472
481
|
prop: this.prop,
|
|
473
482
|
validateState: this.validateState,
|
|
474
483
|
validateMessage: this.validateMessage
|