u-dropdown-item.js 3.1 KB

12345678910
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["uview-ui/components/u-dropdown-item/u-dropdown-item"],{"0905":function(t,n,e){"use strict";var i=e("c5d0"),u=e.n(i);u.a},"3c99":function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.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,n=this.$u.$parent.call(this,"u-dropdown");if(n){this.parent=n,this.activeColor=n.activeColor,this.inactiveColor=n.inactiveColor;var e=n.children.find((function(n){return t===n}));e||n.children.push(this),1==n.children.length&&(this.active=!0),n.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()}};n.default=i},"84c3":function(t,n,e){"use strict";e.r(n);var i=e("3c99"),u=e.n(i);for(var o in i)"default"!==o&&function(t){e.d(n,t,(function(){return i[t]}))}(o);n["default"]=u.a},c5d0:function(t,n,e){},c728:function(t,n,e){"use strict";e.r(n);var i=e("d723"),u=e("84c3");for(var o in u)"default"!==o&&function(t){e.d(n,t,(function(){return u[t]}))}(o);e("0905");var r,a=e("f0c5"),c=Object(a["a"])(u["default"],i["b"],i["c"],!1,null,"055520a9",null,!1,i["a"],r);n["default"]=c.exports},d723:function(t,n,e){"use strict";e.d(n,"b",(function(){return u})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return i}));var i={uCellGroup:function(){return e.e("uview-ui/components/u-cell-group/u-cell-group").then(e.bind(null,"f5b8"))},uCellItem:function(){return e.e("uview-ui/components/u-cell-item/u-cell-item").then(e.bind(null,"2335"))},uIcon:function(){return e.e("uview-ui/components/u-icon/u-icon").then(e.bind(null,"f728"))}},u=function(){var t=this,n=t.$createElement,e=(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(n,e){var i=t.__get_orig(n),u={color:t.value==n.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:e,l0:i}})},o=[]}}]);
  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. ]);