开始做登录

This commit is contained in:
2024-03-15 17:20:54 +08:00
parent b9335b4ff8
commit 633cff358d
1423 changed files with 35817 additions and 19 deletions

1
node_modules/@vant/weapp/dist/notify/index.d.ts generated vendored Normal file
View File

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

65
node_modules/@vant/weapp/dist/notify/index.js generated vendored Normal file
View File

@@ -0,0 +1,65 @@
import { VantComponent } from '../common/component';
import { WHITE } from '../common/color';
import { getSystemInfoSync } from '../common/utils';
VantComponent({
props: {
message: String,
background: String,
type: {
type: String,
value: 'danger',
},
color: {
type: String,
value: WHITE,
},
duration: {
type: Number,
value: 3000,
},
zIndex: {
type: Number,
value: 110,
},
safeAreaInsetTop: {
type: Boolean,
value: false,
},
top: null,
},
data: {
show: false,
onOpened: null,
onClose: null,
onClick: null,
},
created() {
const { statusBarHeight } = getSystemInfoSync();
this.setData({ statusBarHeight });
},
methods: {
show() {
const { duration, onOpened } = this.data;
clearTimeout(this.timer);
this.setData({ show: true });
wx.nextTick(onOpened);
if (duration > 0 && duration !== Infinity) {
this.timer = setTimeout(() => {
this.hide();
}, duration);
}
},
hide() {
const { onClose } = this.data;
clearTimeout(this.timer);
this.setData({ show: false });
wx.nextTick(onClose);
},
onTap(event) {
const { onClick } = this.data;
if (onClick) {
onClick(event.detail);
}
},
},
});

6
node_modules/@vant/weapp/dist/notify/index.json generated vendored Normal file
View File

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

21
node_modules/@vant/weapp/dist/notify/index.wxml generated vendored Normal file
View File

@@ -0,0 +1,21 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<van-transition
name="slide-down"
show="{{ show }}"
custom-class="van-notify__container"
custom-style="{{ computed.rootStyle({ zIndex, top }) }}"
bind:tap="onTap"
>
<view
class="van-notify van-notify--{{ type }}"
style="{{ computed.notifyStyle({ background, color }) }}"
>
<view
wx:if="{{ safeAreaInsetTop }}"
style="height: {{ statusBarHeight }}px"
/>
<text>{{ message }}</text>
</view>
</van-transition>

22
node_modules/@vant/weapp/dist/notify/index.wxs generated vendored Normal file
View File

@@ -0,0 +1,22 @@
/* eslint-disable */
var style = require('../wxs/style.wxs');
var addUnit = require('../wxs/add-unit.wxs');
function rootStyle(data) {
return style({
'z-index': data.zIndex,
top: addUnit(data.top),
});
}
function notifyStyle(data) {
return style({
background: data.background,
color: data.color,
});
}
module.exports = {
rootStyle: rootStyle,
notifyStyle: notifyStyle,
};

1
node_modules/@vant/weapp/dist/notify/index.wxss generated vendored Normal file
View File

@@ -0,0 +1 @@
@import '../common/index.wxss';.van-notify{word-wrap:break-word;font-size:var(--notify-font-size,14px);line-height:var(--notify-line-height,20px);padding:var(--notify-padding,6px 15px);text-align:center}.van-notify__container{box-sizing:border-box;left:0;position:fixed;top:0;width:100%}.van-notify--primary{background-color:var(--notify-primary-background-color,#1989fa)}.van-notify--success{background-color:var(--notify-success-background-color,#07c160)}.van-notify--danger{background-color:var(--notify-danger-background-color,#ee0a24)}.van-notify--warning{background-color:var(--notify-warning-background-color,#ff976a)}

22
node_modules/@vant/weapp/dist/notify/notify.d.ts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
interface NotifyOptions {
type?: 'primary' | 'success' | 'danger' | 'warning';
color?: string;
zIndex?: number;
top?: number;
message: string;
context?: any;
duration?: number;
selector?: string;
background?: string;
safeAreaInsetTop?: boolean;
onClick?: () => void;
onOpened?: () => void;
onClose?: () => void;
}
declare function Notify(options: NotifyOptions | string): any;
declare namespace Notify {
var clear: (options?: NotifyOptions | undefined) => void;
var setDefaultOptions: (options: NotifyOptions) => void;
var resetDefaultOptions: () => void;
}
export default Notify;

53
node_modules/@vant/weapp/dist/notify/notify.js generated vendored Normal file
View File

@@ -0,0 +1,53 @@
import { WHITE } from '../common/color';
const defaultOptions = {
selector: '#van-notify',
type: 'danger',
message: '',
background: '',
duration: 3000,
zIndex: 110,
top: 0,
color: WHITE,
safeAreaInsetTop: false,
onClick: () => { },
onOpened: () => { },
onClose: () => { },
};
let currentOptions = Object.assign({}, defaultOptions);
function parseOptions(message) {
if (message == null) {
return {};
}
return typeof message === 'string' ? { message } : message;
}
function getContext() {
const pages = getCurrentPages();
return pages[pages.length - 1];
}
export default function Notify(options) {
options = Object.assign(Object.assign({}, currentOptions), parseOptions(options));
const context = options.context || getContext();
const notify = context.selectComponent(options.selector);
delete options.context;
delete options.selector;
if (notify) {
notify.setData(options);
notify.show();
return notify;
}
console.warn('未找到 van-notify 节点,请确认 selector 及 context 是否正确');
}
Notify.clear = function (options) {
options = Object.assign(Object.assign({}, defaultOptions), parseOptions(options));
const context = options.context || getContext();
const notify = context.selectComponent(options.selector);
if (notify) {
notify.hide();
}
};
Notify.setDefaultOptions = (options) => {
Object.assign(currentOptions, options);
};
Notify.resetDefaultOptions = () => {
currentOptions = Object.assign({}, defaultOptions);
};