zhyp-vue2-common-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ (function(t,n){"object"===typeof exports&&"object"===typeof module?module.exports=n():"function"===typeof define&&define.amd?define([],n):"object"===typeof exports?exports["zhyp-vue2-common-ui"]=n():t["zhyp-vue2-common-ui"]=n()})("undefined"!==typeof self?self:this,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,e),o.l=!0,o.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var o in t)e.d(r,o,function(n){return t[n]}.bind(null,o));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t["default"]}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s="fb15")}({"0366":function(t,n,e){var r=e("1c0b");t.exports=function(t,n,e){if(r(t),void 0===n)return t;switch(e){case 0:return function(){return t.call(n)};case 1:return function(e){return t.call(n,e)};case 2:return function(e,r){return t.call(n,e,r)};case 3:return function(e,r,o){return t.call(n,e,r,o)}}return function(){return t.apply(n,arguments)}}},"06cf":function(t,n,e){var r=e("83ab"),o=e("d1e7"),c=e("5c6c"),i=e("fc6a"),u=e("c04e"),f=e("5135"),a=e("0cfb"),s=Object.getOwnPropertyDescriptor;n.f=r?s:function(t,n){if(t=i(t),n=u(n,!0),a)try{return s(t,n)}catch(e){}if(f(t,n))return c(!o.f.call(t,n),t[n])}},"0cfb":function(t,n,e){var r=e("83ab"),o=e("d039"),c=e("cc12");t.exports=!r&&!o((function(){return 7!=Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a}))},"1c0b":function(t,n){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1d80":function(t,n){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"1dde":function(t,n,e){var r=e("d039"),o=e("b622"),c=e("2d00"),i=o("species");t.exports=function(t){return c>=51||!r((function(){var n=[],e=n.constructor={};return e[i]=function(){return{foo:1}},1!==n[t](Boolean).foo}))}},"23cb":function(t,n,e){var r=e("a691"),o=Math.max,c=Math.min;t.exports=function(t,n){var e=r(t);return e<0?o(e+n,0):c(e,n)}},"23e7":function(t,n,e){var r=e("da84"),o=e("06cf").f,c=e("9112"),i=e("6eeb"),u=e("ce4e"),f=e("e893"),a=e("94ca");t.exports=function(t,n){var e,s,p,d,l,v,y=t.target,b=t.global,h=t.stat;if(s=b?r:h?r[y]||u(y,{}):(r[y]||{}).prototype,s)for(p in n){if(l=n[p],t.noTargetGet?(v=o(s,p),d=v&&v.value):d=s[p],e=a(b?p:y+(h?".":"#")+p,t.forced),!e&&void 0!==d){if(typeof l===typeof d)continue;f(l,d)}(t.sham||d&&d.sham)&&c(l,"sham",!0),i(s,p,l,t)}}},"241c":function(t,n,e){var r=e("ca84"),o=e("7839"),c=o.concat("length","prototype");n.f=Object.getOwnPropertyNames||function(t){return r(t,c)}},"2d00":function(t,n,e){var r,o,c=e("da84"),i=e("342f"),u=c.process,f=u&&u.versions,a=f&&f.v8;a?(r=a.split("."),o=r[0]+r[1]):i&&(r=i.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=i.match(/Chrome\/(\d+)/),r&&(o=r[1]))),t.exports=o&&+o},"342f":function(t,n,e){var r=e("d066");t.exports=r("navigator","userAgent")||""},"428f":function(t,n,e){var r=e("da84");t.exports=r},"44ad":function(t,n,e){var r=e("d039"),o=e("c6b6"),c="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==o(t)?c.call(t,""):Object(t)}:Object},4930:function(t,n,e){var r=e("605d"),o=e("2d00"),c=e("d039");t.exports=!!Object.getOwnPropertySymbols&&!c((function(){return!Symbol.sham&&(r?38===o:o>37&&o<41)}))},"4d64":function(t,n,e){var r=e("fc6a"),o=e("50c4"),c=e("23cb"),i=function(t){return function(n,e,i){var u,f=r(n),a=o(f.length),s=c(i,a);if(t&&e!=e){while(a>s)if(u=f[s++],u!=u)return!0}else for(;a>s;s++)if((t||s in f)&&f[s]===e)return t||s||0;return!t&&-1}};t.exports={includes:i(!0),indexOf:i(!1)}},"50c4":function(t,n,e){var r=e("a691"),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},5135:function(t,n){var e={}.hasOwnProperty;t.exports=function(t,n){return e.call(t,n)}},5692:function(t,n,e){var r=e("c430"),o=e("c6cd");(t.exports=function(t,n){return o[t]||(o[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.10.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"56ef":function(t,n,e){var r=e("d066"),o=e("241c"),c=e("7418"),i=e("825a");t.exports=r("Reflect","ownKeys")||function(t){var n=o.f(i(t)),e=c.f;return e?n.concat(e(t)):n}},"5c6c":function(t,n){t.exports=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}}},"605d":function(t,n,e){var r=e("c6b6"),o=e("da84");t.exports="process"==r(o.process)},"65f0":function(t,n,e){var r=e("861d"),o=e("e8b5"),c=e("b622"),i=c("species");t.exports=function(t,n){var e;return o(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!o(e.prototype)?r(e)&&(e=e[i],null===e&&(e=void 0)):e=void 0),new(void 0===e?Array:e)(0===n?0:n)}},"69f3":function(t,n,e){var r,o,c,i=e("7f9a"),u=e("da84"),f=e("861d"),a=e("9112"),s=e("5135"),p=e("c6cd"),d=e("f772"),l=e("d012"),v=u.WeakMap,y=function(t){return c(t)?o(t):r(t,{})},b=function(t){return function(n){var e;if(!f(n)||(e=o(n)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return e}};if(i){var h=p.state||(p.state=new v),m=h.get,g=h.has,x=h.set;r=function(t,n){return n.facade=t,x.call(h,t,n),n},o=function(t){return m.call(h,t)||{}},c=function(t){return g.call(h,t)}}else{var w=d("state");l[w]=!0,r=function(t,n){return n.facade=t,a(t,w,n),n},o=function(t){return s(t,w)?t[w]:{}},c=function(t){return s(t,w)}}t.exports={set:r,get:o,has:c,enforce:y,getterFor:b}},"6eeb":function(t,n,e){var r=e("da84"),o=e("9112"),c=e("5135"),i=e("ce4e"),u=e("8925"),f=e("69f3"),a=f.get,s=f.enforce,p=String(String).split("String");(t.exports=function(t,n,e,u){var f,a=!!u&&!!u.unsafe,d=!!u&&!!u.enumerable,l=!!u&&!!u.noTargetGet;"function"==typeof e&&("string"!=typeof n||c(e,"name")||o(e,"name",n),f=s(e),f.source||(f.source=p.join("string"==typeof n?n:""))),t!==r?(a?!l&&t[n]&&(d=!0):delete t[n],d?t[n]=e:o(t,n,e)):d?t[n]=e:i(n,e)})(Function.prototype,"toString",(function(){return"function"==typeof this&&a(this).source||u(this)}))},7418:function(t,n){n.f=Object.getOwnPropertySymbols},7839:function(t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(t,n,e){var r=e("1d80");t.exports=function(t){return Object(r(t))}},"7f9a":function(t,n,e){var r=e("da84"),o=e("8925"),c=r.WeakMap;t.exports="function"===typeof c&&/native code/.test(o(c))},"825a":function(t,n,e){var r=e("861d");t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},"83ab":function(t,n,e){var r=e("d039");t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,n){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8875:function(t,n,e){var r,o,c;(function(e,i){o=[],r=i,c="function"===typeof r?r.apply(n,o):r,void 0===c||(t.exports=c)})("undefined"!==typeof self&&self,(function(){function t(){var n=Object.getOwnPropertyDescriptor(document,"currentScript");if(!n&&"currentScript"in document&&document.currentScript)return document.currentScript;if(n&&n.get!==t&&document.currentScript)return document.currentScript;try{throw new Error}catch(l){var e,r,o,c=/.*at [^(]*\((.*):(.+):(.+)\)$/gi,i=/@([^@]*):(\d+):(\d+)\s*$/gi,u=c.exec(l.stack)||i.exec(l.stack),f=u&&u[1]||!1,a=u&&u[2]||!1,s=document.location.href.replace(document.location.hash,""),p=document.getElementsByTagName("script");f===s&&(e=document.documentElement.outerHTML,r=new RegExp("(?:[^\\n]+?\\n){0,"+(a-2)+"}[^<]*<script>([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),o=e.replace(r,"$1").trim());for(var d=0;d<p.length;d++){if("interactive"===p[d].readyState)return p[d];if(p[d].src===f)return p[d];if(f===s&&p[d].innerHTML&&p[d].innerHTML.trim()===o)return p[d]}return null}}return t}))},8925:function(t,n,e){var r=e("c6cd"),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return o.call(t)}),t.exports=r.inspectSource},"90e3":function(t,n){var e=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++e+r).toString(36)}},9112:function(t,n,e){var r=e("83ab"),o=e("9bf2"),c=e("5c6c");t.exports=r?function(t,n,e){return o.f(t,n,c(1,e))}:function(t,n,e){return t[n]=e,t}},"94ca":function(t,n,e){var r=e("d039"),o=/#|\.prototype\./,c=function(t,n){var e=u[i(t)];return e==a||e!=f&&("function"==typeof n?r(n):!!n)},i=c.normalize=function(t){return String(t).replace(o,".").toLowerCase()},u=c.data={},f=c.NATIVE="N",a=c.POLYFILL="P";t.exports=c},"9bf2":function(t,n,e){var r=e("83ab"),o=e("0cfb"),c=e("825a"),i=e("c04e"),u=Object.defineProperty;n.f=r?u:function(t,n,e){if(c(t),n=i(n,!0),c(e),o)try{return u(t,n,e)}catch(r){}if("get"in e||"set"in e)throw TypeError("Accessors not supported");return"value"in e&&(t[n]=e.value),t}},"9d7d":function(t,n,e){"use strict";e("a55b")},a55b:function(t,n,e){},a691:function(t,n){var e=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:e)(t)}},b0c0:function(t,n,e){var r=e("83ab"),o=e("9bf2").f,c=Function.prototype,i=c.toString,u=/^\s*function ([^ (]*)/,f="name";r&&!(f in c)&&o(c,f,{configurable:!0,get:function(){try{return i.call(this).match(u)[1]}catch(t){return""}}})},b622:function(t,n,e){var r=e("da84"),o=e("5692"),c=e("5135"),i=e("90e3"),u=e("4930"),f=e("fdbf"),a=o("wks"),s=r.Symbol,p=f?s:s&&s.withoutSetter||i;t.exports=function(t){return c(a,t)&&(u||"string"==typeof a[t])||(u&&c(s,t)?a[t]=s[t]:a[t]=p("Symbol."+t)),a[t]}},b727:function(t,n,e){var r=e("0366"),o=e("44ad"),c=e("7b0b"),i=e("50c4"),u=e("65f0"),f=[].push,a=function(t){var n=1==t,e=2==t,a=3==t,s=4==t,p=6==t,d=7==t,l=5==t||p;return function(v,y,b,h){for(var m,g,x=c(v),w=o(x),S=r(y,b,3),O=i(w.length),j=0,_=h||u,E=n?_(v,O):e||d?_(v,0):void 0;O>j;j++)if((l||j in w)&&(m=w[j],g=S(m,j,x),t))if(n)E[j]=g;else if(g)switch(t){case 3:return!0;case 5:return m;case 6:return j;case 2:f.call(E,m)}else switch(t){case 4:return!1;case 7:f.call(E,m)}return p?-1:a||s?s:E}};t.exports={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterOut:a(7)}},c04e:function(t,n,e){var r=e("861d");t.exports=function(t,n){if(!r(t))return t;var e,o;if(n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;if("function"==typeof(e=t.valueOf)&&!r(o=e.call(t)))return o;if(!n&&"function"==typeof(e=t.toString)&&!r(o=e.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},c430:function(t,n){t.exports=!1},c6b6:function(t,n){var e={}.toString;t.exports=function(t){return e.call(t).slice(8,-1)}},c6cd:function(t,n,e){var r=e("da84"),o=e("ce4e"),c="__core-js_shared__",i=r[c]||o(c,{});t.exports=i},c8ba:function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(r){"object"===typeof window&&(e=window)}t.exports=e},ca84:function(t,n,e){var r=e("5135"),o=e("fc6a"),c=e("4d64").indexOf,i=e("d012");t.exports=function(t,n){var e,u=o(t),f=0,a=[];for(e in u)!r(i,e)&&r(u,e)&&a.push(e);while(n.length>f)r(u,e=n[f++])&&(~c(a,e)||a.push(e));return a}},cc12:function(t,n,e){var r=e("da84"),o=e("861d"),c=r.document,i=o(c)&&o(c.createElement);t.exports=function(t){return i?c.createElement(t):{}}},ce4e:function(t,n,e){var r=e("da84"),o=e("9112");t.exports=function(t,n){try{o(r,t,n)}catch(e){r[t]=n}return n}},d012:function(t,n){t.exports={}},d039:function(t,n){t.exports=function(t){try{return!!t()}catch(n){return!0}}},d066:function(t,n,e){var r=e("428f"),o=e("da84"),c=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,n){return arguments.length<2?c(r[t])||c(o[t]):r[t]&&r[t][n]||o[t]&&o[t][n]}},d1e7:function(t,n,e){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,c=o&&!r.call({1:2},1);n.f=c?function(t){var n=o(this,t);return!!n&&n.enumerable}:r},d81d:function(t,n,e){"use strict";var r=e("23e7"),o=e("b727").map,c=e("1dde"),i=c("map");r({target:"Array",proto:!0,forced:!i},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},da84:function(t,n,e){(function(n){var e=function(t){return t&&t.Math==Math&&t};t.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof n&&n)||function(){return this}()||Function("return this")()}).call(this,e("c8ba"))},e893:function(t,n,e){var r=e("5135"),o=e("56ef"),c=e("06cf"),i=e("9bf2");t.exports=function(t,n){for(var e=o(n),u=i.f,f=c.f,a=0;a<e.length;a++){var s=e[a];r(t,s)||u(t,s,f(n,s))}}},e8b5:function(t,n,e){var r=e("c6b6");t.exports=Array.isArray||function(t){return"Array"==r(t)}},f772:function(t,n,e){var r=e("5692"),o=e("90e3"),c=r("keys");t.exports=function(t){return c[t]||(c[t]=o(t))}},fb15:function(t,n,e){"use strict";if(e.r(n),"undefined"!==typeof window){var r=window.document.currentScript,o=e("8875");r=o(),"currentScript"in document||Object.defineProperty(document,"currentScript",{get:o});var c=r&&r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);c&&(e.p=c[1])}e("d81d"),e("b0c0");var i=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("button",{staticClass:"co-button",class:[t.type?"co-button--"+t.type:""]},[t._t("default")],2)},u=[],f={name:"CoButton",props:{type:{type:String,default:"default"}},data:function(){return{}},mounted:function(){console.log("111",this.$slots)},methods:{}},a=f;e("9d7d");function s(t,n,e,r,o,c,i,u){var f,a="function"===typeof t?t.options:t;if(n&&(a.render=n,a.staticRenderFns=e,a._compiled=!0),r&&(a.functional=!0),c&&(a._scopeId="data-v-"+c),i?(f=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},a._ssrRegister=f):o&&(f=u?function(){o.call(this,(a.functional?this.parent:this).$root.$options.shadowRoot)}:o),f)if(a.functional){a._injectStyles=f;var s=a.render;a.render=function(t,n){return f.call(n),s(t,n)}}else{var p=a.beforeCreate;a.beforeCreate=p?[].concat(p,f):[f]}return{exports:t,options:a}}var p=s(a,i,u,!1,null,"7b7f9f78",null),d=p.exports;d.install=function(t){t.component(d.name,d)};var l=d,v=[l],y=function t(n){t.installed||v.map((function(t){return n.component(t.name,t)}))};"undefined"!==typeof window&&window.Vue&&y(window.Vue);var b={install:y,CoButton:l};n["default"]=b},fc6a:function(t,n,e){var r=e("44ad"),o=e("1d80");t.exports=function(t){return r(o(t))}},fdbf:function(t,n,e){var r=e("4930");t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}})}));
2
+ //# sourceMappingURL=zhyp-vue2-common-ui.umd.min.js.map
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "zhyp-vue2-common-ui",
3
+ "version": "0.1.0",
4
+ "private": false,
5
+ "author": {
6
+ "name": "zhangxiaoning"
7
+ },
8
+ "main": "lib/zhyp-vue2-common-ui.umd.min.js",
9
+ "scripts": {
10
+ "serve": "vue-cli-service serve",
11
+ "build": "vue-cli-service build",
12
+ "lint": "vue-cli-service lint",
13
+ "build:lib": "vue-cli-service build --target lib --name zhyp-vue2-common-ui --dest lib packages/index.js"
14
+
15
+ },
16
+ "dependencies": {
17
+ "core-js": "^3.6.5",
18
+ "echarts": "^5.2.1",
19
+ "file-loader": "^6.2.0",
20
+ "vue": "^2.6.11",
21
+ "vue-router": "^3.2.0",
22
+ "vuex": "^3.4.0"
23
+ },
24
+ "devDependencies": {
25
+ "@vue/cli-plugin-babel": "~4.5.0",
26
+ "@vue/cli-plugin-eslint": "~4.5.0",
27
+ "@vue/cli-plugin-router": "~4.5.0",
28
+ "@vue/cli-plugin-vuex": "~4.5.0",
29
+ "@vue/cli-service": "~4.5.0",
30
+ "@vue/eslint-config-standard": "^5.1.2",
31
+ "babel-eslint": "^10.1.0",
32
+ "eslint": "^6.7.2",
33
+ "eslint-plugin-import": "^2.20.2",
34
+ "eslint-plugin-node": "^11.1.0",
35
+ "eslint-plugin-promise": "^4.2.1",
36
+ "eslint-plugin-standard": "^4.0.0",
37
+ "eslint-plugin-vue": "^6.2.2",
38
+ "sass": "^1.49.7",
39
+ "sass-loader": "^8.0.2",
40
+ "svg-sprite-loader": "^6.0.10",
41
+ "vue-template-compiler": "^2.6.11"
42
+ },
43
+ "eslintConfig": {
44
+ "root": true,
45
+ "env": {
46
+ "node": true
47
+ },
48
+ "extends": [
49
+ "plugin:vue/essential",
50
+ "@vue/standard"
51
+ ],
52
+ "parserOptions": {
53
+ "parser": "babel-eslint"
54
+ },
55
+ "rules": {}
56
+ },
57
+ "browserslist": [
58
+ "> 1%",
59
+ "last 2 versions",
60
+ "not dead"
61
+ ]
62
+ }
@@ -0,0 +1,16 @@
1
+ let id = 1
2
+ // 主要用于 Vue 的 diff 算法,为每个元素创建一个独一无二的 ID
3
+ export function generateID () {
4
+ return id++
5
+ }
6
+ export function getLastestMonth () {
7
+ const date = new Date()
8
+ let year = date.getFullYear()
9
+ let month = date.getMonth()
10
+ if (month === 0) {
11
+ month = 12
12
+ year -= 1
13
+ }
14
+ month = month > 9 ? month : `0${month}`
15
+ return `${year}${month}`
16
+ }