sadais-piui 1.2.7-beta131 → 1.2.7-beta133

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.
@@ -379,8 +379,6 @@ export default {
379
379
  handleChange(value) {
380
380
  this.val = value
381
381
  this.handleEmitChange()
382
- this.dispatch('PiForm', 'form-change', this.val)
383
- this.dispatch('PiFormItem', 'form-change', this.val)
384
382
  }
385
383
  }
386
384
  }
@@ -39,9 +39,11 @@
39
39
  >
40
40
  <slot v-if="$slots.toolbar" name="toolbar" />
41
41
  <template v-else>
42
- <view class="item-btn" @tap.stop="handlePopupClose">取消</view>
42
+ <view class="item-btn" @tap.stop="handlePopupClose">
43
+ {{ getCancelBtn.text }}
44
+ </view>
43
45
  <view class="item-btn pi-primary" @tap.stop="handleConfirm">
44
- 确定
46
+ {{ getConfirmBtn.text }}
45
47
  </view>
46
48
  </template>
47
49
  </view>
package/mixin/emitter.js CHANGED
@@ -25,7 +25,14 @@ export default {
25
25
  methods: {
26
26
  dispatch(componentName, eventName, params) {
27
27
  let parent = this.$parent || this.$root
28
- let name = parent.$options.componentName
28
+ let name
29
+ // #ifdef H5
30
+ name = parent.$options.componentName
31
+ // #endif
32
+
33
+ // #ifndef H5
34
+ name = parent.$options.name
35
+ // #endif
29
36
 
30
37
  while (parent && (!name || name !== componentName)) {
31
38
  parent = parent.$parent
@@ -3,7 +3,9 @@
3
3
  * 提供v-model双向绑定
4
4
  * 提供传入value属性,将同步到val中
5
5
  */
6
+ import Emitter from './emitter'
6
7
  export default {
8
+ mixins: [Emitter],
7
9
  model: {
8
10
  prop: 'value',
9
11
  event: 'input'
@@ -27,6 +29,9 @@ export default {
27
29
  handleEmitChange() {
28
30
  this.$emit('input', this.val)
29
31
  this.$emit('change', this.val)
32
+
33
+ this.dispatch('PiForm', 'form-change', this.val)
34
+ this.dispatch('PiFormItem', 'form-change', this.val)
30
35
  }
31
36
  }
32
37
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sadais-piui",
3
- "version": "1.2.7-beta131",
3
+ "version": "1.2.7-beta133",
4
4
  "description": "piui组件库",
5
5
  "main": "index.js",
6
6
  "scripts": {