12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- <template>
- <view
- class="u-safe-bottom"
- :style="[style]"
- :class="[!isNvue && 'u-safe-area-inset-bottom']"
- >
- </view>
- </template>
- <script>
- import props from "./props.js";
- import mpMixin from '../../libs/mixin/mpMixin.js';
- import mixin from '../../libs/mixin/mixin.js';
-
- export default {
- name: "u-safe-bottom",
- mixins: [mpMixin, 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>
|