first commit

This commit is contained in:
lxj
2025-06-26 12:38:35 +08:00
commit c536475e19
1236 changed files with 186274 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
## 1.0.22024-05-08
更新域名
## 1.0.12023-09-11
优化底部安全距离计算方法
## 1.0.02023-09-01
主要是针对IPhone X等一些底部带指示条的机型指示条的操作区域与页面底部存在重合容易导致用户误操作因此我们需要针对这些机型进行底部安全区适配。

View File

@@ -0,0 +1,5 @@
export default {
props: {
...uni.$w?.props?.safeBottom
}
}

View File

@@ -0,0 +1,61 @@
<template>
<view
class="wu-safe-bottom"
:style="[style]"
>
</view>
</template>
<script>
import mpMixin from '@/uni_modules/wu-ui-tools/libs/mixin/mpMixin.js';
import mixin from '@/uni_modules/wu-ui-tools/libs/mixin/mixin.js';
import props from './props.js';
/**
* SafeBottom 底部安全区
* @description 这个适配主要是针对IPhone X等一些底部带指示条的机型指示条的操作区域与页面底部存在重合容易导致用户误操作因此我们需要针对这些机型进行底部安全区适配。
* @tutorial https://wuui.cn/zh-CN/components/safeAreaInset.html
* @property {type} prop_name
* @property {Object} customStyle 定义需要用到的外部样式
*
* @event {Function()}
* @example <wu-status-bar></wu-status-bar>
*/
export default {
name: "wu-safe-bottom",
mixins: [mpMixin, mixin, props],
data() {
return {
safeAreaBottomHeight: 0,
isNvue: false,
};
},
computed: {
style() {
const {
windowWidth,
windowHeight,
windowTop,
safeArea,
screenHeight,
safeAreaInsets
} = this.$w.sys();
const style = {};
// #ifdef MP-WEIXIN
style.height = this.$w.addUnit(screenHeight - safeArea.bottom, 'px');
// #endif
// #ifndef MP-WEIXIN
style.height = this.$w.addUnit(safeAreaInsets.bottom, 'px');
// #endif
return this.$w.deepMerge(style, this.$w.addStyle(this.customStyle));
},
},
};
</script>
<style lang="scss" scoped>
.wu-safe-bottom {
/* #ifndef APP-NVUE */
width: 100%;
/* #endif */
}
</style>

View File

@@ -0,0 +1,88 @@
{
"id": "wu-safe-bottom",
"displayName": "wu-safe-bottom底部安全区 全端兼容 无论平台 一致体验",
"version": "1.0.2",
"description": "针对一些底部带指示条的机型,操作区域与页面底部重合,容易误操作,因此本插件对这些机型进行底部安全区适配",
"keywords": [
"wu-ui",
"wuui",
"wu-safe-bottom",
"safe-bottom",
"底部安全区"
],
"repository": "",
"engines": {
"HBuilderX": "^3.4.15"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "插件不采集任何数据",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [
"wu-ui-tools"
],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y",
"alipay": "n"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "y"
},
"App": {
"app-vue": "y",
"app-nvue": "y"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "y",
"IE": "y",
"Edge": "y",
"Firefox": "y",
"Safari": "y"
},
"小程序": {
"微信": "y",
"阿里": "y",
"百度": "y",
"字节跳动": "y",
"QQ": "y",
"钉钉": "n",
"快手": "n",
"飞书": "n",
"京东": "n"
},
"快应用": {
"华为": "n",
"联盟": "n"
}
}
}
}
}

View File

@@ -0,0 +1,16 @@
## wu-safe-bottom 底部安全区
> **组件名wu-safe-bottom**
这个适配主要是针对IPhone X等一些底部带指示条的机型指示条的操作区域与页面底部存在重合容易导致用户误操作因此我们需要针对这些机型进行底部安全区适配。
## [查看文档](https://wuui.cn/zh-CN/components/safeAreaInset.html)
## [更多组件, 请查看 `wu-ui` 组件库](https://ext.dcloud.net.cn/plugin?name=wu--ui)
(请勿下载插件zip)
<a href="https://ext.dcloud.net.cn/plugin?name=wu--ui">
<img src="https://wuui.cn/intr.png">
</a>
**如使用过程中有任何问题或者您对wu-ui有一些好的建议。<br>欢迎加入 [wu-ui 交流群](https://wuui.cn/zh-CN/components/qqFeedBack.html)**