sadais-piui 1.2.7-beta132 → 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.
- package/components/pi-input/index.vue +0 -2
- package/mixin/emitter.js +8 -1
- package/mixin/value-sync.js +5 -0
- package/package.json +1 -1
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
|
|
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
|
package/mixin/value-sync.js
CHANGED
|
@@ -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
|
}
|