u-dropdown-item.js 3.1 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-dropdown-item/u-dropdown-item"],{"3c99":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"u-dropdown-item",props:{value:{type:[Number,String,Array],default:""},title:{type:[String,Number],default:""},options:{type:Array,default:function(){return[]}},disabled:{type:Boolean,default:!1},height:{type:[Number,String],default:"auto"}},data:function(){return{active:!1,activeColor:"#2979ff",inactiveColor:"#606266"}},computed:{propsChange:function(){return"".concat(this.title,"-").concat(this.disabled)}},watch:{propsChange:function(t){this.parent&&this.parent.init()}},created:function(){this.parent=!1},methods:{init:function(){var t=this,e=this.$u.$parent.call(this,"u-dropdown");if(e){this.parent=e,this.activeColor=e.activeColor,this.inactiveColor=e.inactiveColor;var n=e.children.find((function(e){return t===e}));n||e.children.push(this),1==e.children.length&&(this.active=!0),e.menuList.push({title:this.title,disabled:this.disabled})}},cellClick:function(t){this.$emit("input",t),this.parent.close(),this.$emit("change",t)}},mounted:function(){this.init()}};e.default=i},"4a63":function(t,e,n){"use strict";var i=n("94ed"),u=n.n(i);u.a},7121:function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var i={uCellGroup:function(){return n.e("uview-ui/components/u-cell-group/u-cell-group").then(n.bind(null,"f5b8"))},uCellItem:function(){return n.e("uview-ui/components/u-cell-item/u-cell-item").then(n.bind(null,"2335"))},uIcon:function(){return n.e("uview-ui/components/u-icon/u-icon").then(n.bind(null,"f728"))}},u=function(){var t=this,e=t.$createElement,n=(t._self._c,!t.active||t.$slots.default||t.$slots.$default?null:t.$u.addUnit(t.height)),i=!t.active||t.$slots.default||t.$slots.$default?null:t.__map(t.options,(function(e,n){var i=t.__get_orig(e),u={color:t.value==e.value?t.activeColor:t.inactiveColor};return{$orig:i,a0:u}}));t._isMounted||(t.e0=function(t){t.stopPropagation(),t.preventDefault()},t.e1=function(t){t.stopPropagation(),t.preventDefault()}),t.$mp.data=Object.assign({},{$root:{g0:n,l0:i}})},o=[]},"84c3":function(t,e,n){"use strict";n.r(e);var i=n("3c99"),u=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=u.a},"94ed":function(t,e,n){},c728:function(t,e,n){"use strict";n.r(e);var i=n("7121"),u=n("84c3");for(var o in u)"default"!==o&&function(t){n.d(e,t,(function(){return u[t]}))}(o);n("4a63");var r,a=n("f0c5"),c=Object(a["a"])(u["default"],i["b"],i["c"],!1,null,"4f87e435",null,!1,i["a"],r);e["default"]=c.exports}}]);
  2. ;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
  3. 'uview-ui/components/u-dropdown-item/u-dropdown-item-create-component',
  4. {
  5. 'uview-ui/components/u-dropdown-item/u-dropdown-item-create-component':(function(module, exports, __webpack_require__){
  6. __webpack_require__('543d')['createComponent'](__webpack_require__("c728"))
  7. })
  8. },
  9. [['uview-ui/components/u-dropdown-item/u-dropdown-item-create-component']]
  10. ]);