|
@@ -9843,18 +9843,17 @@ exports.default = _default;
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
|
|
Object.defineProperty(exports, "__esModule", {
|
|
|
value: true
|
|
|
});
|
|
|
exports.def = def;
|
|
|
-var dev = {
|
|
|
+var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
|
|
+var _dev;
|
|
|
+var dev = (_dev = {
|
|
|
// baseUrlNew: 'http://192.168.110.72:8182',
|
|
|
- baseUrlNew: 'http://192.168.110.138:8182',
|
|
|
- // baseUrlNew: 'http://192.168.110.82:8182',
|
|
|
- // baseUrlNew: 'https://cardapi.eliangeyun.com',
|
|
|
- h5Appid: 'wxb66b599f7f61b46f',
|
|
|
- debug: false
|
|
|
-};
|
|
|
+ baseUrlNew: 'http://192.168.110.138:8182'
|
|
|
+}, (0, _defineProperty2.default)(_dev, "baseUrlNew", 'http://192.168.110.138:8183'), (0, _defineProperty2.default)(_dev, "h5Appid", 'wxb66b599f7f61b46f'), (0, _defineProperty2.default)(_dev, "debug", false), _dev);
|
|
|
function def() {
|
|
|
return dev;
|
|
|
}
|
|
@@ -24195,6 +24194,2731 @@ function throttle(fn, gapTime) {
|
|
|
}
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
|
|
|
+/***/ }),
|
|
|
+/* 183 */,
|
|
|
+/* 184 */,
|
|
|
+/* 185 */,
|
|
|
+/* 186 */,
|
|
|
+/* 187 */,
|
|
|
+/* 188 */,
|
|
|
+/* 189 */,
|
|
|
+/* 190 */,
|
|
|
+/* 191 */,
|
|
|
+/* 192 */,
|
|
|
+/* 193 */,
|
|
|
+/* 194 */,
|
|
|
+/* 195 */,
|
|
|
+/* 196 */,
|
|
|
+/* 197 */,
|
|
|
+/* 198 */,
|
|
|
+/* 199 */,
|
|
|
+/* 200 */,
|
|
|
+/* 201 */,
|
|
|
+/* 202 */,
|
|
|
+/* 203 */,
|
|
|
+/* 204 */,
|
|
|
+/* 205 */,
|
|
|
+/* 206 */,
|
|
|
+/* 207 */,
|
|
|
+/* 208 */,
|
|
|
+/* 209 */,
|
|
|
+/* 210 */,
|
|
|
+/* 211 */,
|
|
|
+/* 212 */,
|
|
|
+/* 213 */,
|
|
|
+/* 214 */,
|
|
|
+/* 215 */,
|
|
|
+/* 216 */,
|
|
|
+/* 217 */,
|
|
|
+/* 218 */,
|
|
|
+/* 219 */,
|
|
|
+/* 220 */,
|
|
|
+/* 221 */,
|
|
|
+/* 222 */,
|
|
|
+/* 223 */,
|
|
|
+/* 224 */,
|
|
|
+/* 225 */,
|
|
|
+/* 226 */
|
|
|
+/*!**********************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-form/props.js ***!
|
|
|
+ \**********************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // 当前form的需要验证字段的集合
|
|
|
+ model: {
|
|
|
+ type: Object,
|
|
|
+ default: uni.$u.props.form.model
|
|
|
+ },
|
|
|
+ // 验证规则
|
|
|
+ rules: {
|
|
|
+ type: [Object, Function, Array],
|
|
|
+ default: uni.$u.props.form.rules
|
|
|
+ },
|
|
|
+ // 有错误时的提示方式,message-提示信息,toast-进行toast提示
|
|
|
+ // border-bottom-下边框呈现红色,none-无提示
|
|
|
+ errorType: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.form.errorType
|
|
|
+ },
|
|
|
+ // 是否显示表单域的下划线边框
|
|
|
+ borderBottom: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.form.borderBottom
|
|
|
+ },
|
|
|
+ // label的位置,left-左边,top-上边
|
|
|
+ labelPosition: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.form.labelPosition
|
|
|
+ },
|
|
|
+ // label的宽度,单位px
|
|
|
+ labelWidth: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.form.labelWidth
|
|
|
+ },
|
|
|
+ // lable字体的对齐方式
|
|
|
+ labelAlign: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.form.labelAlign
|
|
|
+ },
|
|
|
+ // lable的样式,对象形式
|
|
|
+ labelStyle: {
|
|
|
+ type: Object,
|
|
|
+ default: uni.$u.props.form.labelStyle
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 227 */,
|
|
|
+/* 228 */,
|
|
|
+/* 229 */,
|
|
|
+/* 230 */,
|
|
|
+/* 231 */,
|
|
|
+/* 232 */
|
|
|
+/*!*****************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-radio-group/props.js ***!
|
|
|
+ \*****************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // 绑定的值
|
|
|
+ value: {
|
|
|
+ type: [String, Number, Boolean],
|
|
|
+ default: uni.$u.props.radioGroup.value
|
|
|
+ },
|
|
|
+ // 是否禁用全部radio
|
|
|
+ disabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.radioGroup.disabled
|
|
|
+ },
|
|
|
+ // 形状,circle-圆形,square-方形
|
|
|
+ shape: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radioGroup.shape
|
|
|
+ },
|
|
|
+ // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
|
|
|
+ activeColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radioGroup.activeColor
|
|
|
+ },
|
|
|
+ // 未选中的颜色
|
|
|
+ inactiveColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radioGroup.inactiveColor
|
|
|
+ },
|
|
|
+ // 标识符
|
|
|
+ name: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radioGroup.name
|
|
|
+ },
|
|
|
+ // 整个组件的尺寸,默认px
|
|
|
+ size: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.radioGroup.size
|
|
|
+ },
|
|
|
+ // 布局方式,row-横向,column-纵向
|
|
|
+ placement: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radioGroup.placement
|
|
|
+ },
|
|
|
+ // label的文本
|
|
|
+ label: {
|
|
|
+ type: [String],
|
|
|
+ default: uni.$u.props.radioGroup.label
|
|
|
+ },
|
|
|
+ // label的颜色 (默认 '#303133' )
|
|
|
+ labelColor: {
|
|
|
+ type: [String],
|
|
|
+ default: uni.$u.props.radioGroup.labelColor
|
|
|
+ },
|
|
|
+ // label的字体大小,px单位
|
|
|
+ labelSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.radioGroup.labelSize
|
|
|
+ },
|
|
|
+ // 是否禁止点击文本操作checkbox(默认 false )
|
|
|
+ labelDisabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.radioGroup.labelDisabled
|
|
|
+ },
|
|
|
+ // 图标颜色
|
|
|
+ iconColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radioGroup.iconColor
|
|
|
+ },
|
|
|
+ // 图标的大小,单位px
|
|
|
+ iconSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.radioGroup.iconSize
|
|
|
+ },
|
|
|
+ // 竖向配列时,是否显示下划线
|
|
|
+ borderBottom: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.radioGroup.borderBottom
|
|
|
+ },
|
|
|
+ // 图标与文字的对齐方式
|
|
|
+ iconPlacement: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radio.iconPlacement
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 233 */,
|
|
|
+/* 234 */,
|
|
|
+/* 235 */,
|
|
|
+/* 236 */,
|
|
|
+/* 237 */,
|
|
|
+/* 238 */,
|
|
|
+/* 239 */,
|
|
|
+/* 240 */
|
|
|
+/*!***********************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-radio/props.js ***!
|
|
|
+ \***********************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // radio的名称
|
|
|
+ name: {
|
|
|
+ type: [String, Number, Boolean],
|
|
|
+ default: uni.$u.props.radio.name
|
|
|
+ },
|
|
|
+ // 形状,square为方形,circle为圆型
|
|
|
+ shape: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radio.shape
|
|
|
+ },
|
|
|
+ // 是否禁用
|
|
|
+ disabled: {
|
|
|
+ type: [String, Boolean],
|
|
|
+ default: uni.$u.props.radio.disabled
|
|
|
+ },
|
|
|
+ // 是否禁止点击提示语选中单选框
|
|
|
+ labelDisabled: {
|
|
|
+ type: [String, Boolean],
|
|
|
+ default: uni.$u.props.radio.labelDisabled
|
|
|
+ },
|
|
|
+ // 选中状态下的颜色,如设置此值,将会覆盖parent的activeColor值
|
|
|
+ activeColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radio.activeColor
|
|
|
+ },
|
|
|
+ // 未选中的颜色
|
|
|
+ inactiveColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radio.inactiveColor
|
|
|
+ },
|
|
|
+ // 图标的大小,单位px
|
|
|
+ iconSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.radio.iconSize
|
|
|
+ },
|
|
|
+ // label的字体大小,px单位
|
|
|
+ labelSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.radio.labelSize
|
|
|
+ },
|
|
|
+ // label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
|
|
|
+ label: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.radio.label
|
|
|
+ },
|
|
|
+ // 整体的大小
|
|
|
+ size: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.radio.size
|
|
|
+ },
|
|
|
+ // 图标颜色
|
|
|
+ color: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radio.color
|
|
|
+ },
|
|
|
+ // label的颜色
|
|
|
+ labelColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.radio.labelColor
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 241 */,
|
|
|
+/* 242 */,
|
|
|
+/* 243 */,
|
|
|
+/* 244 */,
|
|
|
+/* 245 */,
|
|
|
+/* 246 */,
|
|
|
+/* 247 */,
|
|
|
+/* 248 */
|
|
|
+/*!***************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-form-item/props.js ***!
|
|
|
+ \***************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // input的label提示语
|
|
|
+ label: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.formItem.label
|
|
|
+ },
|
|
|
+ // 绑定的值
|
|
|
+ prop: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.formItem.prop
|
|
|
+ },
|
|
|
+ // 是否显示表单域的下划线边框
|
|
|
+ borderBottom: {
|
|
|
+ type: [String, Boolean],
|
|
|
+ default: uni.$u.props.formItem.borderBottom
|
|
|
+ },
|
|
|
+ // label的位置,left-左边,top-上边
|
|
|
+ labelPosition: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.formItem.labelPosition
|
|
|
+ },
|
|
|
+ // label的宽度,单位px
|
|
|
+ labelWidth: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.formItem.labelWidth
|
|
|
+ },
|
|
|
+ // 右侧图标
|
|
|
+ rightIcon: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.formItem.rightIcon
|
|
|
+ },
|
|
|
+ // 左侧图标
|
|
|
+ leftIcon: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.formItem.leftIcon
|
|
|
+ },
|
|
|
+ // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
|
|
|
+ required: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.formItem.required
|
|
|
+ },
|
|
|
+ leftIconStyle: {
|
|
|
+ type: [String, Object],
|
|
|
+ default: uni.$u.props.formItem.leftIconStyle
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 249 */,
|
|
|
+/* 250 */,
|
|
|
+/* 251 */,
|
|
|
+/* 252 */,
|
|
|
+/* 253 */,
|
|
|
+/* 254 */,
|
|
|
+/* 255 */,
|
|
|
+/* 256 */
|
|
|
+/*!***********************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-input/props.js ***!
|
|
|
+ \***********************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // 输入的值
|
|
|
+ value: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.input.value
|
|
|
+ },
|
|
|
+ // 输入框类型
|
|
|
+ // number-数字输入键盘,app-vue下可以输入浮点数,app-nvue和小程序平台下只能输入整数
|
|
|
+ // idcard-身份证输入键盘,微信、支付宝、百度、QQ小程序
|
|
|
+ // digit-带小数点的数字键盘,App的nvue页面、微信、支付宝、百度、头条、QQ小程序
|
|
|
+ // text-文本输入键盘
|
|
|
+ type: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.type
|
|
|
+ },
|
|
|
+ // 如果 textarea 是在一个 position:fixed 的区域,需要显示指定属性 fixed 为 true,
|
|
|
+ // 兼容性:微信小程序、百度小程序、字节跳动小程序、QQ小程序
|
|
|
+ fixed: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.fixed
|
|
|
+ },
|
|
|
+ // 是否禁用输入框
|
|
|
+ disabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.disabled
|
|
|
+ },
|
|
|
+ // 禁用状态时的背景色
|
|
|
+ disabledColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.disabledColor
|
|
|
+ },
|
|
|
+ // 是否显示清除控件
|
|
|
+ clearable: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.clearable
|
|
|
+ },
|
|
|
+ // 是否密码类型
|
|
|
+ password: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.password
|
|
|
+ },
|
|
|
+ // 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
|
+ maxlength: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.input.maxlength
|
|
|
+ },
|
|
|
+ // 输入框为空时的占位符
|
|
|
+ placeholder: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.placeholder
|
|
|
+ },
|
|
|
+ // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
|
|
+ placeholderClass: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.placeholderClass
|
|
|
+ },
|
|
|
+ // 指定placeholder的样式
|
|
|
+ placeholderStyle: {
|
|
|
+ type: [String, Object],
|
|
|
+ default: uni.$u.props.input.placeholderStyle
|
|
|
+ },
|
|
|
+ // 是否显示输入字数统计,只在 type ="text"或type ="textarea"时有效
|
|
|
+ showWordLimit: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.showWordLimit
|
|
|
+ },
|
|
|
+ // 设置右下角按钮的文字,有效值:send|search|next|go|done,兼容性详见uni-app文档
|
|
|
+ // https://uniapp.dcloud.io/component/input
|
|
|
+ // https://uniapp.dcloud.io/component/textarea
|
|
|
+ confirmType: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.confirmType
|
|
|
+ },
|
|
|
+ // 点击键盘右下角按钮时是否保持键盘不收起,H5无效
|
|
|
+ confirmHold: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.confirmHold
|
|
|
+ },
|
|
|
+ // focus时,点击页面的时候不收起键盘,微信小程序有效
|
|
|
+ holdKeyboard: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.holdKeyboard
|
|
|
+ },
|
|
|
+ // 自动获取焦点
|
|
|
+ // 在 H5 平台能否聚焦以及软键盘是否跟随弹出,取决于当前浏览器本身的实现。nvue 页面不支持,需使用组件的 focus()、blur() 方法控制焦点
|
|
|
+ focus: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.focus
|
|
|
+ },
|
|
|
+ // 键盘收起时,是否自动失去焦点,目前仅App3.0.0+有效
|
|
|
+ autoBlur: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.autoBlur
|
|
|
+ },
|
|
|
+ // 是否去掉 iOS 下的默认内边距,仅微信小程序,且type=textarea时有效
|
|
|
+ disableDefaultPadding: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.disableDefaultPadding
|
|
|
+ },
|
|
|
+ // 指定focus时光标的位置
|
|
|
+ cursor: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.input.cursor
|
|
|
+ },
|
|
|
+ // 输入框聚焦时底部与键盘的距离
|
|
|
+ cursorSpacing: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.input.cursorSpacing
|
|
|
+ },
|
|
|
+ // 光标起始位置,自动聚集时有效,需与selection-end搭配使用
|
|
|
+ selectionStart: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.input.selectionStart
|
|
|
+ },
|
|
|
+ // 光标结束位置,自动聚集时有效,需与selection-start搭配使用
|
|
|
+ selectionEnd: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.input.selectionEnd
|
|
|
+ },
|
|
|
+ // 键盘弹起时,是否自动上推页面
|
|
|
+ adjustPosition: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.adjustPosition
|
|
|
+ },
|
|
|
+ // 输入框内容对齐方式,可选值为:left|center|right
|
|
|
+ inputAlign: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.inputAlign
|
|
|
+ },
|
|
|
+ // 输入框字体的大小
|
|
|
+ fontSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.input.fontSize
|
|
|
+ },
|
|
|
+ // 输入框字体颜色
|
|
|
+ color: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.color
|
|
|
+ },
|
|
|
+ // 输入框前置图标
|
|
|
+ prefixIcon: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.prefixIcon
|
|
|
+ },
|
|
|
+ // 前置图标样式,对象或字符串
|
|
|
+ prefixIconStyle: {
|
|
|
+ type: [String, Object],
|
|
|
+ default: uni.$u.props.input.prefixIconStyle
|
|
|
+ },
|
|
|
+ // 输入框后置图标
|
|
|
+ suffixIcon: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.suffixIcon
|
|
|
+ },
|
|
|
+ // 后置图标样式,对象或字符串
|
|
|
+ suffixIconStyle: {
|
|
|
+ type: [String, Object],
|
|
|
+ default: uni.$u.props.input.suffixIconStyle
|
|
|
+ },
|
|
|
+ // 边框类型,surround-四周边框,bottom-底部边框,none-无边框
|
|
|
+ border: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.border
|
|
|
+ },
|
|
|
+ // 是否只读,与disabled不同之处在于disabled会置灰组件,而readonly则不会
|
|
|
+ readonly: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.input.readonly
|
|
|
+ },
|
|
|
+ // 输入框形状,circle-圆形,square-方形
|
|
|
+ shape: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.shape
|
|
|
+ },
|
|
|
+ // 用于处理或者过滤输入框内容的方法
|
|
|
+ formatter: {
|
|
|
+ type: [Function, null],
|
|
|
+ default: uni.$u.props.input.formatter
|
|
|
+ },
|
|
|
+ // 是否忽略组件内对文本合成系统事件的处理
|
|
|
+ ignoreCompositionEvent: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 257 */,
|
|
|
+/* 258 */,
|
|
|
+/* 259 */,
|
|
|
+/* 260 */,
|
|
|
+/* 261 */,
|
|
|
+/* 262 */,
|
|
|
+/* 263 */,
|
|
|
+/* 264 */
|
|
|
+/*!************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-upload/utils.js ***!
|
|
|
+ \************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni, wx) {
|
|
|
+
|
|
|
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.chooseFile = chooseFile;
|
|
|
+var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
|
|
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
|
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
|
+function pickExclude(obj, keys) {
|
|
|
+ // 某些情况下,type可能会为
|
|
|
+ if (!['[object Object]', '[object File]'].includes(Object.prototype.toString.call(obj))) {
|
|
|
+ return {};
|
|
|
+ }
|
|
|
+ return Object.keys(obj).reduce(function (prev, key) {
|
|
|
+ if (!keys.includes(key)) {
|
|
|
+ prev[key] = obj[key];
|
|
|
+ }
|
|
|
+ return prev;
|
|
|
+ }, {});
|
|
|
+}
|
|
|
+function formatImage(res) {
|
|
|
+ return res.tempFiles.map(function (item) {
|
|
|
+ return _objectSpread(_objectSpread({}, pickExclude(item, ['path'])), {}, {
|
|
|
+ type: 'image',
|
|
|
+ url: item.path,
|
|
|
+ thumb: item.path,
|
|
|
+ size: item.size
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
+function formatVideo(res) {
|
|
|
+ return [_objectSpread(_objectSpread({}, pickExclude(res, ['tempFilePath', 'thumbTempFilePath', 'errMsg'])), {}, {
|
|
|
+ type: 'video',
|
|
|
+ url: res.tempFilePath,
|
|
|
+ thumb: res.thumbTempFilePath,
|
|
|
+ size: res.size
|
|
|
+ })];
|
|
|
+}
|
|
|
+function formatMedia(res) {
|
|
|
+ return res.tempFiles.map(function (item) {
|
|
|
+ return _objectSpread(_objectSpread({}, pickExclude(item, ['fileType', 'thumbTempFilePath', 'tempFilePath'])), {}, {
|
|
|
+ type: res.type,
|
|
|
+ url: item.tempFilePath,
|
|
|
+ thumb: res.type === 'video' ? item.thumbTempFilePath : item.tempFilePath,
|
|
|
+ size: item.size
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
+function formatFile(res) {
|
|
|
+ return res.tempFiles.map(function (item) {
|
|
|
+ return _objectSpread(_objectSpread({}, pickExclude(item, ['path'])), {}, {
|
|
|
+ url: item.path,
|
|
|
+ size: item.size
|
|
|
+ });
|
|
|
+ });
|
|
|
+}
|
|
|
+function chooseFile(_ref) {
|
|
|
+ var accept = _ref.accept,
|
|
|
+ multiple = _ref.multiple,
|
|
|
+ capture = _ref.capture,
|
|
|
+ compressed = _ref.compressed,
|
|
|
+ maxDuration = _ref.maxDuration,
|
|
|
+ sizeType = _ref.sizeType,
|
|
|
+ camera = _ref.camera,
|
|
|
+ maxCount = _ref.maxCount;
|
|
|
+ return new Promise(function (resolve, reject) {
|
|
|
+ switch (accept) {
|
|
|
+ case 'image':
|
|
|
+ uni.chooseImage({
|
|
|
+ count: multiple ? Math.min(maxCount, 9) : 1,
|
|
|
+ sourceType: capture,
|
|
|
+ sizeType: sizeType,
|
|
|
+ success: function success(res) {
|
|
|
+ return resolve(formatImage(res));
|
|
|
+ },
|
|
|
+ fail: reject
|
|
|
+ });
|
|
|
+ break;
|
|
|
+
|
|
|
+ // 只有微信小程序才支持chooseMedia接口
|
|
|
+ case 'media':
|
|
|
+ wx.chooseMedia({
|
|
|
+ count: multiple ? Math.min(maxCount, 9) : 1,
|
|
|
+ sourceType: capture,
|
|
|
+ maxDuration: maxDuration,
|
|
|
+ sizeType: sizeType,
|
|
|
+ camera: camera,
|
|
|
+ success: function success(res) {
|
|
|
+ return resolve(formatMedia(res));
|
|
|
+ },
|
|
|
+ fail: reject
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ case 'video':
|
|
|
+ uni.chooseVideo({
|
|
|
+ sourceType: capture,
|
|
|
+ compressed: compressed,
|
|
|
+ maxDuration: maxDuration,
|
|
|
+ camera: camera,
|
|
|
+ success: function success(res) {
|
|
|
+ return resolve(formatVideo(res));
|
|
|
+ },
|
|
|
+ fail: reject
|
|
|
+ });
|
|
|
+ break;
|
|
|
+
|
|
|
+ // 只有微信小程序才支持chooseMessageFile接口
|
|
|
+ case 'file':
|
|
|
+ wx.chooseMessageFile({
|
|
|
+ count: multiple ? maxCount : 1,
|
|
|
+ type: accept,
|
|
|
+ success: function success(res) {
|
|
|
+ return resolve(formatFile(res));
|
|
|
+ },
|
|
|
+ fail: reject
|
|
|
+ });
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ // 此为保底选项,在accept不为上面任意一项的时候选取全部文件
|
|
|
+
|
|
|
+ wx.chooseMessageFile({
|
|
|
+ count: multiple ? maxCount : 1,
|
|
|
+ type: 'all',
|
|
|
+ success: function success(res) {
|
|
|
+ return resolve(formatFile(res));
|
|
|
+ },
|
|
|
+ fail: reject
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+}
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"], __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/wx.js */ 1)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 265 */
|
|
|
+/*!************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-upload/mixin.js ***!
|
|
|
+ \************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ watch: {
|
|
|
+ // 监听accept的变化,判断是否符合个平台要求
|
|
|
+ // 只有微信小程序才支持选择媒体,文件类型,所以这里做一个判断提示
|
|
|
+ accept: {
|
|
|
+ immediate: true,
|
|
|
+ handler: function handler(val) {}
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 266 */
|
|
|
+/*!************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-upload/props.js ***!
|
|
|
+ \************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // 接受的文件类型, 可选值为all media image file video
|
|
|
+ accept: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.upload.accept
|
|
|
+ },
|
|
|
+ // 图片或视频拾取模式,当accept为image类型时设置capture可选额外camera可以直接调起摄像头
|
|
|
+ capture: {
|
|
|
+ type: [String, Array],
|
|
|
+ default: uni.$u.props.upload.capture
|
|
|
+ },
|
|
|
+ // 当accept为video时生效,是否压缩视频,默认为true
|
|
|
+ compressed: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.upload.compressed
|
|
|
+ },
|
|
|
+ // 当accept为video时生效,可选值为back或front
|
|
|
+ camera: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.upload.camera
|
|
|
+ },
|
|
|
+ // 当accept为video时生效,拍摄视频最长拍摄时间,单位秒
|
|
|
+ maxDuration: {
|
|
|
+ type: Number,
|
|
|
+ default: uni.$u.props.upload.maxDuration
|
|
|
+ },
|
|
|
+ // 上传区域的图标,只能内置图标
|
|
|
+ uploadIcon: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.upload.uploadIcon
|
|
|
+ },
|
|
|
+ // 上传区域的图标的颜色,默认
|
|
|
+ uploadIconColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.upload.uploadIconColor
|
|
|
+ },
|
|
|
+ // 是否开启文件读取前事件
|
|
|
+ useBeforeRead: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.upload.useBeforeRead
|
|
|
+ },
|
|
|
+ // 读取后的处理函数
|
|
|
+ afterRead: {
|
|
|
+ type: Function,
|
|
|
+ default: null
|
|
|
+ },
|
|
|
+ // 读取前的处理函数
|
|
|
+ beforeRead: {
|
|
|
+ type: Function,
|
|
|
+ default: null
|
|
|
+ },
|
|
|
+ // 是否显示组件自带的图片预览功能
|
|
|
+ previewFullImage: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.upload.previewFullImage
|
|
|
+ },
|
|
|
+ // 最大上传数量
|
|
|
+ maxCount: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.upload.maxCount
|
|
|
+ },
|
|
|
+ // 是否启用
|
|
|
+ disabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.upload.disabled
|
|
|
+ },
|
|
|
+ // 预览上传的图片时的裁剪模式,和image组件mode属性一致
|
|
|
+ imageMode: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.upload.imageMode
|
|
|
+ },
|
|
|
+ // 标识符,可以在回调函数的第二项参数中获取
|
|
|
+ name: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.upload.name
|
|
|
+ },
|
|
|
+ // 所选的图片的尺寸, 可选值为original compressed
|
|
|
+ sizeType: {
|
|
|
+ type: Array,
|
|
|
+ default: uni.$u.props.upload.sizeType
|
|
|
+ },
|
|
|
+ // 是否开启图片多选,部分安卓机型不支持
|
|
|
+ multiple: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.upload.multiple
|
|
|
+ },
|
|
|
+ // 是否展示删除按钮
|
|
|
+ deletable: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.upload.deletable
|
|
|
+ },
|
|
|
+ // 文件大小限制,单位为byte
|
|
|
+ maxSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.upload.maxSize
|
|
|
+ },
|
|
|
+ // 显示已上传的文件列表
|
|
|
+ fileList: {
|
|
|
+ type: Array,
|
|
|
+ default: uni.$u.props.upload.fileList
|
|
|
+ },
|
|
|
+ // 上传区域的提示文字
|
|
|
+ uploadText: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.upload.uploadText
|
|
|
+ },
|
|
|
+ // 内部预览图片区域和选择图片按钮的区域宽度
|
|
|
+ width: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.upload.width
|
|
|
+ },
|
|
|
+ // 内部预览图片区域和选择图片按钮的区域高度
|
|
|
+ height: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.upload.height
|
|
|
+ },
|
|
|
+ // 是否在上传完成后展示预览图
|
|
|
+ previewImage: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.upload.previewImage
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 267 */,
|
|
|
+/* 268 */,
|
|
|
+/* 269 */,
|
|
|
+/* 270 */,
|
|
|
+/* 271 */,
|
|
|
+/* 272 */,
|
|
|
+/* 273 */,
|
|
|
+/* 274 */
|
|
|
+/*!**************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-textarea/props.js ***!
|
|
|
+ \**************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // 输入框的内容
|
|
|
+ value: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.textarea.value
|
|
|
+ },
|
|
|
+ // 输入框为空时占位符
|
|
|
+ placeholder: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.textarea.placeholder
|
|
|
+ },
|
|
|
+ // 指定placeholder的样式类,注意页面或组件的style中写了scoped时,需要在类名前写/deep/
|
|
|
+ placeholderClass: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.input.placeholderClass
|
|
|
+ },
|
|
|
+ // 指定placeholder的样式
|
|
|
+ placeholderStyle: {
|
|
|
+ type: [String, Object],
|
|
|
+ default: uni.$u.props.input.placeholderStyle
|
|
|
+ },
|
|
|
+ // 输入框高度
|
|
|
+ height: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.textarea.height
|
|
|
+ },
|
|
|
+ // 设置键盘右下角按钮的文字,仅微信小程序,App-vue和H5有效
|
|
|
+ confirmType: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.textarea.confirmType
|
|
|
+ },
|
|
|
+ // 是否禁用
|
|
|
+ disabled: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.disabled
|
|
|
+ },
|
|
|
+ // 是否显示统计字数
|
|
|
+ count: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.count
|
|
|
+ },
|
|
|
+ // 是否自动获取焦点,nvue不支持,H5取决于浏览器的实现
|
|
|
+ focus: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.focus
|
|
|
+ },
|
|
|
+ // 是否自动增加高度
|
|
|
+ autoHeight: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.autoHeight
|
|
|
+ },
|
|
|
+ // 如果textarea是在一个position:fixed的区域,需要显示指定属性fixed为true
|
|
|
+ fixed: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.fixed
|
|
|
+ },
|
|
|
+ // 指定光标与键盘的距离
|
|
|
+ cursorSpacing: {
|
|
|
+ type: Number,
|
|
|
+ default: uni.$u.props.textarea.cursorSpacing
|
|
|
+ },
|
|
|
+ // 指定focus时的光标位置
|
|
|
+ cursor: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.textarea.cursor
|
|
|
+ },
|
|
|
+ // 是否显示键盘上方带有”完成“按钮那一栏,
|
|
|
+ showConfirmBar: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.showConfirmBar
|
|
|
+ },
|
|
|
+ // 光标起始位置,自动聚焦时有效,需与selection-end搭配使用
|
|
|
+ selectionStart: {
|
|
|
+ type: Number,
|
|
|
+ default: uni.$u.props.textarea.selectionStart
|
|
|
+ },
|
|
|
+ // 光标结束位置,自动聚焦时有效,需与selection-start搭配使用
|
|
|
+ selectionEnd: {
|
|
|
+ type: Number,
|
|
|
+ default: uni.$u.props.textarea.selectionEnd
|
|
|
+ },
|
|
|
+ // 键盘弹起时,是否自动上推页面
|
|
|
+ adjustPosition: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.adjustPosition
|
|
|
+ },
|
|
|
+ // 是否去掉 iOS 下的默认内边距,只微信小程序有效
|
|
|
+ disableDefaultPadding: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.disableDefaultPadding
|
|
|
+ },
|
|
|
+ // focus时,点击页面的时候不收起键盘,只微信小程序有效
|
|
|
+ holdKeyboard: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.textarea.holdKeyboard
|
|
|
+ },
|
|
|
+ // 最大输入长度,设置为 -1 的时候不限制最大长度
|
|
|
+ maxlength: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.textarea.maxlength
|
|
|
+ },
|
|
|
+ // 边框类型,surround-四周边框,bottom-底部边框
|
|
|
+ border: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.textarea.border
|
|
|
+ },
|
|
|
+ // 用于处理或者过滤输入框内容的方法
|
|
|
+ formatter: {
|
|
|
+ type: [Function, null],
|
|
|
+ default: uni.$u.props.textarea.formatter
|
|
|
+ },
|
|
|
+ // 是否忽略组件内对文本合成系统事件的处理
|
|
|
+ ignoreCompositionEvent: {
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 275 */,
|
|
|
+/* 276 */,
|
|
|
+/* 277 */,
|
|
|
+/* 278 */,
|
|
|
+/* 279 */,
|
|
|
+/* 280 */
|
|
|
+/*!************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/libs/util/async-validator.js ***!
|
|
|
+ \************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(process) {
|
|
|
+
|
|
|
+var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ 11));
|
|
|
+var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ 13));
|
|
|
+function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
|
+function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
|
+function _extends() {
|
|
|
+ _extends = Object.assign || function (target) {
|
|
|
+ for (var i = 1; i < arguments.length; i++) {
|
|
|
+ var source = arguments[i];
|
|
|
+ for (var key in source) {
|
|
|
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
|
+ target[key] = source[key];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return target;
|
|
|
+ };
|
|
|
+ return _extends.apply(this, arguments);
|
|
|
+}
|
|
|
+
|
|
|
+/* eslint no-console:0 */
|
|
|
+var formatRegExp = /%[sdj%]/g;
|
|
|
+var warning = function warning() {}; // don't print warning message when in production env or node runtime
|
|
|
+
|
|
|
+if (typeof process !== 'undefined' && Object({"NODE_ENV":"development","VUE_APP_DARK_MODE":"false","VUE_APP_NAME":"uni_applet","VUE_APP_PLATFORM":"mp-weixin","BASE_URL":"/"}) && "development" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
|
|
|
+ warning = function warning(type, errors) {
|
|
|
+ if (typeof console !== 'undefined' && console.warn) {
|
|
|
+ if (errors.every(function (e) {
|
|
|
+ return typeof e === 'string';
|
|
|
+ })) {
|
|
|
+ console.warn(type, errors);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+}
|
|
|
+function convertFieldsError(errors) {
|
|
|
+ if (!errors || !errors.length) return null;
|
|
|
+ var fields = {};
|
|
|
+ errors.forEach(function (error) {
|
|
|
+ var field = error.field;
|
|
|
+ fields[field] = fields[field] || [];
|
|
|
+ fields[field].push(error);
|
|
|
+ });
|
|
|
+ return fields;
|
|
|
+}
|
|
|
+function format() {
|
|
|
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
|
+ args[_key] = arguments[_key];
|
|
|
+ }
|
|
|
+ var i = 1;
|
|
|
+ var f = args[0];
|
|
|
+ var len = args.length;
|
|
|
+ if (typeof f === 'function') {
|
|
|
+ return f.apply(null, args.slice(1));
|
|
|
+ }
|
|
|
+ if (typeof f === 'string') {
|
|
|
+ var str = String(f).replace(formatRegExp, function (x) {
|
|
|
+ if (x === '%%') {
|
|
|
+ return '%';
|
|
|
+ }
|
|
|
+ if (i >= len) {
|
|
|
+ return x;
|
|
|
+ }
|
|
|
+ switch (x) {
|
|
|
+ case '%s':
|
|
|
+ return String(args[i++]);
|
|
|
+ case '%d':
|
|
|
+ return Number(args[i++]);
|
|
|
+ case '%j':
|
|
|
+ try {
|
|
|
+ return JSON.stringify(args[i++]);
|
|
|
+ } catch (_) {
|
|
|
+ return '[Circular]';
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return x;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ for (var arg = args[i]; i < len; arg = args[++i]) {
|
|
|
+ str += " ".concat(arg);
|
|
|
+ }
|
|
|
+ return str;
|
|
|
+ }
|
|
|
+ return f;
|
|
|
+}
|
|
|
+function isNativeStringType(type) {
|
|
|
+ return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';
|
|
|
+}
|
|
|
+function isEmptyValue(value, type) {
|
|
|
+ if (value === undefined || value === null) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (type === 'array' && Array.isArray(value) && !value.length) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ if (isNativeStringType(type) && typeof value === 'string' && !value) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+}
|
|
|
+function asyncParallelArray(arr, func, callback) {
|
|
|
+ var results = [];
|
|
|
+ var total = 0;
|
|
|
+ var arrLength = arr.length;
|
|
|
+ function count(errors) {
|
|
|
+ results.push.apply(results, errors);
|
|
|
+ total++;
|
|
|
+ if (total === arrLength) {
|
|
|
+ callback(results);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ arr.forEach(function (a) {
|
|
|
+ func(a, count);
|
|
|
+ });
|
|
|
+}
|
|
|
+function asyncSerialArray(arr, func, callback) {
|
|
|
+ var index = 0;
|
|
|
+ var arrLength = arr.length;
|
|
|
+ function next(errors) {
|
|
|
+ if (errors && errors.length) {
|
|
|
+ callback(errors);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var original = index;
|
|
|
+ index += 1;
|
|
|
+ if (original < arrLength) {
|
|
|
+ func(arr[original], next);
|
|
|
+ } else {
|
|
|
+ callback([]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ next([]);
|
|
|
+}
|
|
|
+function flattenObjArr(objArr) {
|
|
|
+ var ret = [];
|
|
|
+ Object.keys(objArr).forEach(function (k) {
|
|
|
+ ret.push.apply(ret, objArr[k]);
|
|
|
+ });
|
|
|
+ return ret;
|
|
|
+}
|
|
|
+function asyncMap(objArr, option, func, callback) {
|
|
|
+ if (option.first) {
|
|
|
+ var _pending = new Promise(function (resolve, reject) {
|
|
|
+ var next = function next(errors) {
|
|
|
+ callback(errors);
|
|
|
+ return errors.length ? reject({
|
|
|
+ errors: errors,
|
|
|
+ fields: convertFieldsError(errors)
|
|
|
+ }) : resolve();
|
|
|
+ };
|
|
|
+ var flattenArr = flattenObjArr(objArr);
|
|
|
+ asyncSerialArray(flattenArr, func, next);
|
|
|
+ });
|
|
|
+ _pending.catch(function (e) {
|
|
|
+ return e;
|
|
|
+ });
|
|
|
+ return _pending;
|
|
|
+ }
|
|
|
+ var firstFields = option.firstFields || [];
|
|
|
+ if (firstFields === true) {
|
|
|
+ firstFields = Object.keys(objArr);
|
|
|
+ }
|
|
|
+ var objArrKeys = Object.keys(objArr);
|
|
|
+ var objArrLength = objArrKeys.length;
|
|
|
+ var total = 0;
|
|
|
+ var results = [];
|
|
|
+ var pending = new Promise(function (resolve, reject) {
|
|
|
+ var next = function next(errors) {
|
|
|
+ results.push.apply(results, errors);
|
|
|
+ total++;
|
|
|
+ if (total === objArrLength) {
|
|
|
+ callback(results);
|
|
|
+ return results.length ? reject({
|
|
|
+ errors: results,
|
|
|
+ fields: convertFieldsError(results)
|
|
|
+ }) : resolve();
|
|
|
+ }
|
|
|
+ };
|
|
|
+ if (!objArrKeys.length) {
|
|
|
+ callback(results);
|
|
|
+ resolve();
|
|
|
+ }
|
|
|
+ objArrKeys.forEach(function (key) {
|
|
|
+ var arr = objArr[key];
|
|
|
+ if (firstFields.indexOf(key) !== -1) {
|
|
|
+ asyncSerialArray(arr, func, next);
|
|
|
+ } else {
|
|
|
+ asyncParallelArray(arr, func, next);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ pending.catch(function (e) {
|
|
|
+ return e;
|
|
|
+ });
|
|
|
+ return pending;
|
|
|
+}
|
|
|
+function complementError(rule) {
|
|
|
+ return function (oe) {
|
|
|
+ if (oe && oe.message) {
|
|
|
+ oe.field = oe.field || rule.fullField;
|
|
|
+ return oe;
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ message: typeof oe === 'function' ? oe() : oe,
|
|
|
+ field: oe.field || rule.fullField
|
|
|
+ };
|
|
|
+ };
|
|
|
+}
|
|
|
+function deepMerge(target, source) {
|
|
|
+ if (source) {
|
|
|
+ for (var s in source) {
|
|
|
+ if (source.hasOwnProperty(s)) {
|
|
|
+ var value = source[s];
|
|
|
+ if ((0, _typeof2.default)(value) === 'object' && (0, _typeof2.default)(target[s]) === 'object') {
|
|
|
+ target[s] = _objectSpread(_objectSpread({}, target[s]), value);
|
|
|
+ } else {
|
|
|
+ target[s] = value;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return target;
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Rule for validating required fields.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param errors An array of errors that this rule may add
|
|
|
+ * validation errors to.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function required(rule, value, source, errors, options, type) {
|
|
|
+ if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
|
|
|
+ errors.push(format(options.messages.required, rule.fullField));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Rule for validating whitespace.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param errors An array of errors that this rule may add
|
|
|
+ * validation errors to.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function whitespace(rule, value, source, errors, options) {
|
|
|
+ if (/^\s+$/.test(value) || value === '') {
|
|
|
+ errors.push(format(options.messages.whitespace, rule.fullField));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* eslint max-len:0 */
|
|
|
+
|
|
|
+var pattern = {
|
|
|
+ // http://emailregex.com/
|
|
|
+ email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
|
|
+ url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
|
|
|
+ hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
|
|
|
+};
|
|
|
+var types = {
|
|
|
+ integer: function integer(value) {
|
|
|
+ return /^(-)?\d+$/.test(value);
|
|
|
+ },
|
|
|
+ float: function float(value) {
|
|
|
+ return /^(-)?\d+(\.\d+)?$/.test(value);
|
|
|
+ },
|
|
|
+ array: function array(value) {
|
|
|
+ return Array.isArray(value);
|
|
|
+ },
|
|
|
+ regexp: function regexp(value) {
|
|
|
+ if (value instanceof RegExp) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ return !!new RegExp(value);
|
|
|
+ } catch (e) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ date: function date(value) {
|
|
|
+ return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';
|
|
|
+ },
|
|
|
+ number: function number(value) {
|
|
|
+ if (isNaN(value)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ // 修改源码,将字符串数值先转为数值
|
|
|
+ return typeof +value === 'number';
|
|
|
+ },
|
|
|
+ object: function object(value) {
|
|
|
+ return (0, _typeof2.default)(value) === 'object' && !types.array(value);
|
|
|
+ },
|
|
|
+ method: function method(value) {
|
|
|
+ return typeof value === 'function';
|
|
|
+ },
|
|
|
+ email: function email(value) {
|
|
|
+ return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
|
|
|
+ },
|
|
|
+ url: function url(value) {
|
|
|
+ return typeof value === 'string' && !!value.match(pattern.url);
|
|
|
+ },
|
|
|
+ hex: function hex(value) {
|
|
|
+ return typeof value === 'string' && !!value.match(pattern.hex);
|
|
|
+ }
|
|
|
+};
|
|
|
+/**
|
|
|
+ * Rule for validating the type of a value.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param errors An array of errors that this rule may add
|
|
|
+ * validation errors to.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function type(rule, value, source, errors, options) {
|
|
|
+ if (rule.required && value === undefined) {
|
|
|
+ required(rule, value, source, errors, options);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
|
|
|
+ var ruleType = rule.type;
|
|
|
+ if (custom.indexOf(ruleType) > -1) {
|
|
|
+ if (!types[ruleType](value)) {
|
|
|
+ errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
|
|
|
+ } // straight typeof check
|
|
|
+ } else if (ruleType && (0, _typeof2.default)(value) !== rule.type) {
|
|
|
+ errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Rule for validating minimum and maximum allowed values.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param errors An array of errors that this rule may add
|
|
|
+ * validation errors to.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function range(rule, value, source, errors, options) {
|
|
|
+ var len = typeof rule.len === 'number';
|
|
|
+ var min = typeof rule.min === 'number';
|
|
|
+ var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
|
|
|
+
|
|
|
+ var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
|
|
|
+ var val = value;
|
|
|
+ var key = null;
|
|
|
+ var num = typeof value === 'number';
|
|
|
+ var str = typeof value === 'string';
|
|
|
+ var arr = Array.isArray(value);
|
|
|
+ if (num) {
|
|
|
+ key = 'number';
|
|
|
+ } else if (str) {
|
|
|
+ key = 'string';
|
|
|
+ } else if (arr) {
|
|
|
+ key = 'array';
|
|
|
+ } // if the value is not of a supported type for range validation
|
|
|
+ // the validation rule rule should use the
|
|
|
+ // type property to also test for a particular type
|
|
|
+
|
|
|
+ if (!key) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ if (arr) {
|
|
|
+ val = value.length;
|
|
|
+ }
|
|
|
+ if (str) {
|
|
|
+ // 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
|
|
|
+ val = value.replace(spRegexp, '_').length;
|
|
|
+ }
|
|
|
+ if (len) {
|
|
|
+ if (val !== rule.len) {
|
|
|
+ errors.push(format(options.messages[key].len, rule.fullField, rule.len));
|
|
|
+ }
|
|
|
+ } else if (min && !max && val < rule.min) {
|
|
|
+ errors.push(format(options.messages[key].min, rule.fullField, rule.min));
|
|
|
+ } else if (max && !min && val > rule.max) {
|
|
|
+ errors.push(format(options.messages[key].max, rule.fullField, rule.max));
|
|
|
+ } else if (min && max && (val < rule.min || val > rule.max)) {
|
|
|
+ errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
|
|
|
+ }
|
|
|
+}
|
|
|
+var ENUM = 'enum';
|
|
|
+/**
|
|
|
+ * Rule for validating a value exists in an enumerable list.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param errors An array of errors that this rule may add
|
|
|
+ * validation errors to.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function enumerable(rule, value, source, errors, options) {
|
|
|
+ rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
|
|
|
+ if (rule[ENUM].indexOf(value) === -1) {
|
|
|
+ errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Rule for validating a regular expression pattern.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param errors An array of errors that this rule may add
|
|
|
+ * validation errors to.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function pattern$1(rule, value, source, errors, options) {
|
|
|
+ if (rule.pattern) {
|
|
|
+ if (rule.pattern instanceof RegExp) {
|
|
|
+ // if a RegExp instance is passed, reset `lastIndex` in case its `global`
|
|
|
+ // flag is accidentally set to `true`, which in a validation scenario
|
|
|
+ // is not necessary and the result might be misleading
|
|
|
+ rule.pattern.lastIndex = 0;
|
|
|
+ if (!rule.pattern.test(value)) {
|
|
|
+ errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
|
|
|
+ }
|
|
|
+ } else if (typeof rule.pattern === 'string') {
|
|
|
+ var _pattern = new RegExp(rule.pattern);
|
|
|
+ if (!_pattern.test(value)) {
|
|
|
+ errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+var rules = {
|
|
|
+ required: required,
|
|
|
+ whitespace: whitespace,
|
|
|
+ type: type,
|
|
|
+ range: range,
|
|
|
+ enum: enumerable,
|
|
|
+ pattern: pattern$1
|
|
|
+};
|
|
|
+
|
|
|
+/**
|
|
|
+ * Performs validation for string types.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function string(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value, 'string') && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options, 'string');
|
|
|
+ if (!isEmptyValue(value, 'string')) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ rules.range(rule, value, source, errors, options);
|
|
|
+ rules.pattern(rule, value, source, errors, options);
|
|
|
+ if (rule.whitespace === true) {
|
|
|
+ rules.whitespace(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates a function.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function method(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (value !== undefined) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates a number.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function number(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (value === '') {
|
|
|
+ value = undefined;
|
|
|
+ }
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (value !== undefined) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ rules.range(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates a boolean.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function _boolean(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (value !== undefined) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates the regular expression type.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function regexp(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (!isEmptyValue(value)) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates a number is an integer.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function integer(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (value !== undefined) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ rules.range(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates a number is a floating point number.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function floatFn(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (value !== undefined) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ rules.range(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates an array.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function array(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value, 'array') && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options, 'array');
|
|
|
+ if (!isEmptyValue(value, 'array')) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ rules.range(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates an object.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function object(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (value !== undefined) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+var ENUM$1 = 'enum';
|
|
|
+/**
|
|
|
+ * Validates an enumerable list.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function enumerable$1(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (value !== undefined) {
|
|
|
+ rules[ENUM$1](rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Validates a regular expression pattern.
|
|
|
+ *
|
|
|
+ * Performs validation when a rule only contains
|
|
|
+ * a pattern property but is not declared as a string type.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function pattern$2(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value, 'string') && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (!isEmptyValue(value, 'string')) {
|
|
|
+ rules.pattern(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+function date(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ if (!isEmptyValue(value)) {
|
|
|
+ var dateObject;
|
|
|
+ if (typeof value === 'number') {
|
|
|
+ dateObject = new Date(value);
|
|
|
+ } else {
|
|
|
+ dateObject = value;
|
|
|
+ }
|
|
|
+ rules.type(rule, dateObject, source, errors, options);
|
|
|
+ if (dateObject) {
|
|
|
+ rules.range(rule, dateObject.getTime(), source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+function required$1(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var type = Array.isArray(value) ? 'array' : (0, _typeof2.default)(value);
|
|
|
+ rules.required(rule, value, source, errors, options, type);
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+function type$1(rule, value, callback, source, options) {
|
|
|
+ var ruleType = rule.type;
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value, ruleType) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options, ruleType);
|
|
|
+ if (!isEmptyValue(value, ruleType)) {
|
|
|
+ rules.type(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+
|
|
|
+/**
|
|
|
+ * Performs validation for any type.
|
|
|
+ *
|
|
|
+ * @param rule The validation rule.
|
|
|
+ * @param value The value of the field on the source object.
|
|
|
+ * @param callback The callback function.
|
|
|
+ * @param source The source object being validated.
|
|
|
+ * @param options The validation options.
|
|
|
+ * @param options.messages The validation messages.
|
|
|
+ */
|
|
|
+
|
|
|
+function any(rule, value, callback, source, options) {
|
|
|
+ var errors = [];
|
|
|
+ var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
|
|
|
+ if (validate) {
|
|
|
+ if (isEmptyValue(value) && !rule.required) {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ rules.required(rule, value, source, errors, options);
|
|
|
+ }
|
|
|
+ callback(errors);
|
|
|
+}
|
|
|
+var validators = {
|
|
|
+ string: string,
|
|
|
+ method: method,
|
|
|
+ number: number,
|
|
|
+ boolean: _boolean,
|
|
|
+ regexp: regexp,
|
|
|
+ integer: integer,
|
|
|
+ float: floatFn,
|
|
|
+ array: array,
|
|
|
+ object: object,
|
|
|
+ enum: enumerable$1,
|
|
|
+ pattern: pattern$2,
|
|
|
+ date: date,
|
|
|
+ url: type$1,
|
|
|
+ hex: type$1,
|
|
|
+ email: type$1,
|
|
|
+ required: required$1,
|
|
|
+ any: any
|
|
|
+};
|
|
|
+function newMessages() {
|
|
|
+ return {
|
|
|
+ default: 'Validation error on field %s',
|
|
|
+ required: '%s is required',
|
|
|
+ enum: '%s must be one of %s',
|
|
|
+ whitespace: '%s cannot be empty',
|
|
|
+ date: {
|
|
|
+ format: '%s date %s is invalid for format %s',
|
|
|
+ parse: '%s date could not be parsed, %s is invalid ',
|
|
|
+ invalid: '%s date %s is invalid'
|
|
|
+ },
|
|
|
+ types: {
|
|
|
+ string: '%s is not a %s',
|
|
|
+ method: '%s is not a %s (function)',
|
|
|
+ array: '%s is not an %s',
|
|
|
+ object: '%s is not an %s',
|
|
|
+ number: '%s is not a %s',
|
|
|
+ date: '%s is not a %s',
|
|
|
+ boolean: '%s is not a %s',
|
|
|
+ integer: '%s is not an %s',
|
|
|
+ float: '%s is not a %s',
|
|
|
+ regexp: '%s is not a valid %s',
|
|
|
+ email: '%s is not a valid %s',
|
|
|
+ url: '%s is not a valid %s',
|
|
|
+ hex: '%s is not a valid %s'
|
|
|
+ },
|
|
|
+ string: {
|
|
|
+ len: '%s must be exactly %s characters',
|
|
|
+ min: '%s must be at least %s characters',
|
|
|
+ max: '%s cannot be longer than %s characters',
|
|
|
+ range: '%s must be between %s and %s characters'
|
|
|
+ },
|
|
|
+ number: {
|
|
|
+ len: '%s must equal %s',
|
|
|
+ min: '%s cannot be less than %s',
|
|
|
+ max: '%s cannot be greater than %s',
|
|
|
+ range: '%s must be between %s and %s'
|
|
|
+ },
|
|
|
+ array: {
|
|
|
+ len: '%s must be exactly %s in length',
|
|
|
+ min: '%s cannot be less than %s in length',
|
|
|
+ max: '%s cannot be greater than %s in length',
|
|
|
+ range: '%s must be between %s and %s in length'
|
|
|
+ },
|
|
|
+ pattern: {
|
|
|
+ mismatch: '%s value %s does not match pattern %s'
|
|
|
+ },
|
|
|
+ clone: function clone() {
|
|
|
+ var cloned = JSON.parse(JSON.stringify(this));
|
|
|
+ cloned.clone = this.clone;
|
|
|
+ return cloned;
|
|
|
+ }
|
|
|
+ };
|
|
|
+}
|
|
|
+var messages = newMessages();
|
|
|
+
|
|
|
+/**
|
|
|
+ * Encapsulates a validation schema.
|
|
|
+ *
|
|
|
+ * @param descriptor An object declaring validation rules
|
|
|
+ * for this schema.
|
|
|
+ */
|
|
|
+
|
|
|
+function Schema(descriptor) {
|
|
|
+ this.rules = null;
|
|
|
+ this._messages = messages;
|
|
|
+ this.define(descriptor);
|
|
|
+}
|
|
|
+Schema.prototype = {
|
|
|
+ messages: function messages(_messages) {
|
|
|
+ if (_messages) {
|
|
|
+ this._messages = deepMerge(newMessages(), _messages);
|
|
|
+ }
|
|
|
+ return this._messages;
|
|
|
+ },
|
|
|
+ define: function define(rules) {
|
|
|
+ if (!rules) {
|
|
|
+ throw new Error('Cannot configure a schema with no rules');
|
|
|
+ }
|
|
|
+ if ((0, _typeof2.default)(rules) !== 'object' || Array.isArray(rules)) {
|
|
|
+ throw new Error('Rules must be an object');
|
|
|
+ }
|
|
|
+ this.rules = {};
|
|
|
+ var z;
|
|
|
+ var item;
|
|
|
+ for (z in rules) {
|
|
|
+ if (rules.hasOwnProperty(z)) {
|
|
|
+ item = rules[z];
|
|
|
+ this.rules[z] = Array.isArray(item) ? item : [item];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ validate: function validate(source_, o, oc) {
|
|
|
+ var _this = this;
|
|
|
+ if (o === void 0) {
|
|
|
+ o = {};
|
|
|
+ }
|
|
|
+ if (oc === void 0) {
|
|
|
+ oc = function oc() {};
|
|
|
+ }
|
|
|
+ var source = source_;
|
|
|
+ var options = o;
|
|
|
+ var callback = oc;
|
|
|
+ if (typeof options === 'function') {
|
|
|
+ callback = options;
|
|
|
+ options = {};
|
|
|
+ }
|
|
|
+ if (!this.rules || Object.keys(this.rules).length === 0) {
|
|
|
+ if (callback) {
|
|
|
+ callback();
|
|
|
+ }
|
|
|
+ return Promise.resolve();
|
|
|
+ }
|
|
|
+ function complete(results) {
|
|
|
+ var i;
|
|
|
+ var errors = [];
|
|
|
+ var fields = {};
|
|
|
+ function add(e) {
|
|
|
+ if (Array.isArray(e)) {
|
|
|
+ var _errors;
|
|
|
+ errors = (_errors = errors).concat.apply(_errors, e);
|
|
|
+ } else {
|
|
|
+ errors.push(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (i = 0; i < results.length; i++) {
|
|
|
+ add(results[i]);
|
|
|
+ }
|
|
|
+ if (!errors.length) {
|
|
|
+ errors = null;
|
|
|
+ fields = null;
|
|
|
+ } else {
|
|
|
+ fields = convertFieldsError(errors);
|
|
|
+ }
|
|
|
+ callback(errors, fields);
|
|
|
+ }
|
|
|
+ if (options.messages) {
|
|
|
+ var messages$1 = this.messages();
|
|
|
+ if (messages$1 === messages) {
|
|
|
+ messages$1 = newMessages();
|
|
|
+ }
|
|
|
+ deepMerge(messages$1, options.messages);
|
|
|
+ options.messages = messages$1;
|
|
|
+ } else {
|
|
|
+ options.messages = this.messages();
|
|
|
+ }
|
|
|
+ var arr;
|
|
|
+ var value;
|
|
|
+ var series = {};
|
|
|
+ var keys = options.keys || Object.keys(this.rules);
|
|
|
+ keys.forEach(function (z) {
|
|
|
+ arr = _this.rules[z];
|
|
|
+ value = source[z];
|
|
|
+ arr.forEach(function (r) {
|
|
|
+ var rule = r;
|
|
|
+ if (typeof rule.transform === 'function') {
|
|
|
+ if (source === source_) {
|
|
|
+ source = _objectSpread({}, source);
|
|
|
+ }
|
|
|
+ value = source[z] = rule.transform(value);
|
|
|
+ }
|
|
|
+ if (typeof rule === 'function') {
|
|
|
+ rule = {
|
|
|
+ validator: rule
|
|
|
+ };
|
|
|
+ } else {
|
|
|
+ rule = _objectSpread({}, rule);
|
|
|
+ }
|
|
|
+ rule.validator = _this.getValidationMethod(rule);
|
|
|
+ rule.field = z;
|
|
|
+ rule.fullField = rule.fullField || z;
|
|
|
+ rule.type = _this.getType(rule);
|
|
|
+ if (!rule.validator) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ series[z] = series[z] || [];
|
|
|
+ series[z].push({
|
|
|
+ rule: rule,
|
|
|
+ value: value,
|
|
|
+ source: source,
|
|
|
+ field: z
|
|
|
+ });
|
|
|
+ });
|
|
|
+ });
|
|
|
+ var errorFields = {};
|
|
|
+ return asyncMap(series, options, function (data, doIt) {
|
|
|
+ var rule = data.rule;
|
|
|
+ var deep = (rule.type === 'object' || rule.type === 'array') && ((0, _typeof2.default)(rule.fields) === 'object' || (0, _typeof2.default)(rule.defaultField) === 'object');
|
|
|
+ deep = deep && (rule.required || !rule.required && data.value);
|
|
|
+ rule.field = data.field;
|
|
|
+ function addFullfield(key, schema) {
|
|
|
+ return _objectSpread(_objectSpread({}, schema), {}, {
|
|
|
+ fullField: "".concat(rule.fullField, ".").concat(key)
|
|
|
+ });
|
|
|
+ }
|
|
|
+ function cb(e) {
|
|
|
+ if (e === void 0) {
|
|
|
+ e = [];
|
|
|
+ }
|
|
|
+ var errors = e;
|
|
|
+ if (!Array.isArray(errors)) {
|
|
|
+ errors = [errors];
|
|
|
+ }
|
|
|
+ if (!options.suppressWarning && errors.length) {
|
|
|
+ Schema.warning('async-validator:', errors);
|
|
|
+ }
|
|
|
+ if (errors.length && rule.message) {
|
|
|
+ errors = [].concat(rule.message);
|
|
|
+ }
|
|
|
+ errors = errors.map(complementError(rule));
|
|
|
+ if (options.first && errors.length) {
|
|
|
+ errorFields[rule.field] = 1;
|
|
|
+ return doIt(errors);
|
|
|
+ }
|
|
|
+ if (!deep) {
|
|
|
+ doIt(errors);
|
|
|
+ } else {
|
|
|
+ // if rule is required but the target object
|
|
|
+ // does not exist fail at the rule level and don't
|
|
|
+ // go deeper
|
|
|
+ if (rule.required && !data.value) {
|
|
|
+ if (rule.message) {
|
|
|
+ errors = [].concat(rule.message).map(complementError(rule));
|
|
|
+ } else if (options.error) {
|
|
|
+ errors = [options.error(rule, format(options.messages.required, rule.field))];
|
|
|
+ } else {
|
|
|
+ errors = [];
|
|
|
+ }
|
|
|
+ return doIt(errors);
|
|
|
+ }
|
|
|
+ var fieldsSchema = {};
|
|
|
+ if (rule.defaultField) {
|
|
|
+ for (var k in data.value) {
|
|
|
+ if (data.value.hasOwnProperty(k)) {
|
|
|
+ fieldsSchema[k] = rule.defaultField;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ fieldsSchema = _objectSpread(_objectSpread({}, fieldsSchema), data.rule.fields);
|
|
|
+ for (var f in fieldsSchema) {
|
|
|
+ if (fieldsSchema.hasOwnProperty(f)) {
|
|
|
+ var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
|
|
|
+ fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var schema = new Schema(fieldsSchema);
|
|
|
+ schema.messages(options.messages);
|
|
|
+ if (data.rule.options) {
|
|
|
+ data.rule.options.messages = options.messages;
|
|
|
+ data.rule.options.error = options.error;
|
|
|
+ }
|
|
|
+ schema.validate(data.value, data.rule.options || options, function (errs) {
|
|
|
+ var finalErrors = [];
|
|
|
+ if (errors && errors.length) {
|
|
|
+ finalErrors.push.apply(finalErrors, errors);
|
|
|
+ }
|
|
|
+ if (errs && errs.length) {
|
|
|
+ finalErrors.push.apply(finalErrors, errs);
|
|
|
+ }
|
|
|
+ doIt(finalErrors.length ? finalErrors : null);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ var res;
|
|
|
+ if (rule.asyncValidator) {
|
|
|
+ res = rule.asyncValidator(rule, data.value, cb, data.source, options);
|
|
|
+ } else if (rule.validator) {
|
|
|
+ res = rule.validator(rule, data.value, cb, data.source, options);
|
|
|
+ if (res === true) {
|
|
|
+ cb();
|
|
|
+ } else if (res === false) {
|
|
|
+ cb(rule.message || "".concat(rule.field, " fails"));
|
|
|
+ } else if (res instanceof Array) {
|
|
|
+ cb(res);
|
|
|
+ } else if (res instanceof Error) {
|
|
|
+ cb(res.message);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (res && res.then) {
|
|
|
+ res.then(function () {
|
|
|
+ return cb();
|
|
|
+ }, function (e) {
|
|
|
+ return cb(e);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }, function (results) {
|
|
|
+ complete(results);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getType: function getType(rule) {
|
|
|
+ if (rule.type === undefined && rule.pattern instanceof RegExp) {
|
|
|
+ rule.type = 'pattern';
|
|
|
+ }
|
|
|
+ if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
|
|
|
+ throw new Error(format('Unknown rule type %s', rule.type));
|
|
|
+ }
|
|
|
+ return rule.type || 'string';
|
|
|
+ },
|
|
|
+ getValidationMethod: function getValidationMethod(rule) {
|
|
|
+ if (typeof rule.validator === 'function') {
|
|
|
+ return rule.validator;
|
|
|
+ }
|
|
|
+ var keys = Object.keys(rule);
|
|
|
+ var messageIndex = keys.indexOf('message');
|
|
|
+ if (messageIndex !== -1) {
|
|
|
+ keys.splice(messageIndex, 1);
|
|
|
+ }
|
|
|
+ if (keys.length === 1 && keys[0] === 'required') {
|
|
|
+ return validators.required;
|
|
|
+ }
|
|
|
+ return validators[this.getType(rule)] || false;
|
|
|
+ }
|
|
|
+};
|
|
|
+Schema.register = function register(type, validator) {
|
|
|
+ if (typeof validator !== 'function') {
|
|
|
+ throw new Error('Cannot register a validator by type, validator is not a function');
|
|
|
+ }
|
|
|
+ validators[type] = validator;
|
|
|
+};
|
|
|
+Schema.warning = warning;
|
|
|
+Schema.messages = messages;
|
|
|
+var _default = Schema; // # sourceMappingURL=index.js.map
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../../HBuilderX.3.4.18.20220630/HBuilderX/plugins/uniapp-cli/node_modules/node-libs-browser/mock/process.js */ 48)))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 281 */,
|
|
|
+/* 282 */,
|
|
|
+/* 283 */,
|
|
|
+/* 284 */,
|
|
|
+/* 285 */,
|
|
|
+/* 286 */
|
|
|
+/*!**********************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-icon/icons.js ***!
|
|
|
+ \**********************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ 'uicon-level': "\uE693",
|
|
|
+ 'uicon-column-line': "\uE68E",
|
|
|
+ 'uicon-checkbox-mark': "\uE807",
|
|
|
+ 'uicon-folder': "\uE7F5",
|
|
|
+ 'uicon-movie': "\uE7F6",
|
|
|
+ 'uicon-star-fill': "\uE669",
|
|
|
+ 'uicon-star': "\uE65F",
|
|
|
+ 'uicon-phone-fill': "\uE64F",
|
|
|
+ 'uicon-phone': "\uE622",
|
|
|
+ 'uicon-apple-fill': "\uE881",
|
|
|
+ 'uicon-chrome-circle-fill': "\uE885",
|
|
|
+ 'uicon-backspace': "\uE67B",
|
|
|
+ 'uicon-attach': "\uE632",
|
|
|
+ 'uicon-cut': "\uE948",
|
|
|
+ 'uicon-empty-car': "\uE602",
|
|
|
+ 'uicon-empty-coupon': "\uE682",
|
|
|
+ 'uicon-empty-address': "\uE646",
|
|
|
+ 'uicon-empty-favor': "\uE67C",
|
|
|
+ 'uicon-empty-permission': "\uE686",
|
|
|
+ 'uicon-empty-news': "\uE687",
|
|
|
+ 'uicon-empty-search': "\uE664",
|
|
|
+ 'uicon-github-circle-fill': "\uE887",
|
|
|
+ 'uicon-rmb': "\uE608",
|
|
|
+ 'uicon-person-delete-fill': "\uE66A",
|
|
|
+ 'uicon-reload': "\uE788",
|
|
|
+ 'uicon-order': "\uE68F",
|
|
|
+ 'uicon-server-man': "\uE6BC",
|
|
|
+ 'uicon-search': "\uE62A",
|
|
|
+ 'uicon-fingerprint': "\uE955",
|
|
|
+ 'uicon-more-dot-fill': "\uE630",
|
|
|
+ 'uicon-scan': "\uE662",
|
|
|
+ 'uicon-share-square': "\uE60B",
|
|
|
+ 'uicon-map': "\uE61D",
|
|
|
+ 'uicon-map-fill': "\uE64E",
|
|
|
+ 'uicon-tags': "\uE629",
|
|
|
+ 'uicon-tags-fill': "\uE651",
|
|
|
+ 'uicon-bookmark-fill': "\uE63B",
|
|
|
+ 'uicon-bookmark': "\uE60A",
|
|
|
+ 'uicon-eye': "\uE613",
|
|
|
+ 'uicon-eye-fill': "\uE641",
|
|
|
+ 'uicon-mic': "\uE64A",
|
|
|
+ 'uicon-mic-off': "\uE649",
|
|
|
+ 'uicon-calendar': "\uE66E",
|
|
|
+ 'uicon-calendar-fill': "\uE634",
|
|
|
+ 'uicon-trash': "\uE623",
|
|
|
+ 'uicon-trash-fill': "\uE658",
|
|
|
+ 'uicon-play-left': "\uE66D",
|
|
|
+ 'uicon-play-right': "\uE610",
|
|
|
+ 'uicon-minus': "\uE618",
|
|
|
+ 'uicon-plus': "\uE62D",
|
|
|
+ 'uicon-info': "\uE653",
|
|
|
+ 'uicon-info-circle': "\uE7D2",
|
|
|
+ 'uicon-info-circle-fill': "\uE64B",
|
|
|
+ 'uicon-question': "\uE715",
|
|
|
+ 'uicon-error': "\uE6D3",
|
|
|
+ 'uicon-close': "\uE685",
|
|
|
+ 'uicon-checkmark': "\uE6A8",
|
|
|
+ 'uicon-android-circle-fill': "\uE67E",
|
|
|
+ 'uicon-android-fill': "\uE67D",
|
|
|
+ 'uicon-ie': "\uE87B",
|
|
|
+ 'uicon-IE-circle-fill': "\uE889",
|
|
|
+ 'uicon-google': "\uE87A",
|
|
|
+ 'uicon-google-circle-fill': "\uE88A",
|
|
|
+ 'uicon-setting-fill': "\uE872",
|
|
|
+ 'uicon-setting': "\uE61F",
|
|
|
+ 'uicon-minus-square-fill': "\uE855",
|
|
|
+ 'uicon-plus-square-fill': "\uE856",
|
|
|
+ 'uicon-heart': "\uE7DF",
|
|
|
+ 'uicon-heart-fill': "\uE851",
|
|
|
+ 'uicon-camera': "\uE7D7",
|
|
|
+ 'uicon-camera-fill': "\uE870",
|
|
|
+ 'uicon-more-circle': "\uE63E",
|
|
|
+ 'uicon-more-circle-fill': "\uE645",
|
|
|
+ 'uicon-chat': "\uE620",
|
|
|
+ 'uicon-chat-fill': "\uE61E",
|
|
|
+ 'uicon-bag-fill': "\uE617",
|
|
|
+ 'uicon-bag': "\uE619",
|
|
|
+ 'uicon-error-circle-fill': "\uE62C",
|
|
|
+ 'uicon-error-circle': "\uE624",
|
|
|
+ 'uicon-close-circle': "\uE63F",
|
|
|
+ 'uicon-close-circle-fill': "\uE637",
|
|
|
+ 'uicon-checkmark-circle': "\uE63D",
|
|
|
+ 'uicon-checkmark-circle-fill': "\uE635",
|
|
|
+ 'uicon-question-circle-fill': "\uE666",
|
|
|
+ 'uicon-question-circle': "\uE625",
|
|
|
+ 'uicon-share': "\uE631",
|
|
|
+ 'uicon-share-fill': "\uE65E",
|
|
|
+ 'uicon-shopping-cart': "\uE621",
|
|
|
+ 'uicon-shopping-cart-fill': "\uE65D",
|
|
|
+ 'uicon-bell': "\uE609",
|
|
|
+ 'uicon-bell-fill': "\uE640",
|
|
|
+ 'uicon-list': "\uE650",
|
|
|
+ 'uicon-list-dot': "\uE616",
|
|
|
+ 'uicon-zhihu': "\uE6BA",
|
|
|
+ 'uicon-zhihu-circle-fill': "\uE709",
|
|
|
+ 'uicon-zhifubao': "\uE6B9",
|
|
|
+ 'uicon-zhifubao-circle-fill': "\uE6B8",
|
|
|
+ 'uicon-weixin-circle-fill': "\uE6B1",
|
|
|
+ 'uicon-weixin-fill': "\uE6B2",
|
|
|
+ 'uicon-twitter-circle-fill': "\uE6AB",
|
|
|
+ 'uicon-twitter': "\uE6AA",
|
|
|
+ 'uicon-taobao-circle-fill': "\uE6A7",
|
|
|
+ 'uicon-taobao': "\uE6A6",
|
|
|
+ 'uicon-weibo-circle-fill': "\uE6A5",
|
|
|
+ 'uicon-weibo': "\uE6A4",
|
|
|
+ 'uicon-qq-fill': "\uE6A1",
|
|
|
+ 'uicon-qq-circle-fill': "\uE6A0",
|
|
|
+ 'uicon-moments-circel-fill': "\uE69A",
|
|
|
+ 'uicon-moments': "\uE69B",
|
|
|
+ 'uicon-qzone': "\uE695",
|
|
|
+ 'uicon-qzone-circle-fill': "\uE696",
|
|
|
+ 'uicon-baidu-circle-fill': "\uE680",
|
|
|
+ 'uicon-baidu': "\uE681",
|
|
|
+ 'uicon-facebook-circle-fill': "\uE68A",
|
|
|
+ 'uicon-facebook': "\uE689",
|
|
|
+ 'uicon-car': "\uE60C",
|
|
|
+ 'uicon-car-fill': "\uE636",
|
|
|
+ 'uicon-warning-fill': "\uE64D",
|
|
|
+ 'uicon-warning': "\uE694",
|
|
|
+ 'uicon-clock-fill': "\uE638",
|
|
|
+ 'uicon-clock': "\uE60F",
|
|
|
+ 'uicon-edit-pen': "\uE612",
|
|
|
+ 'uicon-edit-pen-fill': "\uE66B",
|
|
|
+ 'uicon-email': "\uE611",
|
|
|
+ 'uicon-email-fill': "\uE642",
|
|
|
+ 'uicon-minus-circle': "\uE61B",
|
|
|
+ 'uicon-minus-circle-fill': "\uE652",
|
|
|
+ 'uicon-plus-circle': "\uE62E",
|
|
|
+ 'uicon-plus-circle-fill': "\uE661",
|
|
|
+ 'uicon-file-text': "\uE663",
|
|
|
+ 'uicon-file-text-fill': "\uE665",
|
|
|
+ 'uicon-pushpin': "\uE7E3",
|
|
|
+ 'uicon-pushpin-fill': "\uE86E",
|
|
|
+ 'uicon-grid': "\uE673",
|
|
|
+ 'uicon-grid-fill': "\uE678",
|
|
|
+ 'uicon-play-circle': "\uE647",
|
|
|
+ 'uicon-play-circle-fill': "\uE655",
|
|
|
+ 'uicon-pause-circle-fill': "\uE654",
|
|
|
+ 'uicon-pause': "\uE8FA",
|
|
|
+ 'uicon-pause-circle': "\uE643",
|
|
|
+ 'uicon-eye-off': "\uE648",
|
|
|
+ 'uicon-eye-off-outline': "\uE62B",
|
|
|
+ 'uicon-gift-fill': "\uE65C",
|
|
|
+ 'uicon-gift': "\uE65B",
|
|
|
+ 'uicon-rmb-circle-fill': "\uE657",
|
|
|
+ 'uicon-rmb-circle': "\uE677",
|
|
|
+ 'uicon-kefu-ermai': "\uE656",
|
|
|
+ 'uicon-server-fill': "\uE751",
|
|
|
+ 'uicon-coupon-fill': "\uE8C4",
|
|
|
+ 'uicon-coupon': "\uE8AE",
|
|
|
+ 'uicon-integral': "\uE704",
|
|
|
+ 'uicon-integral-fill': "\uE703",
|
|
|
+ 'uicon-home-fill': "\uE964",
|
|
|
+ 'uicon-home': "\uE965",
|
|
|
+ 'uicon-hourglass-half-fill': "\uE966",
|
|
|
+ 'uicon-hourglass': "\uE967",
|
|
|
+ 'uicon-account': "\uE628",
|
|
|
+ 'uicon-plus-people-fill': "\uE626",
|
|
|
+ 'uicon-minus-people-fill': "\uE615",
|
|
|
+ 'uicon-account-fill': "\uE614",
|
|
|
+ 'uicon-thumb-down-fill': "\uE726",
|
|
|
+ 'uicon-thumb-down': "\uE727",
|
|
|
+ 'uicon-thumb-up': "\uE733",
|
|
|
+ 'uicon-thumb-up-fill': "\uE72F",
|
|
|
+ 'uicon-lock-fill': "\uE979",
|
|
|
+ 'uicon-lock-open': "\uE973",
|
|
|
+ 'uicon-lock-opened-fill': "\uE974",
|
|
|
+ 'uicon-lock': "\uE97A",
|
|
|
+ 'uicon-red-packet-fill': "\uE690",
|
|
|
+ 'uicon-photo-fill': "\uE98B",
|
|
|
+ 'uicon-photo': "\uE98D",
|
|
|
+ 'uicon-volume-off-fill': "\uE659",
|
|
|
+ 'uicon-volume-off': "\uE644",
|
|
|
+ 'uicon-volume-fill': "\uE670",
|
|
|
+ 'uicon-volume': "\uE633",
|
|
|
+ 'uicon-red-packet': "\uE691",
|
|
|
+ 'uicon-download': "\uE63C",
|
|
|
+ 'uicon-arrow-up-fill': "\uE6B0",
|
|
|
+ 'uicon-arrow-down-fill': "\uE600",
|
|
|
+ 'uicon-play-left-fill': "\uE675",
|
|
|
+ 'uicon-play-right-fill': "\uE676",
|
|
|
+ 'uicon-rewind-left-fill': "\uE679",
|
|
|
+ 'uicon-rewind-right-fill': "\uE67A",
|
|
|
+ 'uicon-arrow-downward': "\uE604",
|
|
|
+ 'uicon-arrow-leftward': "\uE601",
|
|
|
+ 'uicon-arrow-rightward': "\uE603",
|
|
|
+ 'uicon-arrow-upward': "\uE607",
|
|
|
+ 'uicon-arrow-down': "\uE60D",
|
|
|
+ 'uicon-arrow-right': "\uE605",
|
|
|
+ 'uicon-arrow-left': "\uE60E",
|
|
|
+ 'uicon-arrow-up': "\uE606",
|
|
|
+ 'uicon-skip-back-left': "\uE674",
|
|
|
+ 'uicon-skip-forward-right': "\uE672",
|
|
|
+ 'uicon-rewind-right': "\uE66F",
|
|
|
+ 'uicon-rewind-left': "\uE671",
|
|
|
+ 'uicon-arrow-right-double': "\uE68D",
|
|
|
+ 'uicon-arrow-left-double': "\uE68C",
|
|
|
+ 'uicon-wifi-off': "\uE668",
|
|
|
+ 'uicon-wifi': "\uE667",
|
|
|
+ 'uicon-empty-data': "\uE62F",
|
|
|
+ 'uicon-empty-history': "\uE684",
|
|
|
+ 'uicon-empty-list': "\uE68B",
|
|
|
+ 'uicon-empty-page': "\uE627",
|
|
|
+ 'uicon-empty-order': "\uE639",
|
|
|
+ 'uicon-man': "\uE697",
|
|
|
+ 'uicon-woman': "\uE69C",
|
|
|
+ 'uicon-man-add': "\uE61C",
|
|
|
+ 'uicon-man-add-fill': "\uE64C",
|
|
|
+ 'uicon-man-delete': "\uE61A",
|
|
|
+ 'uicon-man-delete-fill': "\uE66A",
|
|
|
+ 'uicon-zh': "\uE70A",
|
|
|
+ 'uicon-en': "\uE692"
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 287 */
|
|
|
+/*!**********************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-icon/props.js ***!
|
|
|
+ \**********************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // 图标类名
|
|
|
+ name: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.icon.name
|
|
|
+ },
|
|
|
+ // 图标颜色,可接受主题色
|
|
|
+ color: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.icon.color
|
|
|
+ },
|
|
|
+ // 字体大小,单位px
|
|
|
+ size: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.size
|
|
|
+ },
|
|
|
+ // 是否显示粗体
|
|
|
+ bold: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.icon.bold
|
|
|
+ },
|
|
|
+ // 点击图标的时候传递事件出去的index(用于区分点击了哪一个)
|
|
|
+ index: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.index
|
|
|
+ },
|
|
|
+ // 触摸图标时的类名
|
|
|
+ hoverClass: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.icon.hoverClass
|
|
|
+ },
|
|
|
+ // 自定义扩展前缀,方便用户扩展自己的图标库
|
|
|
+ customPrefix: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.icon.customPrefix
|
|
|
+ },
|
|
|
+ // 图标右边或者下面的文字
|
|
|
+ label: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.label
|
|
|
+ },
|
|
|
+ // label的位置,只能右边或者下边
|
|
|
+ labelPos: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.icon.labelPos
|
|
|
+ },
|
|
|
+ // label的大小
|
|
|
+ labelSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.labelSize
|
|
|
+ },
|
|
|
+ // label的颜色
|
|
|
+ labelColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.icon.labelColor
|
|
|
+ },
|
|
|
+ // label与图标的距离
|
|
|
+ space: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.space
|
|
|
+ },
|
|
|
+ // 图片的mode
|
|
|
+ imgMode: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.icon.imgMode
|
|
|
+ },
|
|
|
+ // 用于显示图片小图标时,图片的宽度
|
|
|
+ width: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.width
|
|
|
+ },
|
|
|
+ // 用于显示图片小图标时,图片的高度
|
|
|
+ height: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.height
|
|
|
+ },
|
|
|
+ // 用于解决某些情况下,让图标垂直居中的用途
|
|
|
+ top: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.icon.top
|
|
|
+ },
|
|
|
+ // 是否阻止事件传播
|
|
|
+ stop: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.icon.stop
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 288 */,
|
|
|
+/* 289 */,
|
|
|
+/* 290 */,
|
|
|
+/* 291 */,
|
|
|
+/* 292 */,
|
|
|
+/* 293 */,
|
|
|
+/* 294 */,
|
|
|
+/* 295 */
|
|
|
+/*!**********************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-line/props.js ***!
|
|
|
+ \**********************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ color: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.line.color
|
|
|
+ },
|
|
|
+ // 长度,竖向时表现为高度,横向时表现为长度,可以为百分比,带px单位的值等
|
|
|
+ length: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.line.length
|
|
|
+ },
|
|
|
+ // 线条方向,col-竖向,row-横向
|
|
|
+ direction: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.line.direction
|
|
|
+ },
|
|
|
+ // 是否显示细边框
|
|
|
+ hairline: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.line.hairline
|
|
|
+ },
|
|
|
+ // 线条与上下左右元素的间距,字符串形式,如"30px"、"20px 30px"
|
|
|
+ margin: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.line.margin
|
|
|
+ },
|
|
|
+ // 是否虚线,true-虚线,false-实线
|
|
|
+ dashed: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.line.dashed
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
+/***/ }),
|
|
|
+/* 296 */,
|
|
|
+/* 297 */,
|
|
|
+/* 298 */,
|
|
|
+/* 299 */,
|
|
|
+/* 300 */,
|
|
|
+/* 301 */,
|
|
|
+/* 302 */,
|
|
|
+/* 303 */
|
|
|
+/*!******************************************************************************************!*\
|
|
|
+ !*** D:/demo/tourism/uni_applet/uni_modules/uview-ui/components/u-loading-icon/props.js ***!
|
|
|
+ \******************************************************************************************/
|
|
|
+/*! no static exports found */
|
|
|
+/***/ (function(module, exports, __webpack_require__) {
|
|
|
+
|
|
|
+"use strict";
|
|
|
+/* WEBPACK VAR INJECTION */(function(uni) {
|
|
|
+
|
|
|
+Object.defineProperty(exports, "__esModule", {
|
|
|
+ value: true
|
|
|
+});
|
|
|
+exports.default = void 0;
|
|
|
+var _default = {
|
|
|
+ props: {
|
|
|
+ // 是否显示组件
|
|
|
+ show: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.loadingIcon.show
|
|
|
+ },
|
|
|
+ // 颜色
|
|
|
+ color: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.loadingIcon.color
|
|
|
+ },
|
|
|
+ // 提示文字颜色
|
|
|
+ textColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.loadingIcon.textColor
|
|
|
+ },
|
|
|
+ // 文字和图标是否垂直排列
|
|
|
+ vertical: {
|
|
|
+ type: Boolean,
|
|
|
+ default: uni.$u.props.loadingIcon.vertical
|
|
|
+ },
|
|
|
+ // 模式选择,circle-圆形,spinner-花朵形,semicircle-半圆形
|
|
|
+ mode: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.loadingIcon.mode
|
|
|
+ },
|
|
|
+ // 图标大小,单位默认px
|
|
|
+ size: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.loadingIcon.size
|
|
|
+ },
|
|
|
+ // 文字大小
|
|
|
+ textSize: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.loadingIcon.textSize
|
|
|
+ },
|
|
|
+ // 文字内容
|
|
|
+ text: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.loadingIcon.text
|
|
|
+ },
|
|
|
+ // 动画模式
|
|
|
+ timingFunction: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.loadingIcon.timingFunction
|
|
|
+ },
|
|
|
+ // 动画执行周期时间
|
|
|
+ duration: {
|
|
|
+ type: [String, Number],
|
|
|
+ default: uni.$u.props.loadingIcon.duration
|
|
|
+ },
|
|
|
+ // mode=circle时的暗边颜色
|
|
|
+ inactiveColor: {
|
|
|
+ type: String,
|
|
|
+ default: uni.$u.props.loadingIcon.inactiveColor
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+exports.default = _default;
|
|
|
+/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
|
|
|
+
|
|
|
/***/ })
|
|
|
]]);
|
|
|
//# sourceMappingURL=../../.sourcemap/mp-weixin/common/vendor.js.map
|