ll-package
Version:
2 lines (1 loc) • 950 B
JavaScript
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("../../../@babel/runtime/helpers/esm/extends.js"),a=require("vue"),l=require("./props-util/index.js"),u={methods:{setState(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0,e=typeof t=="function"?t(this.$data,this.$props):t;if(this.getDerivedStateFromProps){const i=this.getDerivedStateFromProps(l.getOptionProps(this),n.default(n.default({},this.$data),e));if(i===null)return;e=n.default(n.default({},e),i||{})}n.default(this.$data,e),this._.isMounted&&this.$forceUpdate(),a.nextTick(()=>{s&&s()})},__emit(){const t=[].slice.call(arguments,0);let s=t[0];s=`on${s[0].toUpperCase()}${s.substring(1)}`;const e=this.$props[s]||this.$attrs[s];if(t.length&&e)if(Array.isArray(e))for(let i=0,r=e.length;i<r;i++)e[i](...t.slice(1));else e(...t.slice(1))}}};exports.default=u;
;