123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430 |
- (global["webpackJsonp"] = global["webpackJsonp"] || []).push([["uni_modules/uview-ui/components/u-radio/u-radio"],{
- /***/ 413:
- /*!*******************************************************************************!*\
- !*** E:/ios/iot-test-app/uni_modules/uview-ui/components/u-radio/u-radio.vue ***!
- \*******************************************************************************/
- /*! no static exports found */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./u-radio.vue?vue&type=template&id=5dfbf8b1&scoped=true& */ 414);
- /* harmony import */ var _u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./u-radio.vue?vue&type=script&lang=js& */ 416);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony import */ var _u_radio_vue_vue_type_style_index_0_id_5dfbf8b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./u-radio.vue?vue&type=style&index=0&id=5dfbf8b1&lang=scss&scoped=true& */ 419);
- /* harmony import */ var _D_gugedownload_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 */ 36);
- var renderjs
- /* normalize component */
- var component = Object(_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
- _u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__["default"],
- _u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"],
- _u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"],
- false,
- null,
- "5dfbf8b1",
- null,
- false,
- _u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"],
- renderjs
- )
- component.options.__file = "uni_modules/uview-ui/components/u-radio/u-radio.vue"
- /* harmony default export */ __webpack_exports__["default"] = (component.exports);
- /***/ }),
- /***/ 414:
- /*!**************************************************************************************************************************!*\
- !*** E:/ios/iot-test-app/uni_modules/uview-ui/components/u-radio/u-radio.vue?vue&type=template&id=5dfbf8b1&scoped=true& ***!
- \**************************************************************************************************************************/
- /*! exports provided: render, staticRenderFns, recyclableRender, components */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_template_id_5dfbf8b1_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--17-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-radio.vue?vue&type=template&id=5dfbf8b1&scoped=true& */ 415);
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "render", function() { return _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["render"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "staticRenderFns", function() { return _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["staticRenderFns"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "recyclableRender", function() { return _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["recyclableRender"]; });
- /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "components", function() { return _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_17_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_template_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_uni_app_loader_page_meta_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_template_id_5dfbf8b1_scoped_true___WEBPACK_IMPORTED_MODULE_0__["components"]; });
- /***/ }),
- /***/ 415:
- /*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
- !*** ./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--17-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!E:/ios/iot-test-app/uni_modules/uview-ui/components/u-radio/u-radio.vue?vue&type=template&id=5dfbf8b1&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 Promise.all(/*! import() | uni_modules/uview-ui/components/u-icon/u-icon */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uview-ui/components/u-icon/u-icon.vue */ 283))
- },
- }
- } 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 s0 = _vm.__get_style([_vm.radioStyle])
- var s1 = _vm.__get_style([_vm.iconWrapStyle])
- _vm.$mp.data = Object.assign(
- {},
- {
- $root: {
- s0: s0,
- s1: s1,
- },
- }
- )
- }
- var recyclableRender = false
- var staticRenderFns = []
- render._withStripped = true
- /***/ }),
- /***/ 416:
- /*!********************************************************************************************************!*\
- !*** E:/ios/iot-test-app/uni_modules/uview-ui/components/u-radio/u-radio.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 _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_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--13-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-radio.vue?vue&type=script&lang=js& */ 417);
- /* harmony import */ var _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_babel_loader_lib_index_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_13_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_script_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ 417:
- /*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
- !*** ./node_modules/babel-loader/lib!./node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader??ref--13-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!E:/ios/iot-test-app/uni_modules/uview-ui/components/u-radio/u-radio.vue?vue&type=script&lang=js& ***!
- \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, exports, __webpack_require__) {
- "use strict";
- /* WEBPACK VAR INJECTION */(function(uni) {
- var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 4);
- Object.defineProperty(exports, "__esModule", {
- value: true
- });
- exports.default = void 0;
- var _props = _interopRequireDefault(__webpack_require__(/*! ./props.js */ 418));
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- //
- /**
- * radio 单选框
- * @description 单选框用于有一个选择,用户只能选择其中一个的场景。搭配u-radio-group使用
- * @tutorial https://www.uviewui.com/components/radio.html
- * @property {String | Number} name radio的名称
- * @property {String} shape 形状,square为方形,circle为圆型
- * @property {Boolean} disabled 是否禁用
- * @property {String | Boolean} labelDisabled 是否禁止点击提示语选中单选框
- * @property {String} activeColor 选中时的颜色,如设置parent的active-color将失效
- * @property {String} inactiveColor 未选中的颜色
- * @property {String | Number} iconSize 图标大小,单位px
- * @property {String | Number} labelSize label字体大小,单位px
- * @property {String | Number} label label提示文字,因为nvue下,直接slot进来的文字,由于特殊的结构,无法修改样式
- * @property {String | Number} size 整体的大小
- * @property {String} iconColor 图标颜色
- * @property {String} labelColor label的颜色
- * @property {Object} customStyle 组件的样式,对象形式
- *
- * @event {Function} change 某个radio状态发生变化时触发(选中状态)
- * @example <u-radio :labelDisabled="false">门掩黄昏,无计留春住</u-radio>
- */
- var _default = {
- name: "u-radio",
- mixins: [uni.$u.mpMixin, uni.$u.mixin, _props.default],
- data: function data() {
- return {
- checked: false,
- // 当你看到这段代码的时候,
- // 父组件的默认值,因为头条小程序不支持在computed中使用this.parent.shape的形式
- // 故只能使用如此方法
- parentData: {
- iconSize: 12,
- labelDisabled: null,
- disabled: null,
- shape: null,
- activeColor: null,
- inactiveColor: null,
- size: 18,
- value: null,
- iconColor: null,
- placement: 'row',
- borderBottom: false,
- iconPlacement: 'left'
- }
- };
- },
- computed: {
- // 是否禁用,如果父组件u-raios-group禁用的话,将会忽略子组件的配置
- elDisabled: function elDisabled() {
- return this.disabled !== '' ? this.disabled : this.parentData.disabled !== null ? this.parentData.disabled : false;
- },
- // 是否禁用label点击
- elLabelDisabled: function elLabelDisabled() {
- return this.labelDisabled !== '' ? this.labelDisabled : this.parentData.labelDisabled !== null ? this.parentData.labelDisabled : false;
- },
- // 组件尺寸,对应size的值,默认值为21px
- elSize: function elSize() {
- return this.size ? this.size : this.parentData.size ? this.parentData.size : 21;
- },
- // 组件的勾选图标的尺寸,默认12px
- elIconSize: function elIconSize() {
- return this.iconSize ? this.iconSize : this.parentData.iconSize ? this.parentData.iconSize : 12;
- },
- // 组件选中激活时的颜色
- elActiveColor: function elActiveColor() {
- return this.activeColor ? this.activeColor : this.parentData.activeColor ? this.parentData.activeColor : '#2979ff';
- },
- // 组件选未中激活时的颜色
- elInactiveColor: function elInactiveColor() {
- return this.inactiveColor ? this.inactiveColor : this.parentData.inactiveColor ? this.parentData.inactiveColor : '#c8c9cc';
- },
- // label的颜色
- elLabelColor: function elLabelColor() {
- return this.labelColor ? this.labelColor : this.parentData.labelColor ? this.parentData.labelColor : '#606266';
- },
- // 组件的形状
- elShape: function elShape() {
- return this.shape ? this.shape : this.parentData.shape ? this.parentData.shape : 'circle';
- },
- // label大小
- elLabelSize: function elLabelSize() {
- return uni.$u.addUnit(this.labelSize ? this.labelSize : this.parentData.labelSize ? this.parentData.labelSize : '15');
- },
- elIconColor: function elIconColor() {
- var iconColor = this.iconColor ? this.iconColor : this.parentData.iconColor ? this.parentData.iconColor : '#ffffff';
- // 图标的颜色
- if (this.elDisabled) {
- // disabled状态下,已勾选的radio图标改为elInactiveColor
- return this.checked ? this.elInactiveColor : 'transparent';
- } else {
- return this.checked ? iconColor : 'transparent';
- }
- },
- iconClasses: function iconClasses() {
- var classes = [];
- // 组件的形状
- classes.push('u-radio__icon-wrap--' + this.elShape);
- if (this.elDisabled) {
- classes.push('u-radio__icon-wrap--disabled');
- }
- if (this.checked && this.elDisabled) {
- classes.push('u-radio__icon-wrap--disabled--checked');
- }
- // 支付宝,头条小程序无法动态绑定一个数组类名,否则解析出来的结果会带有",",而导致失效
- return classes;
- },
- iconWrapStyle: function iconWrapStyle() {
- // radio的整体样式
- var style = {};
- style.backgroundColor = this.checked && !this.elDisabled ? this.elActiveColor : '#ffffff';
- style.borderColor = this.checked && !this.elDisabled ? this.elActiveColor : this.elInactiveColor;
- style.width = uni.$u.addUnit(this.elSize);
- style.height = uni.$u.addUnit(this.elSize);
- // 如果是图标在右边的话,移除它的右边距
- if (this.parentData.iconPlacement === 'right') {
- style.marginRight = 0;
- }
- return style;
- },
- radioStyle: function radioStyle() {
- var style = {};
- if (this.parentData.borderBottom && this.parentData.placement === 'row') {
- uni.$u.error('检测到您将borderBottom设置为true,需要同时将u-radio-group的placement设置为column才有效');
- }
- // 当父组件设置了显示下边框并且排列形式为纵向时,给内容和边框之间加上一定间隔
- if (this.parentData.borderBottom && this.parentData.placement === 'column') {
- // ios像素密度高,需要多一点的距离
- style.paddingBottom = uni.$u.os() === 'ios' ? '12px' : '8px';
- }
- return uni.$u.deepMerge(style, uni.$u.addStyle(this.customStyle));
- }
- },
- mounted: function mounted() {
- this.init();
- },
- methods: {
- init: function init() {
- // 支付宝小程序不支持provide/inject,所以使用这个方法获取整个父组件,在created定义,避免循环引用
- this.updateParentData();
- if (!this.parent) {
- uni.$u.error('u-radio必须搭配u-radio-group组件使用');
- }
- // 设置初始化时,是否默认选中的状态
- this.checked = this.name === this.parentData.value;
- },
- updateParentData: function updateParentData() {
- this.getParentData('u-radio-group');
- },
- // 点击图标
- iconClickHandler: function iconClickHandler(e) {
- this.preventEvent(e);
- // 如果整体被禁用,不允许被点击
- if (!this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- // 横向两端排列时,点击组件即可触发选中事件
- wrapperClickHandler: function wrapperClickHandler(e) {
- this.parentData.iconPlacement === 'right' && this.iconClickHandler(e);
- },
- // 点击label
- labelClickHandler: function labelClickHandler(e) {
- this.preventEvent(e);
- // 如果按钮整体被禁用或者label被禁用,则不允许点击文字修改状态
- if (!this.elLabelDisabled && !this.elDisabled) {
- this.setRadioCheckedStatus();
- }
- },
- emitEvent: function emitEvent() {
- var _this = this;
- // u-radio的checked不为true时(意味着未选中),才发出事件,避免多次点击触发事件
- if (!this.checked) {
- this.$emit('change', this.name);
- // 尝试调用u-form的验证方法,进行一定延迟,否则微信小程序更新可能会不及时
- this.$nextTick(function () {
- uni.$u.formValidate(_this, 'change');
- });
- }
- },
- // 改变组件选中状态
- // 这里的改变的依据是,更改本组件的checked值为true,同时通过父组件遍历所有u-radio实例
- // 将本组件外的其他u-radio的checked都设置为false(都被取消选中状态),因而只剩下一个为选中状态
- setRadioCheckedStatus: function setRadioCheckedStatus() {
- this.emitEvent();
- // 将本组件标记为选中状态
- this.checked = true;
- typeof this.parent.unCheckedOther === 'function' && this.parent.unCheckedOther(this);
- }
- }
- };
- exports.default = _default;
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 2)["default"]))
- /***/ }),
- /***/ 419:
- /*!*****************************************************************************************************************************************!*\
- !*** E:/ios/iot-test-app/uni_modules/uview-ui/components/u-radio/u-radio.vue?vue&type=style&index=0&id=5dfbf8b1&lang=scss&scoped=true& ***!
- \*****************************************************************************************************************************************/
- /*! no static exports found */
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
- "use strict";
- __webpack_require__.r(__webpack_exports__);
- /* harmony import */ var _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_style_index_0_id_5dfbf8b1_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/@dcloudio/vue-cli-plugin-uni/packages/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-radio.vue?vue&type=style&index=0&id=5dfbf8b1&lang=scss&scoped=true& */ 420);
- /* harmony import */ var _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_style_index_0_id_5dfbf8b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_style_index_0_id_5dfbf8b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__);
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_style_index_0_id_5dfbf8b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__) if(["default"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_style_index_0_id_5dfbf8b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
- /* harmony default export */ __webpack_exports__["default"] = (_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_loaders_stylePostLoader_js_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_2_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_3_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_sass_loader_dist_cjs_js_ref_8_oneOf_1_4_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_webpack_preprocess_loader_index_js_ref_8_oneOf_1_5_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_vue_cli_plugin_uni_packages_vue_loader_lib_index_js_vue_loader_options_D_gugedownload_HBuilderX_plugins_uniapp_cli_node_modules_dcloudio_webpack_uni_mp_loader_lib_style_js_u_radio_vue_vue_type_style_index_0_id_5dfbf8b1_lang_scss_scoped_true___WEBPACK_IMPORTED_MODULE_0___default.a);
- /***/ }),
- /***/ 420:
- /*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
- !*** ./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/@dcloudio/vue-cli-plugin-uni/packages/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!E:/ios/iot-test-app/uni_modules/uview-ui/components/u-radio/u-radio.vue?vue&type=style&index=0&id=5dfbf8b1&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/uni_modules/uview-ui/components/u-radio/u-radio.js.map
- ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
- 'uni_modules/uview-ui/components/u-radio/u-radio-create-component',
- {
- 'uni_modules/uview-ui/components/u-radio/u-radio-create-component':(function(module, exports, __webpack_require__){
- __webpack_require__('2')['createComponent'](__webpack_require__(413))
- })
- },
- [['uni_modules/uview-ui/components/u-radio/u-radio-create-component']]
- ]);
|