Skip to content

Commit

Permalink
修改优化版本
Browse files Browse the repository at this point in the history
  • Loading branch information
SHEE94 committed Feb 22, 2023
1 parent 9c91184 commit a7552e0
Show file tree
Hide file tree
Showing 73 changed files with 27,582 additions and 5,076 deletions.
79 changes: 48 additions & 31 deletions components/bgwindow/bgwindow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@
<view>
<view class="bg-content">
<view class="list-content" :class="show">
<view class="list" v-for="(item, index) in list" :key="index" @click="openBgWebview(index)">
<view class="title">{{ item.getTitle() }}</view>
<view style="color: #999;" @click="close(item,index)">关闭</view>
<view class="list" v-for="(item, index) in list" :key="index">
<view class="title" @click="openBgWebview(index)">
<image v-if="yinsi" src="../../static/hide.png" mode="widthFix" style="width: 20px;margin-right: 5px;"></image>
{{ item.getTitle() }}
</view>
<view style="color: #999;" @click="close(item, index)">关闭</view>
</view>
</view>
<view class="btn-list">
Expand All @@ -22,69 +25,83 @@ export default {
data() {
return {
list: [],
show:''
show: '',
yinsi: false
};
},
mounted() {
this.list = app.globalData.webviewList;
this.show = 'ac'
this.show = 'ac';
let setting = uni.getStorageSync('settingConfig');
this.yinsi = setting.traceless;
},
methods:{
openBgWebview(index){
uni.$emit('SWITCH-WEBVIEW',{index:index})
this.$emit('close')
methods: {
openBgWebview(index) {
uni.$emit('SWITCH-WEBVIEW', { index: index });
this.$emit('close');
},
openNew(){
uni.$emit('OPEN-NEW-WINDOW')
this.$emit('close')
openNew() {
uni.$emit('OPEN-NEW-WINDOW');
this.$emit('close');
},
close(item,index){
item.close()
uni.$emit('CLOSE-WINDOW',index)
this.$emit('close')
close(item, index) {
item.close();
uni.$emit('CLOSE-WINDOW', index);
this.$emit('close');
},
closeAll(){
this.list.forEach(e=>{
e.close()
})
uni.$emit('CLOSE-WINDOW-ALL')
this.$emit('close')
closeAll() {
this.list.forEach(e => {
e.close();
});
uni.$emit('CLOSE-WINDOW-ALL');
this.$emit('close');
}
}
};
</script>

<style lang="less">
@import url('@/utils/iconfont.css');
.bg-content {
position: fixed;
left: 0;
right: 0;
bottom: 0;
.list-content {
padding: 30upx 30upx 120upx;
padding: 15px 15px 60px;
background-color: #fff;
border-radius: 10px 10px 0 0;
position: relative;
transform: translateY(100%);
opacity: 0;
transition: all .2s;
transition: all 0.2s;
.list {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20upx 0;
.title{
padding: 10px;
max-height: 50px;
overflow: hidden;
.title {
width: 70%;
color: #515151;
font-size: 26upx;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
align-items: center;
}
}
.active {
background: #eee;
box-sizing: border-box;
border-radius: 4px;
}
}
.ac{
.ac {
opacity: 1;
transform: translateY(0%);
}
Expand All @@ -93,14 +110,14 @@ export default {
bottom: 0;
left: 0;
right: 0;
height: 88upx;
height: 44px;
display: flex;
justify-content: space-between;
background: #ffffff;
.btn {
flex: 1;
text-align: center;
line-height: 88upx;
line-height: 44px;
color: #515151;
}
}
Expand Down
Loading

0 comments on commit a7552e0

Please sign in to comment.