8000 feature 新增div-input触发点击单位事件 · laraveladmin-cn/laraveladmin@978b6e9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 978b6e9

Browse files
author
张世平
committed
feature 新增div-input触发点击单位事件
1 parent 14d08cf commit 978b6e9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

resources/js/components/divInput.vue

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div ref="input" :contenteditable="!disabled" class="inline-block edit-input" @blur="onBlur" @focus="onFocus">
55
{{show}}
66
</div>
7-
<span v-if="unit">
7+
<span v-if="unit" @click="clickUnit">
88
{{unit}}
99
</span>
1010
</slot>
@@ -89,6 +89,9 @@
8989
if(this.$refs['input'].textContent.trim()==this.placeholder){
9090
this.$refs['input'].innerHTML = '';
9191
}
92+
},
93+
clickUnit(){
94+
this.$emit('clickUnit');
9295
}
9396
},
9497
computed:{

0 commit comments

Comments
 (0)
0