mx-ui-template 0.1.7 → 0.1.8

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.
Binary file
@@ -1 +1 @@
1
- [data-v-fdf1cb77] .n-button{transition:all .3s ease}[data-v-fdf1cb77] .n-button:hover:not(:disabled){transform:translateY(-1px)}[data-v-fdf1cb77] .n-button:active:not(:disabled){transform:translateY(0)}[data-v-be9f5c5c] .n-input-wrapper{transition:all .3s ease}[data-v-be9f5c5c] .n-input-wrapper:focus-within{box-shadow:0 0 0 2px #1890ff33}[data-v-fdc12dd9] .n-card{transition:all .3s ease;border-radius:var(--border-radius)}[data-v-fdc12dd9] .n-card:hover{box-shadow:0 4px 16px #0000001a}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root{--primary-color: #1890ff;--success-color: #52c41a;--warning-color: #faad14;--error-color: #f5222d;--info-color: #1890ff;--text-primary: #262626;--text-secondary: #8c8c8c;--text-disabled: #bfbfbf;--border-color: #d9d9d9;--border-radius: 6px;--box-shadow: 0 2px 8px rgba(0, 0, 0, .15)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#555}
1
+ [data-v-fdf1cb77] .n-button{transition:all .3s ease}[data-v-fdf1cb77] .n-button:hover:not(:disabled){transform:translateY(-1px)}[data-v-fdf1cb77] .n-button:active:not(:disabled){transform:translateY(0)}[data-v-be9f5c5c] .n-input-wrapper{transition:all .3s ease}[data-v-be9f5c5c] .n-input-wrapper:focus-within{box-shadow:0 0 0 2px #1890ff33}[data-v-fdc12dd9] .n-card{transition:all .3s ease;border-radius:var(--border-radius)}[data-v-fdc12dd9] .n-card:hover{box-shadow:0 4px 16px #0000001a}@font-face{font-family:basefont;src:url(/iconfont.ttf?t=1760681357694) format("truetype")}.basefont,.iconfont{font-family:basefont!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.icon-shanchu:before{content:""}.icon-CSV:before{content:""}.icon-ZIP:before{content:""}.icon-TET:before{content:""}.icon-JPG:before{content:""}.icon-VIDEO:before{content:""}.icon-PNG:before{content:""}.icon-GIF:before{content:""}.icon-ECEL:before{content:""}.icon-PPT:before{content:""}.icon-tupianziliao:before{content:""}.icon-zonghewendang:before{content:""}.icon-dianziyoujian:before{content:""}.icon-DATA:before{content:""}.icon-PDF:before{content:""}.icon-dwg:before{content:""}.icon-tuichu:before{content:""}.icon-yonghu:before{content:""}.icon-mima:before{content:""}.icon-huaban:before{content:""}.icon-kucunguanli:before{content:""}.icon-xitongguanli:before{content:""}.icon-shengchanguanli:before{content:""}.icon-fanhui:before{content:""}.icon-mining:before{content:""}.icon-jinchi:before{content:""}.icon-erjikuangliang:before{content:""}.icon-gongchengjianshe:before{content:""}.icon-renyuanguanli:before{content:""}.icon-caimeigongzuomian:before{content:""}.icon-paibanguanli:before{content:""}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}:root{--primary-color: #1890ff;--success-color: #52c41a;--warning-color: #faad14;--error-color: #f5222d;--info-color: #1890ff;--text-primary: #262626;--text-secondary: #8c8c8c;--text-disabled: #bfbfbf;--border-color: #d9d9d9;--border-radius: 6px;--box-shadow: 0 2px 8px rgba(0, 0, 0, .15)}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#f1f1f1}::-webkit-scrollbar-thumb{background:#888;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#555}
@@ -1,45 +1,44 @@
1
- function c(t, n, i) {
2
- const r = document.createElement("canvas");
3
- let { size: e, baseFontSize: a } = i || {};
4
- e = e || 128, n ? a = a || 20 * 3.5 : a = a || 20 * 1.5, r.width = e, r.height = e;
5
- const o = r.getContext("2d");
6
- return o.beginPath(), o.arc(e / 2, e / 2, e / 2, 0, Math.PI * 2), o.fillStyle = l(t), o.fill(), o.font = `bold ${e / a}rem Arial`, o.textAlign = "center", o.textBaseline = "middle", o.fillStyle = "#fff", o.fillText(
1
+ function i(t, e, o) {
2
+ const n = document.createElement("canvas");
3
+ n.width = e, n.height = e;
4
+ const r = n.getContext("2d");
5
+ return r.beginPath(), r.arc(e / 2, e / 2, e / 2, 0, Math.PI * 2), r.fillStyle = a(t), r.fill(), r.font = `bold ${e / o}rem Arial`, r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = "#fff", r.fillText(
7
6
  t.charAt(0).toUpperCase() + t.charAt(1).toUpperCase(),
8
7
  e / 2,
9
8
  e / 2
10
- ), r.toDataURL("image/png");
9
+ ), n.toDataURL("image/png");
11
10
  }
12
- function l(t) {
13
- let n = 0;
14
- for (let r = 0; r < t.length; r++)
15
- n = t.charCodeAt(r) + ((n << 5) - n);
16
- return "#" + (n & 16777215).toString(16).padStart(6, "0");
11
+ function a(t) {
12
+ let e = 0;
13
+ for (let n = 0; n < t.length; n++)
14
+ e = t.charCodeAt(n) + ((e << 5) - e);
15
+ return "#" + (e & 16777215).toString(16).padStart(6, "0");
17
16
  }
18
- function f(t, n) {
17
+ function c(t, e) {
19
18
  if (!t) return "";
20
- const i = t instanceof Date ? t : new Date(t);
21
- if (Number.isNaN(i.getTime())) return "";
22
- const r = n?.locale ?? void 0, e = n?.options ?? {
19
+ const o = t instanceof Date ? t : new Date(t);
20
+ if (Number.isNaN(o.getTime())) return "";
21
+ const n = e?.locale ?? void 0, r = e?.options ?? {
23
22
  year: "numeric",
24
23
  month: "2-digit",
25
24
  day: "2-digit"
26
25
  };
27
- return new Intl.DateTimeFormat(r, e).format(i);
26
+ return new Intl.DateTimeFormat(n, r).format(o);
28
27
  }
29
- function s(t) {
28
+ function l(t) {
30
29
  return t == null ? !0 : typeof t == "string" ? t.trim() === "" : Array.isArray(t) ? t.length === 0 : typeof t == "object" ? Object.keys(t).length === 0 : !1;
31
30
  }
32
- const g = {
33
- formatDate: f,
34
- isEmpty: s,
35
- generateTextAvatar: c,
36
- generateColor: l
31
+ const f = {
32
+ formatDate: c,
33
+ isEmpty: l,
34
+ generateTextAvatar: i,
35
+ generateColor: a
37
36
  };
38
37
  export {
39
- g as default,
40
- f as formatDate,
41
- l as generateColor,
42
- c as generateTextAvatar,
43
- s as isEmpty,
44
- g as utils
38
+ f as default,
39
+ c as formatDate,
40
+ a as generateColor,
41
+ i as generateTextAvatar,
42
+ l as isEmpty,
43
+ f as utils
45
44
  };
@@ -1 +1 @@
1
- (function(n,a){typeof exports=="object"&&typeof module<"u"?a(exports):typeof define=="function"&&define.amd?define(["exports"],a):(n=typeof globalThis<"u"?globalThis:n||self,a(n.MxUIUtils={}))})(this,(function(n){"use strict";function a(t,r,f){const i=document.createElement("canvas");let{size:e,baseFontSize:l}=f||{};e=e||128,r?l=l||20*3.5:l=l||20*1.5,i.width=e,i.height=e;const o=i.getContext("2d");return o.beginPath(),o.arc(e/2,e/2,e/2,0,Math.PI*2),o.fillStyle=c(t),o.fill(),o.font=`bold ${e/l}rem Arial`,o.textAlign="center",o.textBaseline="middle",o.fillStyle="#fff",o.fillText(t.charAt(0).toUpperCase()+t.charAt(1).toUpperCase(),e/2,e/2),i.toDataURL("image/png")}function c(t){let r=0;for(let i=0;i<t.length;i++)r=t.charCodeAt(i)+((r<<5)-r);return"#"+(r&16777215).toString(16).padStart(6,"0")}function s(t,r){if(!t)return"";const f=t instanceof Date?t:new Date(t);if(Number.isNaN(f.getTime()))return"";const i=r?.locale??void 0,e=r?.options??{year:"numeric",month:"2-digit",day:"2-digit"};return new Intl.DateTimeFormat(i,e).format(f)}function d(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const u={formatDate:s,isEmpty:d,generateTextAvatar:a,generateColor:c};n.default=u,n.formatDate=s,n.generateColor=c,n.generateTextAvatar=a,n.isEmpty=d,n.utils=u,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
1
+ (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.MxUIUtils={}))})(this,(function(n){"use strict";function i(t,e,a){const o=document.createElement("canvas");o.width=e,o.height=e;const r=o.getContext("2d");return r.beginPath(),r.arc(e/2,e/2,e/2,0,Math.PI*2),r.fillStyle=f(t),r.fill(),r.font=`bold ${e/a}rem Arial`,r.textAlign="center",r.textBaseline="middle",r.fillStyle="#fff",r.fillText(t.charAt(0).toUpperCase()+t.charAt(1).toUpperCase(),e/2,e/2),o.toDataURL("image/png")}function f(t){let e=0;for(let o=0;o<t.length;o++)e=t.charCodeAt(o)+((e<<5)-e);return"#"+(e&16777215).toString(16).padStart(6,"0")}function l(t,e){if(!t)return"";const a=t instanceof Date?t:new Date(t);if(Number.isNaN(a.getTime()))return"";const o=e?.locale??void 0,r=e?.options??{year:"numeric",month:"2-digit",day:"2-digit"};return new Intl.DateTimeFormat(o,r).format(a)}function c(t){return t==null?!0:typeof t=="string"?t.trim()==="":Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:!1}const d={formatDate:l,isEmpty:c,generateTextAvatar:i,generateColor:f};n.default=d,n.formatDate=l,n.generateColor=f,n.generateTextAvatar=i,n.isEmpty=c,n.utils=d,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "mx-ui-template",
3
3
  "private": false,
4
- "version": "0.1.7",
5
- "description": "修改头像生成逻辑,简约参数传递",
4
+ "version": "0.1.8",
5
+ "description": "接入阿里巴巴矢量图标库,并引入css和字体文件",
6
6
  "type": "module",
7
7
  "main": "./dist/mx-ui-template.umd.cjs",
8
8
  "module": "./dist/mx-ui-template.js",