123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557 |
- (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["uview-ui/components/u-form-item/u-form-item"],{
- /***/ 319:
- /*!**************************************************************************************!*\
- !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-form-item/u-form-item.vue ***!
- \**************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./u-form-item.vue?vue&type=template&id=006449ec&scoped=true& */ 320);
- /* harmony import */ var _u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./u-form-item.vue?vue&type=script&lang=js& */ 322);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _u_form_item_vue_vue_type_style_index_0_id_006449ec_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./u-form-item.vue?vue&type=style&index=0&id=006449ec&lang=scss&scoped=true& */ 327);
- /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js */ 10);
- var renderjs
- /* normalize component */
- var component = Object(_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
- _u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
- _u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
- false,
- null,
- "006449ec",
- null,
- false,
- _u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
- renderjs
- )
- component.options.__file = "uview-ui/components/u-form-item/u-form-item.vue"
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ 320:
- /*!*********************************************************************************************************************************!*\
- !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-form-item/u-form-item.vue?vue&type=template&id=006449ec&scoped=true& ***!
- \*********************************************************************************************************************************/
- /*! exports provided: render, staticRenderFns, recyclableRender, components */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-form-item.vue?vue&type=template&id=006449ec&scoped=true& */ 321);
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_16_0_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_template_id_006449ec_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
- /***/ }),
- /***/ 321:
- /*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
- !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--16-0!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-form-item/u-form-item.vue?vue&type=template&id=006449ec&scoped=true& ***!
- \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
- /*! exports provided: render, staticRenderFns, recyclableRender, components */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "render", function() { return render; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return staticRenderFns; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return recyclableRender; });
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "components", function() { return components; });
- var components
- try {
- components = {
- uIcon: function() {
- return __webpack_require__.e(/*! import() | uview-ui/components/u-icon/u-icon */ "uview-ui/components/u-icon/u-icon").then(__webpack_require__.bind(null, /*! @/uview-ui/components/u-icon/u-icon.vue */ 259))
- }
- }
- } catch (e) {
- if (
- e.message.indexOf("Cannot find module") !== -1 &&
- e.message.indexOf(".vue") !== -1
- ) {
- console.error(e.message)
- console.error("1. 排查组件名称拼写是否正确")
- console.error(
- "2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"
- )
- console.error(
- "3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件"
- )
- } else {
- throw e
- }
- }
- var render = function() {
- var _vm = this
- var _h = _vm.$createElement
- var _c = _vm._self._c || _h
- var m0 = _vm.validateState === "error" && _vm.showError("border-bottom")
- var s0 =
- _vm.required || _vm.leftIcon || _vm.label
- ? _vm.__get_style([
- _vm.elLabelStyle,
- {
- "justify-content":
- _vm.elLabelAlign == "left"
- ? "flex-start"
- : _vm.elLabelAlign == "center"
- ? "center"
- : "flex-end"
- }
- ])
- : null
- var m1 = _vm.validateState === "error" && _vm.showError("message")
- var g0 =
- m1 && _vm.elLabelPosition == "left"
- ? _vm.$u.addUnit(_vm.elLabelWidth)
- : null
- _vm.$mp.data = Object.assign(
- {},
- {
- $root: {
- m0: m0,
- s0: s0,
- m1: m1,
- g0: g0
- }
- }
- )
- }
- var recyclableRender = false
- var staticRenderFns = []
- render._withStripped = true
- /***/ }),
- /***/ 322:
- /*!***************************************************************************************************************!*\
- !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-form-item/u-form-item.vue?vue&type=script&lang=js& ***!
- \***************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-form-item.vue?vue&type=script&lang=js& */ 323);
- /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_12_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ 323:
- /*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
- !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--12-1!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-form-item/u-form-item.vue?vue&type=script&lang=js& ***!
- \**********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;
- var _emitter = _interopRequireDefault(__webpack_require__(/*! ../../libs/util/emitter.js */ 302));
- var _asyncValidator = _interopRequireDefault(__webpack_require__(/*! ../../libs/util/async-validator */ 324));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}function _defineProperty(obj, key, value) {if (key in obj) {Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });} else {obj[key] = value;}return obj;}
- // 去除警告信息
- _asyncValidator.default.warning = function () {};
- /**
- * form-item 表单item
- * @description 此组件一般用于表单场景,可以配置Input输入框,Select弹出框,进行表单验证等。
- * @tutorial http://uviewui.com/components/form.html
- * @property {String} label 左侧提示文字
- * @property {Object} prop 表单域model对象的属性名,在使用 validate、resetFields 方法的情况下,该属性是必填的
- * @property {Boolean} border-bottom 是否显示表单域的下划线边框
- * @property {String} label-position 表单域提示文字的位置,left-左侧,top-上方
- * @property {String Number} label-width 提示文字的宽度,单位rpx(默认90)
- * @property {Object} label-style lable的样式,对象形式
- * @property {String} label-align lable的对齐方式
- * @property {String} right-icon 右侧自定义字体图标(限uView内置图标)或图片地址
- * @property {String} left-icon 左侧自定义字体图标(限uView内置图标)或图片地址
- * @property {Object} left-icon-style 左侧图标的样式,对象形式
- * @property {Object} right-icon-style 右侧图标的样式,对象形式
- * @property {Boolean} required 是否显示左边的"*"号,这里仅起展示作用,如需校验必填,请通过rules配置必填规则(默认false)
- * @example <u-form-item label="姓名"><u-input v-model="form.name" /></u-form-item>
- */var _default2 =
- {
- name: 'u-form-item',
- mixins: [_emitter.default],
- inject: {
- uForm: {
- default: function _default() {
- return null;
- } } },
- props: {
- // input的label提示语
- label: {
- type: String,
- default: '' },
- // 绑定的值
- prop: {
- type: String,
- default: '' },
- // 是否显示表单域的下划线边框
- borderBottom: {
- type: [String, Boolean],
- default: '' },
- // label的位置,left-左边,top-上边
- labelPosition: {
- type: String,
- default: '' },
- // label的宽度,单位rpx
- labelWidth: {
- type: [String, Number],
- default: '' },
- // lable的样式,对象形式
- labelStyle: {
- type: Object,
- default: function _default() {
- return {};
- } },
- // lable字体的对齐方式
- labelAlign: {
- type: String,
- default: '' },
- // 右侧图标
- rightIcon: {
- type: String,
- default: '' },
- // 左侧图标
- leftIcon: {
- type: String,
- default: '' },
- // 左侧图标的样式
- leftIconStyle: {
- type: Object,
- default: function _default() {
- return {};
- } },
- // 左侧图标的样式
- rightIconStyle: {
- type: Object,
- default: function _default() {
- return {};
- } },
- // 是否显示左边的必填星号,只作显示用,具体校验必填的逻辑,请在rules中配置
- required: {
- type: Boolean,
- default: false } },
- data: function data() {
- return {
- initialValue: '', // 存储的默认值
- // isRequired: false, // 是否必填,由于人性化考虑,必填"*"号通过props的required配置,不再通过rules的规则自动生成
- validateState: '', // 是否校验成功
- validateMessage: '', // 校验失败的提示语
- // 有错误时的提示方式,message-提示信息,border-如果input设置了边框,变成呈红色,
- errorType: ['message'],
- fieldValue: '', // 获取当前子组件input的输入的值
- // 父组件的参数,在computed计算中,无法得知this.parent发生变化,故将父组件的参数值,放到data中
- parentData: {
- borderBottom: true,
- labelWidth: 90,
- labelPosition: 'left',
- labelStyle: {},
- labelAlign: 'left' } };
- },
- watch: {
- validateState: function validateState(val) {
- this.broadcastInputError();
- },
- // 监听u-form组件的errorType的变化
- "uForm.errorType": function uFormErrorType(val) {
- this.errorType = val;
- this.broadcastInputError();
- } },
- computed: {
- // 计算后的label宽度,由于需要多个判断,故放到computed中
- uLabelWidth: function uLabelWidth() {
- // 如果用户设置label为空字符串(微信小程序空字符串最终会变成字符串的'true'),意味着要将label的位置宽度设置为auto
- return this.elLabelPosition == 'left' ? this.label === 'true' || this.label === '' ? 'auto' : this.$u.addUnit(this.
- elLabelWidth) : '100%';
- },
- showError: function showError() {var _this = this;
- return function (type) {
- // 如果errorType数组中含有none,或者toast提示类型
- if (_this.errorType.indexOf('none') >= 0) return false;else
- if (_this.errorType.indexOf(type) >= 0) return true;else
- return false;
- };
- },
- // label的宽度
- elLabelWidth: function elLabelWidth() {
- // label默认宽度为90,优先使用本组件的值,如果没有(如果设置为0,也算是配置了值,依然起效),则用u-form的值
- return this.labelWidth != 0 || this.labelWidth != '' ? this.labelWidth : this.parentData.labelWidth ? this.parentData.
- labelWidth :
- 90;
- },
- // label的样式
- elLabelStyle: function elLabelStyle() {
- return Object.keys(this.labelStyle).length ? this.labelStyle : this.parentData.labelStyle ? this.parentData.labelStyle :
- {};
- },
- // label的位置,左侧或者上方
- elLabelPosition: function elLabelPosition() {
- return this.labelPosition ? this.labelPosition : this.parentData.labelPosition ? this.parentData.labelPosition :
- 'left';
- },
- // label的对齐方式
- elLabelAlign: function elLabelAlign() {
- return this.labelAlign ? this.labelAlign : this.parentData.labelAlign ? this.parentData.labelAlign : 'left';
- },
- // label的下划线
- elBorderBottom: function elBorderBottom() {
- // 子组件的borderBottom默认为空字符串,如果不等于空字符串,意味着子组件设置了值,优先使用子组件的值
- return this.borderBottom !== '' ? this.borderBottom : this.parentData.borderBottom ? this.parentData.borderBottom :
- true;
- } },
- methods: {
- broadcastInputError: function broadcastInputError() {
- // 子组件发出事件,第三个参数为true或者false,true代表有错误
- this.broadcast('u-input', 'on-form-item-error', this.validateState === 'error' && this.showError('border'));
- },
- // 判断是否需要required校验
- setRules: function setRules() {
- var that = this;
- // 由于人性化考虑,必填"*"号通过props的required配置,不再通过rules的规则自动生成
- // 从父组件u-form拿到当前u-form-item需要验证 的规则
- // let rules = this.getRules();
- // if (rules.length) {
- // this.isRequired = rules.some(rule => {
- // // 如果有必填项,就返回,没有的话,就是undefined
- // return rule.required;
- // });
- // }
- // blur事件
- this.$on('on-form-blur', that.onFieldBlur);
- // change事件
- this.$on('on-form-change', that.onFieldChange);
- },
- // 从u-form的rules属性中,取出当前u-form-item的校验规则
- getRules: function getRules() {
- // 父组件的所有规则
- var rules = this.parent.rules;
- rules = rules ? rules[this.prop] : [];
- // 保证返回的是一个数组形式
- return [].concat(rules || []);
- },
- // blur事件时进行表单校验
- onFieldBlur: function onFieldBlur() {
- this.validation('blur');
- },
- // change事件进行表单校验
- onFieldChange: function onFieldChange() {
- this.validation('change');
- },
- // 过滤出符合要求的rule规则
- getFilteredRule: function getFilteredRule() {var triggerType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
- var rules = this.getRules();
- // 整体验证表单时,triggerType为空字符串,此时返回所有规则进行验证
- if (!triggerType) return rules;
- // 历遍判断规则是否有对应的事件,比如blur,change触发等的事件
- // 使用indexOf判断,是因为某些时候设置的验证规则的trigger属性可能为多个,比如['blur','change']
- // 某些场景可能的判断规则,可能不存在trigger属性,故先判断是否存在此属性
- return rules.filter(function (res) {return res.trigger && res.trigger.indexOf(triggerType) !== -1;});
- },
- // 校验数据
- validation: function validation(trigger) {var _this2 = this;var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
- // 检验之间,先获取需要校验的值
- this.fieldValue = this.parent.model[this.prop];
- // blur和change是否有当前方式的校验规则
- var rules = this.getFilteredRule(trigger);
- // 判断是否有验证规则,如果没有规则,也调用回调方法,否则父组件u-form会因为
- // 对count变量的统计错误而无法进入上一层的回调
- if (!rules || rules.length === 0) {
- return callback('');
- }
- // 设置当前的装填,标识为校验中
- this.validateState = 'validating';
- // 调用async-validator的方法
- var validator = new _asyncValidator.default(_defineProperty({},
- this.prop, rules));
- validator.validate(_defineProperty({},
- this.prop, this.fieldValue),
- {
- firstFields: true },
- function (errors, fields) {
- // 记录状态和报错信息
- _this2.validateState = !errors ? 'success' : 'error';
- _this2.validateMessage = errors ? errors[0].message : '';
- // 调用回调方法
- callback(_this2.validateMessage);
- });
- },
- // 清空当前的u-form-item
- resetField: function resetField() {
- this.parent.model[this.prop] = this.initialValue;
- // 设置为`success`状态,只是为了清空错误标记
- this.validateState = 'success';
- } },
- // 组件创建完成时,将当前实例保存到u-form中
- mounted: function mounted() {var _this3 = this;
- // 支付宝、头条小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环应用
- this.parent = this.$u.$parent.call(this, 'u-form');
- if (this.parent) {
- // 历遍parentData中的属性,将parent中的同名属性赋值给parentData
- Object.keys(this.parentData).map(function (key) {
- _this3.parentData[key] = _this3.parent[key];
- });
- // 如果没有传入prop,或者uForm为空(如果u-form-input单独使用,就不会有uForm注入),就不进行校验
- if (this.prop) {
- // 将本实例添加到父组件中
- this.parent.fields.push(this);
- this.errorType = this.parent.errorType;
- // 设置初始值
- this.initialValue = this.fieldValue;
- // 添加表单校验,这里必须要写在$nextTick中,因为u-form的rules是通过ref手动传入的
- // 不在$nextTick中的话,可能会造成执行此处代码时,父组件还没通过ref把规则给u-form,导致规则为空
- this.$nextTick(function () {
- _this3.setRules();
- });
- }
- }
- },
- // 组件销毁前,将实例从u-form的缓存中移除
- beforeDestroy: function beforeDestroy() {var _this4 = this;
- // 如果当前没有prop的话表示当前不要进行删除(因为没有注入)
- if (this.parent && this.prop) {
- this.parent.fields.map(function (item, index) {
- if (item === _this4) _this4.parent.fields.splice(index, 1);
- });
- }
- } };exports.default = _default2;
- /***/ }),
- /***/ 327:
- /*!************************************************************************************************************************************************!*\
- !*** D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-form-item/u-form-item.vue?vue&type=style&index=0&id=006449ec&lang=scss&scoped=true& ***!
- \************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_style_index_0_id_006449ec_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./u-form-item.vue?vue&type=style&index=0&id=006449ec&lang=scss&scoped=true& */ 328);
- /* harmony import */ var _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_style_index_0_id_006449ec_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_style_index_0_id_006449ec_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_style_index_0_id_006449ec_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_style_index_0_id_006449ec_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_E_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_E_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_E_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_E_HBuilderX_plugins_uniapp_cli_node_modules_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_E_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_form_item_vue_vue_type_style_index_0_id_006449ec_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ 328:
- /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
- !*** ./node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!./node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-2!./node_modules/postcss-loader/src??ref--8-oneOf-1-3!./node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--8-oneOf-1-5!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib??vue-loader-options!./node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!D:/星火篮球维护/代码/小程序销售端/spark-sale/uview-ui/components/u-form-item/u-form-item.vue?vue&type=style&index=0&id=006449ec&lang=scss&scoped=true& ***!
- \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- // extracted by mini-css-extract-plugin
- if(false) { var cssReload; }
-
- /***/ })
- }]);
- //# sourceMappingURL=../../../../.sourcemap/mp-weixin/uview-ui/components/u-form-item/u-form-item.js.map
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'uview-ui/components/u-form-item/u-form-item-create-component',
- {
- 'uview-ui/components/u-form-item/u-form-item-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('1')['createComponent'](__webpack_require__(319))
- })
- },
- [['uview-ui/components/u-form-item/u-form-item-create-component']]
- ]);
|