提交初始版本,使用vant ui库

This commit is contained in:
2024-02-01 14:38:56 +08:00
commit 787a1f26b6
480 changed files with 12239 additions and 0 deletions

View File

@@ -0,0 +1 @@
export {};

View File

@@ -0,0 +1,32 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var component_1 = require("../common/component");
(0, component_1.VantComponent)({
props: {
show: Boolean,
customStyle: String,
duration: {
type: null,
value: 300,
},
zIndex: {
type: Number,
value: 1,
},
lockScroll: {
type: Boolean,
value: true,
},
rootPortal: {
type: Boolean,
value: false,
},
},
methods: {
onClick: function () {
this.$emit('click');
},
// for prevent touchmove
noop: function () { },
},
});

View File

@@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"van-transition": "../transition/index"
}
}

View File

@@ -0,0 +1,7 @@
<import src="./overlay.wxml" />
<root-portal wx:if="{{ rootPortal }}">
<include src="./overlay.wxml" />
</root-portal>
<include wx:else src="./overlay.wxml" />

View File

@@ -0,0 +1 @@
@import '../common/index.wxss';.van-overlay{background-color:var(--overlay-background-color,rgba(0,0,0,.7));height:100%;left:0;position:fixed;top:0;width:100%}

View File

@@ -0,0 +1,10 @@
<van-transition
show="{{ show }}"
custom-class="van-overlay custom-class"
custom-style="z-index: {{ zIndex }}; {{ customStyle }}"
duration="{{ duration }}"
bind:tap="onClick"
catch:touchmove="{{ lockScroll ? 'noop' : ''}}"
>
<slot></slot>
</van-transition>