Commit 1dd19fc2 by LJM

js

parent 0983f604
...@@ -54,7 +54,8 @@ ...@@ -54,7 +54,8 @@
text { text {
font-size: 26rpx; font-size: 26rpx;
color: #197adb; color: #197adb;
margin-right: 10rpx; margin-right: 60rpx;
font-weight: bold;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }
...@@ -63,6 +64,7 @@ ...@@ -63,6 +64,7 @@
} }
} }
.uni-table-box { .uni-table-box {
padding-top: 24rpx;
padding-bottom: 24rpx; padding-bottom: 24rpx;
background-color: #ffffff; background-color: #ffffff;
::v-deep .uni-table-scroll { ::v-deep .uni-table-scroll {
...@@ -81,7 +83,7 @@ ...@@ -81,7 +83,7 @@
height: 98rpx; height: 98rpx;
background: #ffffff; background: #ffffff;
padding: 0 24rpx; padding: 0 24rpx;
z-index: 999; z-index: 98;
.t1 { .t1 {
font-size: 22rpx; font-size: 22rpx;
color: #404547; color: #404547;
...@@ -116,6 +118,7 @@ ...@@ -116,6 +118,7 @@
border-radius: 4rpx; border-radius: 4rpx;
font-size: 28rpx; font-size: 28rpx;
color: #ffffff; color: #ffffff;
margin-bottom: 100rpx;
} }
} }
...@@ -160,4 +163,10 @@ ...@@ -160,4 +163,10 @@
.uni-table-td { .uni-table-td {
border-right: 1px #ebeef5 solid; border-right: 1px #ebeef5 solid;
} }
.pop-list .uni-table-th {
width: 33.3% !important;
}
.pop-list .uni-table-td {
width: 33.3% !important;
}
} }
<template> <template>
<view class="scanInventory"> <view class="scanInventory">
<view class="scanInven-form-item"> <view class="scanInven-form-item">
<view class="box row verCenter operate"><text>箱列表</text></view> <view class="box row verCenter operate">
<text @click="exportChange()">导出</text>
<text @click="getBoxSnAndNumAll()">箱列表</text>
</view>
<view class="box row verCenter"> <view class="box row verCenter">
<view class="label">箱号</view> <view class="label">箱号</view>
<input v-model="box_sn" @input="inputChange" placeholder-style="font-size:24rpx;" class="uni-input" placeholder="请输入箱号" /> <input v-model="box_sn" @input="inputChange" placeholder-style="font-size:24rpx;" class="uni-input" placeholder="请输入箱号" />
...@@ -17,7 +20,7 @@ ...@@ -17,7 +20,7 @@
</view> </view>
</view> </view>
</view> </view>
<view class="addRow row rowCenter verCenter">新增行</view> <view class="addRow row rowCenter verCenter" @click="addRowChange()">新增行</view>
<view class="uni-table-box"> <view class="uni-table-box">
<uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange"> <uni-table type="selection" border stripe emptyText="暂无更多数据" @selection-change="selectionChange">
<uni-tr> <uni-tr>
...@@ -28,8 +31,8 @@ ...@@ -28,8 +31,8 @@
</uni-tr> </uni-tr>
<uni-tr v-for="(item, index) in list" :key="index"> <uni-tr v-for="(item, index) in list" :key="index">
<uni-td align="center">{{ index + 1 }}</uni-td> <uni-td align="center">{{ index + 1 }}</uni-td>
<uni-td align="center"><input class="uni-input" :value="item.goods_sn" /></uni-td> <uni-td align="center"><input class="uni-input" v-model="list[index].goods_sn" /></uni-td>
<uni-td align="center"><input class="uni-input" :value="item.goods_num" /></uni-td> <uni-td align="center"><input class="uni-input" v-model="list[index].goods_num" /></uni-td>
<uni-td align="center">{{ item.scan_time_cn }}</uni-td> <uni-td align="center">{{ item.scan_time_cn }}</uni-td>
</uni-tr> </uni-tr>
</uni-table> </uni-table>
...@@ -42,6 +45,22 @@ ...@@ -42,6 +45,22 @@
</view> </view>
<view class="btn row rowCenter verCenter" @click="deleteChange">删除</view> <view class="btn row rowCenter verCenter" @click="deleteChange">删除</view>
</view> </view>
<uni-popup ref="popup" type="center" background-color="#fff">
<view class="uni-table-box pop-list" style="width: 550rpx;">
<uni-table border stripe emptyText="暂无更多数据">
<uni-tr>
<uni-th align="center">箱号</uni-th>
<uni-th align="center">货品数</uni-th>
<uni-th align="center">保存时间</uni-th>
</uni-tr>
<uni-tr v-for="(item, index) in listPop" :key="index">
<uni-td align="center">{{ item.box_sn }}</uni-td>
<uni-td align="center">{{ item.box_sn_goods_num }}</uni-td>
<uni-td align="center">{{ item.scan_time_cn }}</uni-td>
</uni-tr>
</uni-table>
</view>
</uni-popup>
</view> </view>
</template> </template>
...@@ -55,14 +74,28 @@ export default { ...@@ -55,14 +74,28 @@ export default {
code_str: 'QTY:500 PN:PR03-1R CPN:PR03000201008JAC00 PO:18365781/11 CPO:B131190+A64120 MFR:VISHAY MPN:PR03000201008JAC00 RoHS', code_str: 'QTY:500 PN:PR03-1R CPN:PR03000201008JAC00 PO:18365781/11 CPO:B131190+A64120 MFR:VISHAY MPN:PR03000201008JAC00 RoHS',
code_type: '', code_type: '',
list: [], list: [],
listPop: [],
selectedIndexs: [], selectedIndexs: [],
index: -1, index: -1,
array: ['扫描digikey', '扫描Mouser', '扫描Arrow', '扫描Rochester', '扫描TME', '扫描Chip1stop'], array: ['扫描digikey', '扫描Mouser', '扫描Arrow', '扫描Rochester', '扫描TME', '扫描Chip1stop'],
arrar_val: ['digikey', 'Mouser', 'Arrow', 'Rochester', 'TME', 'Chip1stop'] arrar_val: ['digikey', 'Mouser', 'Arrow', 'Rochester', 'TME', 'Chip1stop']
}; };
}, },
created() {},
methods: { methods: {
getBoxSnAndNumAll() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: '' }, true).then(res => {
if (res.err_code === 0) {
this.listPop = res.data;
this.$refs.popup.open('center');
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
getBoxSnAndNum() { getBoxSnAndNum() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn }, false).then(res => { this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn }, false).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
...@@ -82,7 +115,7 @@ export default { ...@@ -82,7 +115,7 @@ export default {
this.list.unshift({ this.list.unshift({
goods_num: res.data.num || '', goods_num: res.data.num || '',
goods_sn: res.data.sn || '', goods_sn: res.data.sn || '',
scan_time: '', scan_time_cn: '',
wsbxnmsn_id: '' wsbxnmsn_id: ''
}); });
} else { } else {
...@@ -128,6 +161,47 @@ export default { ...@@ -128,6 +161,47 @@ export default {
this.list.splice(this.selectedIndexs[i], 1); this.list.splice(this.selectedIndexs[i], 1);
} }
}, },
exportChange() {
this.request(API.getBoxSnAndNum, 'POST', { box_sn: this.box_sn, export: 1 }, true).then(res => {
if (res.err_code === 0) {
uni.downloadFile({
url: res.data,
success: function(res) {
const filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('打开文档成功');
},
fail: function() {
uni.showModal({
title: '提示',
content: '暂不支持该文件类型预览',
showCancel: false
});
console.log('打开文档失败');
}
});
}
});
} else {
uni.showModal({
title: '提示',
content: res.err_msg,
showCancel: false
});
}
});
},
addRowChange() {
this.list.unshift({
goods_num: '',
goods_sn: '',
scan_time_cn: '',
wsbxnmsn_id: ''
});
},
submit() { submit() {
let params = {}; let params = {};
let arr = []; let arr = [];
...@@ -140,7 +214,7 @@ export default { ...@@ -140,7 +214,7 @@ export default {
} }
params.list = JSON.stringify(arr); params.list = JSON.stringify(arr);
params.box_sn = this.box_sn; params.box_sn = this.box_sn;
this.request(API.submitBoxSnAndNum, 'POST', params, false).then(res => { this.request(API.submitBoxSnAndNum, 'POST', params, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
uni.showModal({ uni.showModal({
title: '提示', title: '提示',
......
## 1.8.2(2023-02-02)
- uni-popup-dialog 组件新增 inputType 属性
## 1.8.1(2022-12-01)
- 修复 nvue 下 v-show 报错
## 1.8.0(2022-11-29)
- 优化 主题样式
## 1.7.9(2022-04-02)
- 修复 弹出层内部无法滚动的bug
## 1.7.8(2022-03-28)
- 修复 小程序中高度错误的bug
## 1.7.7(2022-03-17)
- 修复 快速调用open出现问题的Bug
## 1.7.6(2022-02-14)
- 修复 safeArea 属性不能设置为false的bug
## 1.7.5(2022-01-19)
- 修复 isMaskClick 失效的bug
## 1.7.4(2022-01-19)
- 新增 cancelText \ confirmText 属性 ,可自定义文本
- 新增 maskBackgroundColor 属性 ,可以修改蒙版颜色
- 优化 maskClick属性 更新为 isMaskClick ,解决微信小程序警告的问题
## 1.7.3(2022-01-13)
- 修复 设置 safeArea 属性不生效的bug
## 1.7.2(2021-11-26)
- 优化 组件示例
## 1.7.1(2021-11-26)
- 修复 vuedoc 文字错误
## 1.7.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-popup](https://uniapp.dcloud.io/component/uniui/uni-popup)
## 1.6.2(2021-08-24) ## 1.6.2(2021-08-24)
- 新增 支持国际化 - 新增 支持国际化
## 1.6.1(2021-07-30) ## 1.6.1(2021-07-30)
......
...@@ -10,12 +10,12 @@ ...@@ -10,12 +10,12 @@
</view> </view>
<view v-else class="uni-dialog-content"> <view v-else class="uni-dialog-content">
<slot> <slot>
<input class="uni-dialog-input" v-model="val" type="text" :placeholder="placeholderText" :focus="focus" > <input class="uni-dialog-input" v-model="val" :type="inputType" :placeholder="placeholderText" :focus="focus" >
</slot> </slot>
</view> </view>
<view class="uni-dialog-button-group"> <view class="uni-dialog-button-group">
<view class="uni-dialog-button" @click="closeDialog"> <view class="uni-dialog-button" @click="closeDialog">
<text class="uni-dialog-button-text">{{cancelText}}</text> <text class="uni-dialog-button-text">{{closeText}}</text>
</view> </view>
<view class="uni-dialog-button uni-border-left" @click="onOk"> <view class="uni-dialog-button uni-border-left" @click="onOk">
<text class="uni-dialog-button-text uni-button-color">{{okText}}</text> <text class="uni-dialog-button-text uni-button-color">{{okText}}</text>
...@@ -57,6 +57,10 @@ ...@@ -57,6 +57,10 @@
mixins: [popup], mixins: [popup],
emits:['confirm','close'], emits:['confirm','close'],
props: { props: {
inputType:{
type: String,
default: 'text'
},
value: { value: {
type: [String, Number], type: [String, Number],
default: '' default: ''
...@@ -84,6 +88,14 @@ ...@@ -84,6 +88,14 @@
beforeClose: { beforeClose: {
type: Boolean, type: Boolean,
default: false default: false
},
cancelText:{
type: String,
default: ''
},
confirmText:{
type: String,
default: ''
} }
}, },
data() { data() {
...@@ -95,10 +107,10 @@ ...@@ -95,10 +107,10 @@
}, },
computed: { computed: {
okText() { okText() {
return t("uni-popup.ok") return this.confirmText || t("uni-popup.ok")
}, },
cancelText() { closeText() {
return t("uni-popup.cancel") return this.cancelText || t("uni-popup.cancel")
}, },
placeholderText() { placeholderText() {
return this.placeholder || t("uni-popup.placeholder") return this.placeholder || t("uni-popup.placeholder")
...@@ -162,10 +174,10 @@ ...@@ -162,10 +174,10 @@
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.uni-popup-dialog { .uni-popup-dialog {
width: 300px; width: 300px;
border-radius: 15px; border-radius: 11px;
background-color: #fff; background-color: #fff;
} }
...@@ -175,8 +187,7 @@ ...@@ -175,8 +187,7 @@
/* #endif */ /* #endif */
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
padding-top: 15px; padding-top: 25px;
padding-bottom: 5px;
} }
.uni-dialog-title-text { .uni-dialog-title-text {
...@@ -191,12 +202,12 @@ ...@@ -191,12 +202,12 @@
flex-direction: row; flex-direction: row;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
padding: 5px 15px 15px 15px; padding: 20px;
} }
.uni-dialog-content-text { .uni-dialog-content-text {
font-size: 14px; font-size: 14px;
color: #6e6e6e; color: #6C6C6C;
} }
.uni-dialog-button-group { .uni-dialog-button-group {
...@@ -228,7 +239,8 @@ ...@@ -228,7 +239,8 @@
} }
.uni-dialog-button-text { .uni-dialog-button-text {
font-size: 14px; font-size: 16px;
color: #333;
} }
.uni-button-color { .uni-button-color {
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.uni-popup-message { .uni-popup-message {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: flex; display: flex;
......
...@@ -59,16 +59,16 @@ ...@@ -59,16 +59,16 @@
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png', icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/0dacdbe0-50bf-11eb-8ff1-d5dcf8779628.png',
name: 'sina' name: 'sina'
}, },
{ // {
text: '百度', // text: '百度',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png', // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/1ec6e920-50bf-11eb-8a36-ebb87efcf8c0.png',
name: 'copy' // name: 'copy'
}, // },
{ // {
text: '其他', // text: '其他',
icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png', // icon: 'https://vkceyugu.cdn.bspapp.com/VKCEYUGU-dc-site/2e0fdfe0-50bf-11eb-b997-9918a5dda011.png',
name: 'more' // name: 'more'
} // }
] ]
} }
}, },
...@@ -103,9 +103,11 @@ ...@@ -103,9 +103,11 @@
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" >
.uni-popup-share { .uni-popup-share {
background-color: #fff; background-color: #fff;
border-top-left-radius: 11px;
border-top-right-radius: 11px;
} }
.uni-share-title { .uni-share-title {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
......
<template> <template>
<view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']" @touchmove.stop.prevent="clear"> <view v-if="showPopup" class="uni-popup" :class="[popupstyle, isDesktop ? 'fixforpc-z-index' : '']">
<view @touchstart="touchstart" > <view @touchstart="touchstart">
<uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" /> <uni-transition key="1" v-if="maskShow" name="mask" mode-class="fade" :styles="maskClass"
<uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap"> :duration="duration" :show="showTrans" @click="onTap" />
<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear"><slot /></view> <uni-transition key="2" :mode-class="ani" name="content" :styles="transClass" :duration="duration"
:show="showTrans" @click="onTap">
<view class="uni-popup__wrapper" :style="{ backgroundColor: bg }" :class="[popupstyle]" @click="clear">
<slot />
</view>
</uni-transition> </uni-transition>
</view> </view>
<!-- #ifdef H5 --> <!-- #ifdef H5 -->
...@@ -13,11 +17,11 @@ ...@@ -13,11 +17,11 @@
</template> </template>
<script> <script>
// #ifdef H5 // #ifdef H5
import keypress from './keypress.js' import keypress from './keypress.js'
// #endif // #endif
/** /**
* PopUp 弹出层 * PopUp 弹出层
* @description 弹出层组件,为了解决遮罩弹层的问题 * @description 弹出层组件,为了解决遮罩弹层的问题
* @tutorial https://ext.dcloud.net.cn/plugin?id=329 * @tutorial https://ext.dcloud.net.cn/plugin?id=329
...@@ -30,22 +34,24 @@ import keypress from './keypress.js' ...@@ -30,22 +34,24 @@ import keypress from './keypress.js'
* @value message 消息提示 * @value message 消息提示
* @value dialog 对话框 * @value dialog 对话框
* @value share 底部分享示例 * @value share 底部分享示例
* @property {Boolean} animation = [ture|false] 是否开启动画 * @property {Boolean} animation = [true|false] 是否开启动画
* @property {Boolean} maskClick = [ture|false] 蒙版点击是否关闭弹窗 * @property {Boolean} maskClick = [true|false] 蒙版点击是否关闭弹窗(废弃)
* @property {Boolean} isMaskClick = [true|false] 蒙版点击是否关闭弹窗
* @property {String} backgroundColor 主窗口背景色 * @property {String} backgroundColor 主窗口背景色
* @property {String} maskBackgroundColor 蒙版颜色
* @property {Boolean} safeArea 是否适配底部安全区 * @property {Boolean} safeArea 是否适配底部安全区
* @event {Function} change 打开关闭弹窗触发,e={show: false} * @event {Function} change 打开关闭弹窗触发,e={show: false}
* @event {Function} maskClick 点击遮罩触发 * @event {Function} maskClick 点击遮罩触发
*/ */
export default { export default {
name: 'uniPopup', name: 'uniPopup',
components: { components: {
// #ifdef H5 // #ifdef H5
keypress keypress
// #endif // #endif
}, },
emits:['change','maskClick'], emits: ['change', 'maskClick'],
props: { props: {
// 开启动画 // 开启动画
animation: { animation: {
...@@ -59,18 +65,27 @@ export default { ...@@ -59,18 +65,27 @@ export default {
default: 'center' default: 'center'
}, },
// maskClick // maskClick
isMaskClick: {
type: Boolean,
default: null
},
// TODO 2 个版本后废弃属性 ,使用 isMaskClick
maskClick: { maskClick: {
type: Boolean, type: Boolean,
default: true default: null
}, },
backgroundColor: { backgroundColor: {
type: String, type: String,
default: 'none' default: 'none'
}, },
safeArea:{ safeArea: {
type: Boolean, type: Boolean,
default: true default: true
} },
maskBackgroundColor: {
type: String,
default: 'rgba(0, 0, 0, 0.4)'
},
}, },
watch: { watch: {
...@@ -100,6 +115,19 @@ export default { ...@@ -100,6 +115,19 @@ export default {
this.mkclick = val this.mkclick = val
}, },
immediate: true immediate: true
},
isMaskClick: {
handler: function(val) {
this.mkclick = val
},
immediate: true
},
// H5 下禁止底部滚动
showPopup(show) {
// #ifdef H5
// fix by mehaotian 处理 h5 滚动穿透的问题
document.getElementsByTagName('body')[0].style.overflow = show ? 'hidden' : 'visible'
// #endif
} }
}, },
data() { data() {
...@@ -151,13 +179,25 @@ export default { ...@@ -151,13 +179,25 @@ export default {
}, },
mounted() { mounted() {
const fixSize = () => { const fixSize = () => {
const { windowWidth, windowHeight, windowTop, safeAreaInsets } = uni.getSystemInfoSync() const {
windowWidth,
windowHeight,
windowTop,
safeArea,
screenHeight,
safeAreaInsets
} = uni.getSystemInfoSync()
this.popupWidth = windowWidth this.popupWidth = windowWidth
this.popupHeight = windowHeight + windowTop this.popupHeight = windowHeight + (windowTop || 0)
// 是否适配底部安全区 // TODO fix by mehaotian 是否适配底部安全区 ,目前微信ios 、和 app ios 计算有差异,需要框架修复
if(this.safeArea){ if (safeArea && this.safeArea) {
this.safeAreaInsets = safeAreaInsets // #ifdef MP-WEIXIN
}else{ this.safeAreaInsets = screenHeight - safeArea.bottom
// #endif
// #ifndef MP-WEIXIN
this.safeAreaInsets = safeAreaInsets.bottom
// #endif
} else {
this.safeAreaInsets = 0 this.safeAreaInsets = 0
} }
} }
...@@ -169,8 +209,25 @@ export default { ...@@ -169,8 +209,25 @@ export default {
// }) // })
// #endif // #endif
}, },
// #ifndef VUE3
// TODO vue2
destroyed() {
this.setH5Visible()
},
// #endif
// #ifdef VUE3
// TODO vue3
unmounted() {
this.setH5Visible()
},
// #endif
created() { created() {
this.mkclick = this.maskClick // this.mkclick = this.isMaskClick || this.maskClick
if (this.isMaskClick === null && this.maskClick === null) {
this.mkclick = true
} else {
this.mkclick = this.isMaskClick !== null ? this.isMaskClick : this.maskClick
}
if (this.animation) { if (this.animation) {
this.duration = 300 this.duration = 300
} else { } else {
...@@ -180,8 +237,15 @@ export default { ...@@ -180,8 +237,15 @@ export default {
this.messageChild = null this.messageChild = null
// TODO 解决头条冒泡的问题 // TODO 解决头条冒泡的问题
this.clearPropagation = false this.clearPropagation = false
this.maskClass.backgroundColor = this.maskBackgroundColor
}, },
methods: { methods: {
setH5Visible() {
// #ifdef H5
// fix by mehaotian 处理 h5 滚动穿透的问题
document.getElementsByTagName('body')[0].style.overflow = 'visible'
// #endif
},
/** /**
* 公用方法,不显示遮罩层 * 公用方法,不显示遮罩层
*/ */
...@@ -203,6 +267,11 @@ export default { ...@@ -203,6 +267,11 @@ export default {
}, },
open(direction) { open(direction) {
// fix by mehaotian 处理快速打开关闭的情况
if (this.showPopup) {
clearTimeout(this.timer)
this.showPopup = false
}
let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share'] let innerType = ['top', 'center', 'bottom', 'left', 'right', 'message', 'dialog', 'share']
if (!(direction && innerType.indexOf(direction) !== -1)) { if (!(direction && innerType.indexOf(direction) !== -1)) {
direction = this.type direction = this.type
...@@ -231,7 +300,7 @@ export default { ...@@ -231,7 +300,7 @@ export default {
}, 300) }, 300)
}, },
// TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容 // TODO 处理冒泡事件,头条的冒泡事件有问题 ,先这样兼容
touchstart(){ touchstart() {
this.clearPropagation = false this.clearPropagation = false
}, },
...@@ -273,13 +342,12 @@ export default { ...@@ -273,13 +342,12 @@ export default {
bottom(type) { bottom(type) {
this.popupstyle = 'bottom' this.popupstyle = 'bottom'
this.ani = ['slide-bottom'] this.ani = ['slide-bottom']
this.transClass = { this.transClass = {
position: 'fixed', position: 'fixed',
left: 0, left: 0,
right: 0, right: 0,
bottom: 0, bottom: 0,
paddingBottom: (this.safeAreaInsets && this.safeAreaInsets.bottom) || 0, paddingBottom: this.safeAreaInsets + 'px',
backgroundColor: this.bg backgroundColor: this.bg
} }
// TODO 兼容 type 属性 ,后续会废弃 // TODO 兼容 type 属性 ,后续会废弃
...@@ -350,13 +418,14 @@ export default { ...@@ -350,13 +418,14 @@ export default {
this.showTrans = true this.showTrans = true
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss">
.uni-popup { .uni-popup {
position: fixed; position: fixed;
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
z-index: 99; z-index: 99;
/* #endif */ /* #endif */
&.top, &.top,
&.left, &.left,
...@@ -368,11 +437,13 @@ export default { ...@@ -368,11 +437,13 @@ export default {
top: 0; top: 0;
/* #endif */ /* #endif */
} }
.uni-popup__wrapper { .uni-popup__wrapper {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
display: block; display: block;
/* #endif */ /* #endif */
position: relative; position: relative;
/* iphonex 等安全区设置,底部安全区适配 */ /* iphonex 等安全区设置,底部安全区适配 */
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
// padding-bottom: constant(safe-area-inset-bottom); // padding-bottom: constant(safe-area-inset-bottom);
...@@ -389,15 +460,15 @@ export default { ...@@ -389,15 +460,15 @@ export default {
flex: 1; flex: 1;
} }
} }
} }
.fixforpc-z-index { .fixforpc-z-index {
/* #ifndef APP-NVUE */ /* #ifndef APP-NVUE */
z-index: 999; z-index: 999;
/* #endif */ /* #endif */
} }
.fixforpc-top { .fixforpc-top {
top: 0; top: 0;
} }
</style> </style>
{ {
"id": "uni-popup", "id": "uni-popup",
"displayName": "uni-popup 弹出层", "displayName": "uni-popup 弹出层",
"version": "1.6.2", "version": "1.8.2",
"description": " Popup 组件,提供常用的弹层", "description": " Popup 组件,提供常用的弹层",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
...@@ -18,10 +18,6 @@ ...@@ -18,10 +18,6 @@
"example": "../../temps/example_temps" "example": "../../temps/example_temps"
}, },
"dcloudext": { "dcloudext": {
"category": [
"前端组件",
"通用组件"
],
"sale": { "sale": {
"regular": { "regular": {
"price": "0.00" "price": "0.00"
...@@ -38,10 +34,12 @@ ...@@ -38,10 +34,12 @@
"data": "无", "data": "无",
"permissions": "无" "permissions": "无"
}, },
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
"type": "component-vue"
}, },
"uni_modules": { "uni_modules": {
"dependencies": [ "dependencies": [
"uni-scss",
"uni-transition" "uni-transition"
], ],
"encrypt": [], "encrypt": [],
...@@ -81,7 +79,7 @@ ...@@ -81,7 +79,7 @@
}, },
"Vue": { "Vue": {
"vue2": "y", "vue2": "y",
"vue3": "u" "vue3": "y"
} }
} }
} }
......
## 1.3.1(2021-11-23)
- 修复 init 方法初始化问题
## 1.3.0(2021-11-19)
- 优化 组件UI,并提供设计资源,详见:[https://uniapp.dcloud.io/component/uniui/resource](https://uniapp.dcloud.io/component/uniui/resource)
- 文档迁移,详见:[https://uniapp.dcloud.io/component/uniui/uni-transition](https://uniapp.dcloud.io/component/uniui/uni-transition)
## 1.2.1(2021-09-27)
- 修复 init 方法不生效的 Bug
## 1.2.0(2021-07-30) ## 1.2.0(2021-07-30)
- 组件兼容 vue3,如何创建vue3项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834) - 组件兼容 vue3,如何创建 vue3 项目,详见 [uni-app 项目支持 vue3 介绍](https://ask.dcloud.net.cn/article/37834)
## 1.1.1(2021-05-12) ## 1.1.1(2021-05-12)
- 新增 示例地址 - 新增 示例地址
- 修复 示例项目缺少组件的Bug - 修复 示例项目缺少组件的 Bug
## 1.1.0(2021-04-22) ## 1.1.0(2021-04-22)
- 新增 通过方法自定义动画 - 新增 通过方法自定义动画
- 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式 - 新增 custom-class 非 NVUE 平台支持自定义 class 定制样式
...@@ -10,4 +17,4 @@ ...@@ -10,4 +17,4 @@
- 优化 支持单独的动画类型 - 优化 支持单独的动画类型
- 优化 文档示例 - 优化 文档示例
## 1.0.2(2021-02-05) ## 1.0.2(2021-02-05)
- 调整为uni_modules目录规范 - 调整为 uni_modules 目录规范
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
if (obj.duration) { if (obj.duration) {
this.durationTime = obj.duration this.durationTime = obj.duration
} }
this.animation = createAnimation(Object.assign(this.config, obj)) this.animation = createAnimation(Object.assign(this.config, obj),this)
}, },
/** /**
* 点击组件触发回调 * 点击组件触发回调
......
{ {
"id": "uni-transition", "id": "uni-transition",
"displayName": "uni-transition 过渡动画", "displayName": "uni-transition 过渡动画",
"version": "1.2.0", "version": "1.3.1",
"description": "元素的简单过渡动画", "description": "元素的简单过渡动画",
"keywords": [ "keywords": [
"uni-ui", "uni-ui",
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
"npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui" "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
}, },
"uni_modules": { "uni_modules": {
"dependencies": [], "dependencies": ["uni-scss"],
"encrypt": [], "encrypt": [],
"platforms": { "platforms": {
"cloud": { "cloud": {
...@@ -76,6 +76,10 @@ ...@@ -76,6 +76,10 @@
"快应用": { "快应用": {
"华为": "u", "华为": "u",
"联盟": "u" "联盟": "u"
},
"Vue": {
"vue2": "y",
"vue3": "y"
} }
} }
} }
......
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 sign in to comment