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
|
package/dist/mx-ui-template.css
CHANGED
|
@@ -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
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
-
),
|
|
9
|
+
), n.toDataURL("image/png");
|
|
11
10
|
}
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
for (let
|
|
15
|
-
|
|
16
|
-
return "#" + (
|
|
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
|
|
17
|
+
function c(t, e) {
|
|
19
18
|
if (!t) return "";
|
|
20
|
-
const
|
|
21
|
-
if (Number.isNaN(
|
|
22
|
-
const
|
|
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(
|
|
26
|
+
return new Intl.DateTimeFormat(n, r).format(o);
|
|
28
27
|
}
|
|
29
|
-
function
|
|
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
|
|
33
|
-
formatDate:
|
|
34
|
-
isEmpty:
|
|
35
|
-
generateTextAvatar:
|
|
36
|
-
generateColor:
|
|
31
|
+
const f = {
|
|
32
|
+
formatDate: c,
|
|
33
|
+
isEmpty: l,
|
|
34
|
+
generateTextAvatar: i,
|
|
35
|
+
generateColor: a
|
|
37
36
|
};
|
|
38
37
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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,
|
|
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.
|
|
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",
|