仿互站小程序
This commit is contained in:
5
vant/common/color.js
Normal file
5
vant/common/color.js
Normal file
@@ -0,0 +1,5 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
|
||||
exports.RED = "#f44", exports.BLUE = "#1989fa", exports.GREEN = "#07c160";
|
44
vant/common/component.js
Normal file
44
vant/common/component.js
Normal file
@@ -0,0 +1,44 @@
|
||||
function e(e, s, a) {
|
||||
return s in e ? Object.defineProperty(e, s, {
|
||||
value: a,
|
||||
enumerable: !0,
|
||||
configurable: !0,
|
||||
writable: !0
|
||||
}) : e[s] = a, e;
|
||||
}
|
||||
|
||||
function s(e, s, a) {
|
||||
Object.keys(a).forEach(function(t) {
|
||||
e[t] && (s[a[t]] = e[t]);
|
||||
});
|
||||
}
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
}), exports.VantComponent = void 0;
|
||||
|
||||
var a = require("../mixins/basic"), t = require("../mixins/observer/index");
|
||||
|
||||
exports.VantComponent = function() {
|
||||
var r = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}, o = {};
|
||||
s(r, o, {
|
||||
data: "data",
|
||||
props: "properties",
|
||||
mixins: "behaviors",
|
||||
methods: "methods",
|
||||
beforeCreate: "created",
|
||||
created: "attached",
|
||||
mounted: "ready",
|
||||
relations: "relations",
|
||||
destroyed: "detached",
|
||||
classes: "externalClasses"
|
||||
});
|
||||
var n = r.relation;
|
||||
n && (o.relations = Object.assign(o.relations || {}, e({}, "../" + n.name + "/index", n))),
|
||||
o.externalClasses = o.externalClasses || [], o.externalClasses.push("custom-class"),
|
||||
o.behaviors = o.behaviors || [], o.behaviors.push(a.basic), r.field && o.behaviors.push("wx://form-field"),
|
||||
o.options = {
|
||||
multipleSlots: !0,
|
||||
addGlobalClass: !0
|
||||
}, (0, t.observe)(r, o), Component(o);
|
||||
};
|
34
vant/common/utils.js
Normal file
34
vant/common/utils.js
Normal file
@@ -0,0 +1,34 @@
|
||||
function t(t) {
|
||||
return void 0 !== t && null !== t;
|
||||
}
|
||||
|
||||
function n(t) {
|
||||
return /^\d+(\.\d+)?$/.test(t);
|
||||
}
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
|
||||
var e = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t) {
|
||||
return typeof t;
|
||||
} : function(t) {
|
||||
return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
|
||||
};
|
||||
|
||||
exports.isDef = t, exports.isObj = function(t) {
|
||||
var n = void 0 === t ? "undefined" : e(t);
|
||||
return null !== t && ("object" === n || "function" === n);
|
||||
}, exports.isNumber = n, exports.range = function(t, n, e) {
|
||||
return Math.min(Math.max(t, n), e);
|
||||
}, exports.nextTick = function(t) {
|
||||
setTimeout(function() {
|
||||
t();
|
||||
}, 1e3 / 30);
|
||||
}, exports.getSystemInfoSync = function() {
|
||||
return null == o && (o = wx.getSystemInfoSync()), o;
|
||||
}, exports.addUnit = function(e) {
|
||||
if (t(e)) return e = String(e), n(e) ? e + "px" : e;
|
||||
};
|
||||
|
||||
var o = null;
|
Reference in New Issue
Block a user