mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-18 00:45:55 +08:00
智慧宿舍系统小程序
This commit is contained in:
10
wechat/miniprogram/node_modules/@vant/weapp/lib/common/color.js
generated
vendored
Normal file
10
wechat/miniprogram/node_modules/@vant/weapp/lib/common/color.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.GRAY_DARK = exports.GRAY = exports.ORANGE = exports.GREEN = exports.WHITE = exports.BLUE = exports.RED = void 0;
|
||||
exports.RED = '#ee0a24';
|
||||
exports.BLUE = '#1989fa';
|
||||
exports.WHITE = '#fff';
|
||||
exports.GREEN = '#07c160';
|
||||
exports.ORANGE = '#ff976a';
|
||||
exports.GRAY = '#323233';
|
||||
exports.GRAY_DARK = '#969799';
|
||||
48
wechat/miniprogram/node_modules/@vant/weapp/lib/common/component.js
generated
vendored
Normal file
48
wechat/miniprogram/node_modules/@vant/weapp/lib/common/component.js
generated
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.VantComponent = void 0;
|
||||
var basic_1 = require('../mixins/basic');
|
||||
function mapKeys(source, target, map) {
|
||||
Object.keys(map).forEach(function (key) {
|
||||
if (source[key]) {
|
||||
target[map[key]] = source[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
function VantComponent(vantOptions) {
|
||||
var options = {};
|
||||
mapKeys(vantOptions, options, {
|
||||
data: 'data',
|
||||
props: 'properties',
|
||||
mixins: 'behaviors',
|
||||
methods: 'methods',
|
||||
beforeCreate: 'created',
|
||||
created: 'attached',
|
||||
mounted: 'ready',
|
||||
destroyed: 'detached',
|
||||
classes: 'externalClasses',
|
||||
});
|
||||
// add default externalClasses
|
||||
options.externalClasses = options.externalClasses || [];
|
||||
options.externalClasses.push('custom-class');
|
||||
// add default behaviors
|
||||
options.behaviors = options.behaviors || [];
|
||||
options.behaviors.push(basic_1.basic);
|
||||
// add relations
|
||||
var relation = vantOptions.relation;
|
||||
if (relation) {
|
||||
options.relations = relation.relations;
|
||||
options.behaviors.push(relation.mixin);
|
||||
}
|
||||
// map field to form-field behavior
|
||||
if (vantOptions.field) {
|
||||
options.behaviors.push('wx://form-field');
|
||||
}
|
||||
// add default options
|
||||
options.options = {
|
||||
multipleSlots: true,
|
||||
addGlobalClass: true,
|
||||
};
|
||||
Component(options);
|
||||
}
|
||||
exports.VantComponent = VantComponent;
|
||||
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/index.wxss
generated
vendored
Normal file
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/index.wxss
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{display:table;clear:both;content:""}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
|
||||
79
wechat/miniprogram/node_modules/@vant/weapp/lib/common/relation.js
generated
vendored
Normal file
79
wechat/miniprogram/node_modules/@vant/weapp/lib/common/relation.js
generated
vendored
Normal file
@@ -0,0 +1,79 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.useChildren = exports.useParent = void 0;
|
||||
function useParent(name, onEffect) {
|
||||
var _a;
|
||||
var path = '../' + name + '/index';
|
||||
return {
|
||||
relations:
|
||||
((_a = {}),
|
||||
(_a[path] = {
|
||||
type: 'ancestor',
|
||||
linked: function () {
|
||||
onEffect && onEffect.call(this);
|
||||
},
|
||||
linkChanged: function () {
|
||||
onEffect && onEffect.call(this);
|
||||
},
|
||||
unlinked: function () {
|
||||
onEffect && onEffect.call(this);
|
||||
},
|
||||
}),
|
||||
_a),
|
||||
mixin: Behavior({
|
||||
created: function () {
|
||||
var _this = this;
|
||||
Object.defineProperty(this, 'parent', {
|
||||
get: function () {
|
||||
return _this.getRelationNodes(path)[0];
|
||||
},
|
||||
});
|
||||
Object.defineProperty(this, 'index', {
|
||||
// @ts-ignore
|
||||
get: function () {
|
||||
var _a, _b;
|
||||
return (_b =
|
||||
(_a = _this.parent) === null || _a === void 0
|
||||
? void 0
|
||||
: _a.children) === null || _b === void 0
|
||||
? void 0
|
||||
: _b.indexOf(_this);
|
||||
},
|
||||
});
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
exports.useParent = useParent;
|
||||
function useChildren(name, onEffect) {
|
||||
var _a;
|
||||
var path = '../' + name + '/index';
|
||||
return {
|
||||
relations:
|
||||
((_a = {}),
|
||||
(_a[path] = {
|
||||
type: 'descendant',
|
||||
linked: function (target) {
|
||||
onEffect && onEffect.call(this, target);
|
||||
},
|
||||
linkChanged: function (target) {
|
||||
onEffect && onEffect.call(this, target);
|
||||
},
|
||||
unlinked: function (target) {
|
||||
onEffect && onEffect.call(this, target);
|
||||
},
|
||||
}),
|
||||
_a),
|
||||
mixin: Behavior({
|
||||
created: function () {
|
||||
var _this = this;
|
||||
Object.defineProperty(this, 'children', {
|
||||
get: function () {
|
||||
return _this.getRelationNodes(path) || [];
|
||||
},
|
||||
});
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
exports.useChildren = useChildren;
|
||||
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/clearfix.wxss
generated
vendored
Normal file
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/clearfix.wxss
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.van-clearfix:after{display:table;clear:both;content:""}
|
||||
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/ellipsis.wxss
generated
vendored
Normal file
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/ellipsis.wxss
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.van-ellipsis{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical}.van-multi-ellipsis--l3{-webkit-line-clamp:3}
|
||||
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/hairline.wxss
generated
vendored
Normal file
1
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/hairline.wxss
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{position:absolute;box-sizing:border-box;-webkit-transform-origin:center;transform-origin:center;content:" ";pointer-events:none;top:-50%;right:-50%;bottom:-50%;left:-50%;border:0 solid #ebedf0;-webkit-transform:scale(.5);transform:scale(.5)}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px}
|
||||
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/clearfix.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/clearfix.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/ellipsis.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/ellipsis.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/hairline.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/mixins/hairline.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/theme.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/theme.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/var.wxss
generated
vendored
Normal file
0
wechat/miniprogram/node_modules/@vant/weapp/lib/common/style/var.wxss
generated
vendored
Normal file
113
wechat/miniprogram/node_modules/@vant/weapp/lib/common/utils.js
generated
vendored
Normal file
113
wechat/miniprogram/node_modules/@vant/weapp/lib/common/utils.js
generated
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.getCurrentPage = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.getSystemInfoSync = exports.nextTick = exports.range = void 0;
|
||||
var validator_1 = require('./validator');
|
||||
var version_1 = require('./version');
|
||||
function range(num, min, max) {
|
||||
return Math.min(Math.max(num, min), max);
|
||||
}
|
||||
exports.range = range;
|
||||
function nextTick(cb) {
|
||||
if (version_1.canIUseNextTick()) {
|
||||
wx.nextTick(cb);
|
||||
} else {
|
||||
setTimeout(function () {
|
||||
cb();
|
||||
}, 1000 / 30);
|
||||
}
|
||||
}
|
||||
exports.nextTick = nextTick;
|
||||
var systemInfo;
|
||||
function getSystemInfoSync() {
|
||||
if (systemInfo == null) {
|
||||
systemInfo = wx.getSystemInfoSync();
|
||||
}
|
||||
return systemInfo;
|
||||
}
|
||||
exports.getSystemInfoSync = getSystemInfoSync;
|
||||
function addUnit(value) {
|
||||
if (!validator_1.isDef(value)) {
|
||||
return undefined;
|
||||
}
|
||||
value = String(value);
|
||||
return validator_1.isNumber(value) ? value + 'px' : value;
|
||||
}
|
||||
exports.addUnit = addUnit;
|
||||
function requestAnimationFrame(cb) {
|
||||
var systemInfo = getSystemInfoSync();
|
||||
if (systemInfo.platform === 'devtools') {
|
||||
return setTimeout(function () {
|
||||
cb();
|
||||
}, 1000 / 30);
|
||||
}
|
||||
return wx
|
||||
.createSelectorQuery()
|
||||
.selectViewport()
|
||||
.boundingClientRect()
|
||||
.exec(function () {
|
||||
cb();
|
||||
});
|
||||
}
|
||||
exports.requestAnimationFrame = requestAnimationFrame;
|
||||
function pickExclude(obj, keys) {
|
||||
if (!validator_1.isPlainObject(obj)) {
|
||||
return {};
|
||||
}
|
||||
return Object.keys(obj).reduce(function (prev, key) {
|
||||
if (!keys.includes(key)) {
|
||||
prev[key] = obj[key];
|
||||
}
|
||||
return prev;
|
||||
}, {});
|
||||
}
|
||||
exports.pickExclude = pickExclude;
|
||||
function getRect(context, selector) {
|
||||
return new Promise(function (resolve) {
|
||||
wx.createSelectorQuery()
|
||||
.in(context)
|
||||
.select(selector)
|
||||
.boundingClientRect()
|
||||
.exec(function (rect) {
|
||||
if (rect === void 0) {
|
||||
rect = [];
|
||||
}
|
||||
return resolve(rect[0]);
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.getRect = getRect;
|
||||
function getAllRect(context, selector) {
|
||||
return new Promise(function (resolve) {
|
||||
wx.createSelectorQuery()
|
||||
.in(context)
|
||||
.selectAll(selector)
|
||||
.boundingClientRect()
|
||||
.exec(function (rect) {
|
||||
if (rect === void 0) {
|
||||
rect = [];
|
||||
}
|
||||
return resolve(rect[0]);
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.getAllRect = getAllRect;
|
||||
function groupSetData(context, cb) {
|
||||
if (version_1.canIUseGroupSetData()) {
|
||||
context.groupSetData(cb);
|
||||
} else {
|
||||
cb();
|
||||
}
|
||||
}
|
||||
exports.groupSetData = groupSetData;
|
||||
function toPromise(promiseLike) {
|
||||
if (validator_1.isPromise(promiseLike)) {
|
||||
return promiseLike;
|
||||
}
|
||||
return Promise.resolve(promiseLike);
|
||||
}
|
||||
exports.toPromise = toPromise;
|
||||
function getCurrentPage() {
|
||||
var pages = getCurrentPages();
|
||||
return pages[pages.length - 1];
|
||||
}
|
||||
exports.getCurrentPage = getCurrentPage;
|
||||
43
wechat/miniprogram/node_modules/@vant/weapp/lib/common/validator.js
generated
vendored
Normal file
43
wechat/miniprogram/node_modules/@vant/weapp/lib/common/validator.js
generated
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.isVideoUrl = exports.isImageUrl = exports.isBoolean = exports.isNumber = exports.isObj = exports.isDef = exports.isPromise = exports.isPlainObject = exports.isFunction = void 0;
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
function isFunction(val) {
|
||||
return typeof val === 'function';
|
||||
}
|
||||
exports.isFunction = isFunction;
|
||||
function isPlainObject(val) {
|
||||
return val !== null && typeof val === 'object' && !Array.isArray(val);
|
||||
}
|
||||
exports.isPlainObject = isPlainObject;
|
||||
function isPromise(val) {
|
||||
return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch);
|
||||
}
|
||||
exports.isPromise = isPromise;
|
||||
function isDef(value) {
|
||||
return value !== undefined && value !== null;
|
||||
}
|
||||
exports.isDef = isDef;
|
||||
function isObj(x) {
|
||||
var type = typeof x;
|
||||
return x !== null && (type === 'object' || type === 'function');
|
||||
}
|
||||
exports.isObj = isObj;
|
||||
function isNumber(value) {
|
||||
return /^\d+(\.\d+)?$/.test(value);
|
||||
}
|
||||
exports.isNumber = isNumber;
|
||||
function isBoolean(value) {
|
||||
return typeof value === 'boolean';
|
||||
}
|
||||
exports.isBoolean = isBoolean;
|
||||
var IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i;
|
||||
var VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i;
|
||||
function isImageUrl(url) {
|
||||
return IMAGE_REGEXP.test(url);
|
||||
}
|
||||
exports.isImageUrl = isImageUrl;
|
||||
function isVideoUrl(url) {
|
||||
return VIDEO_REGEXP.test(url);
|
||||
}
|
||||
exports.isVideoUrl = isVideoUrl;
|
||||
58
wechat/miniprogram/node_modules/@vant/weapp/lib/common/version.js
generated
vendored
Normal file
58
wechat/miniprogram/node_modules/@vant/weapp/lib/common/version.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
exports.canIUseGetUserProfile = exports.canIUseCanvas2d = exports.canIUseNextTick = exports.canIUseGroupSetData = exports.canIUseAnimate = exports.canIUseFormFieldButton = exports.canIUseModel = void 0;
|
||||
var utils_1 = require('./utils');
|
||||
function compareVersion(v1, v2) {
|
||||
v1 = v1.split('.');
|
||||
v2 = v2.split('.');
|
||||
var len = Math.max(v1.length, v2.length);
|
||||
while (v1.length < len) {
|
||||
v1.push('0');
|
||||
}
|
||||
while (v2.length < len) {
|
||||
v2.push('0');
|
||||
}
|
||||
for (var i = 0; i < len; i++) {
|
||||
var num1 = parseInt(v1[i], 10);
|
||||
var num2 = parseInt(v2[i], 10);
|
||||
if (num1 > num2) {
|
||||
return 1;
|
||||
}
|
||||
if (num1 < num2) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
function gte(version) {
|
||||
var system = utils_1.getSystemInfoSync();
|
||||
return compareVersion(system.SDKVersion, version) >= 0;
|
||||
}
|
||||
function canIUseModel() {
|
||||
return gte('2.9.3');
|
||||
}
|
||||
exports.canIUseModel = canIUseModel;
|
||||
function canIUseFormFieldButton() {
|
||||
return gte('2.10.3');
|
||||
}
|
||||
exports.canIUseFormFieldButton = canIUseFormFieldButton;
|
||||
function canIUseAnimate() {
|
||||
return gte('2.9.0');
|
||||
}
|
||||
exports.canIUseAnimate = canIUseAnimate;
|
||||
function canIUseGroupSetData() {
|
||||
return gte('2.4.0');
|
||||
}
|
||||
exports.canIUseGroupSetData = canIUseGroupSetData;
|
||||
function canIUseNextTick() {
|
||||
return wx.canIUse('nextTick');
|
||||
}
|
||||
exports.canIUseNextTick = canIUseNextTick;
|
||||
function canIUseCanvas2d() {
|
||||
return gte('2.9.0');
|
||||
}
|
||||
exports.canIUseCanvas2d = canIUseCanvas2d;
|
||||
function canIUseGetUserProfile() {
|
||||
return !!wx.getUserProfile;
|
||||
}
|
||||
exports.canIUseGetUserProfile = canIUseGetUserProfile;
|
||||
Reference in New Issue
Block a user