Commit d2560b5f by 冷斌

fix bug

parent 274081a1
...@@ -18,18 +18,18 @@ ...@@ -18,18 +18,18 @@
<div class="headBox"> <div class="headBox">
<div style="font-size: 0.7rem; color: #333; margin-right: 1rem;">联系方式</div> <div style="font-size: 0.7rem; color: #333; margin-right: 1rem;">联系方式</div>
<input class="inputTel" type="text" v-model="form.thumb" placeholder="请留下您的微信/QQ/手机号" /> <input class="inputTel" @change="checkSubmit" type="text" v-model="form.thumb" placeholder="请留下您的微信/QQ/手机号" />
</div> </div>
<div class="bodyBox"> <div class="bodyBox">
<textarea class="content" v-model="form.content" rows="" cols="" maxlength="200" placeholder="我的意见…"> <textarea class="content" @change="checkSubmit" v-model="form.content" rows="" cols="" maxlength="200" placeholder="我的意见…">
</textarea> </textarea>
</div> </div>
<!-- 提交 --> <!-- 提交 -->
<div class="btnBox"> <div class="btnBox">
<button type="button" style="background: #FF9FBA;" @click="submit" :disabled="!isSub"> <button type="button" :style="isBk" @click="submit" :disabled="!isSub">
提交 提交
</button> </button>
</div> </div>
...@@ -38,7 +38,18 @@ ...@@ -38,7 +38,18 @@
<script> <script>
var vm = new Vue({ var vm = new Vue({
el: '#app', el: '#app',
//:style="[!isSub ? '{background: #FC7583;}' : '{background: #FF9FBA;']}" checkSubmit: function () {
let status = false;
for (let i in this.form) {
if (this.form[i] === '') {
status = true;
this.isBk='background: #FC7583;';
break;
}
}
this.isSub = status;
this.isBk='background: #FF9FBA;';
},
data: { data: {
form:{ form:{
uid: "{$uid}", uid: "{$uid}",
...@@ -48,7 +59,8 @@ ...@@ -48,7 +59,8 @@
content: '', content: '',
thumb: '', thumb: '',
}, },
isSub: false isSub: false,
isBk: 'background: #FF9FBA;'
}, },
methods: { methods: {
//事件 //事件
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment