1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <template>
- <view
- class="u-safe-bottom"
- :style="[style]"
- :class="[!isNvue && 'u-safe-area-inset-bottom']"
- >
- </view>
- </template>
- <script>
- import props from "./props.js";
-
- export default {
- name: "u-safe-bottom",
- mixins: [uni.$u.mpMixin, uni.$u.mixin, props],
- data() {
- return {
- safeAreaBottomHeight: 0,
- isNvue: false,
- };
- },
- computed: {
- style() {
- const style = {};
-
-
- style.height = uni.$u.addUnit(uni.$u.sys().safeAreaInsets.bottom, 'px');
-
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- },
- },
- mounted() {
-
-
- this.isNvue = true;
-
- },
- };
- </script>
- <style lang="scss" scoped>
- .u-safe-bottom {
-
- width: 100%;
-
- }
- </style>
|