Browse Source

fixed bug

master
npmrun 3 years ago
parent
commit
32041e5585
  1. 6
      pages/Sub/Socket/Socket.vue
  2. 17
      pages/index/index.vue
  3. 2
      uni_modules/niu-ui/assets/style/common.scss
  4. 2
      uni_modules/niu-ui/components/niu-tabs/niu-tabs.vue

6
pages/Sub/Socket/Socket.vue

@ -21,7 +21,7 @@
</view>
<view class="other talk" v-if="item.ev==='text'&&item.user&&item.user.id!=loginName">
<view class="talk__info">
{{item.user.id}}
</view>
<view class="talk__content" @click="clickSend(item,index)">
<view class="text">
@ -30,7 +30,7 @@
<view class="error" v-if="item._success==2"></view>
</view>
</view>
<view class="my talk" v-if="item.ev==='text'&&item.user&&item.user.id==loginName">
<view class="my talk" v-if="item.ev==='text'&&(item.user&&item.user.id==loginName || item._success==2)">
<view class="talk__content" @click="clickSend(item,index)">
<view class="error" v-if="item._success==2"></view>
<view class="text">
@ -38,7 +38,7 @@
</view>
</view>
<view class="talk__info">
{{loginName}}
</view>
</view>
</view>

17
pages/index/index.vue

@ -1,6 +1,6 @@
<template>
<niu-page Tab>
<niu-navbar fixed adjust middleLayout='left' :back="false" color="white" bg="#39b54a">
<niu-navbar offsetHide forceFixed fixed adjust middleLayout='left' :back="false" color="white" bg="#39b54a">
爱能森组件库
<template #right>
asd
@ -42,6 +42,18 @@
<view>{{$n.data.navbarTop}}px</view>
<view>{{$n.data.navbarTop }}</view>
<view :style="{backgroundColor: 'red', height: $n.data.navbarTop +'px'}"></view>
<view style="padding: 15rpx;background-color: white;">
<niu-input leftText="账号" arraw border closeable focus></niu-input>
<niu-input leftText="密码" border rightText="$" closeable></niu-input>
<niu-input @send="sendCode" sendcode border sendcodeBorder></niu-input>
<niu-input border></niu-input>
<niu-input border></niu-input>
<niu-input border></niu-input>
<niu-input border></niu-input>
<niu-input border></niu-input>
<niu-input border></niu-input>
<niu-input border></niu-input>
</view>
<niu-tabbar></niu-tabbar>
</niu-page>
</template>
@ -57,6 +69,9 @@
console.log(this.$n.data.navbarTop);
},
methods: {
sendCode(done){
done(true)
},
go(path) {
uni.navigateTo({
url: path

2
uni_modules/niu-ui/assets/style/common.scss

@ -4,7 +4,7 @@
font-size: 28rpx;
line-height: 1.2; //
color: #000;
color: darkred;
// color: darkred;
}
page .tabpage {
// 怪异盒模型

2
uni_modules/niu-ui/components/niu-tabs/niu-tabs.vue

@ -202,9 +202,7 @@
if (isClick && this.value == index) return
if (this.allLeft.length) {
this.$emit("change", index)
console.log(this.allLeft, this.barPer);
this.barWidth = this.allLeft[index][1] * this.barPer
console.log(this.barWidth);
this.barLeft = this.allLeft[index][0] + (this.allLeft[index][1] - this.barWidth)/2
this.left = (this.allLeft[index][0] - this.allLeft[index][1] * 2)
}

Loading…
Cancel
Save