sadais-piui 1.2.7-beta78 → 1.2.7-beta79

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.
@@ -314,13 +314,18 @@ export default {
314
314
  })
315
315
  }
316
316
  },
317
+ mounted() {
318
+ this.init()
319
+ },
317
320
  methods: {
318
321
  async init() {
319
- const closeIconRect = await this.$pi.common.queryRect(this, '.pi-input-close-icon', false)
320
- if (closeIconRect) {
321
- this.closeIconWidth = closeIconRect.width
322
+ if (!this.closeIconWidth) {
323
+ const closeIconRect = await this.$pi.common.queryRect(this, '.pi-input-close-icon', false)
324
+ if (closeIconRect && closeIconRect.width) {
325
+ this.closeIconWidth = closeIconRect.width
326
+ }
327
+ console.log(TAG, '计算.pi-icon宽度', this.closeIconWidth)
322
328
  }
323
- console.log(TAG, '计算.pi-icon宽度', this.closeIconWidth)
324
329
  },
325
330
  handleItemClick(e) {
326
331
  this.$emit('click', e)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7-beta78",
3
+ "version": "1.2.7-beta79",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {