index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <template>
  2. <uni-shadow-root class="weapp-lib-overlay-index"><root-portal v-if="rootPortal">
  3. <include src="./overlay.wxml"></include>
  4. </root-portal>
  5. <include v-else src="./overlay.wxml"></include></uni-shadow-root>
  6. </template>
  7. <script>
  8. const __wxTemplateComponentProps = {}
  9. import __wxTemplateComponent0 from './overlay.vue'
  10. import VanTransition from '../transition/index.vue'
  11. global['__wxVueOptions'] = {components:{'van-transition': VanTransition,}}
  12. global['__wxRoute'] = 'weapp/lib/overlay/index'
  13. "use strict";
  14. Object.defineProperty(exports, "__esModule", { value: true });
  15. var component_1 = require("../common/component");
  16. (0, component_1.VantComponent)({
  17. props: {
  18. show: Boolean,
  19. customStyle: String,
  20. duration: {
  21. type: null,
  22. value: 300,
  23. },
  24. zIndex: {
  25. type: Number,
  26. value: 1,
  27. },
  28. lockScroll: {
  29. type: Boolean,
  30. value: true,
  31. },
  32. rootPortal: {
  33. type: Boolean,
  34. value: false,
  35. },
  36. },
  37. methods: {
  38. onClick: function () {
  39. this.$emit('click');
  40. },
  41. // for prevent touchmove
  42. noop: function () { },
  43. },
  44. });
  45. export default global['__wxComponents']['weapp/lib/overlay/index']
  46. </script>
  47. <style platform="mp-weixin">
  48. @import '../common/index.css';.van-overlay{background-color:var(--overlay-background-color,rgba(0,0,0,.7));height:100%;left:0;position:fixed;top:0;width:100%}
  49. </style>