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
@@ -23,5 +23,6 @@ export default {
23
23
  ...icon,
24
24
  name: 'right',
25
25
  color: '#cccccc'
26
- } // 右侧箭头配置
26
+ }, // 右侧箭头配置
27
+ sort: ''
27
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7-beta167",
3
+ "version": "1.2.7-beta169",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {