qtsk-vue3 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,18 @@
1
+ import Components from './component'
2
+ const makeInstaller = (components = [], directives = []) => {
3
+ const apps = []
4
+ const install = (app, opts) => {
5
+ const option = opts
6
+ if (apps.includes(app)) return
7
+ apps.push(app)
8
+ components.forEach((c) => {
9
+ app.component(c.name, c)
10
+ })
11
+ app.config.globalProperties.$ELEMENT = option
12
+ }
13
+ return install
14
+ }
15
+
16
+ const install = makeInstaller(Components)
17
+
18
+ export { install, install as default }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "qtzy-vue3",
3
+ "version": "0.0.5",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {},
7
+ "author": "qingting_tech",
8
+ "dependencies": {}
9
+ }
File without changes
@@ -0,0 +1,108 @@
1
+ /* Mopai 标准化样式定义 */
2
+ :root{
3
+ /* color */
4
+ --mc-main-color: #00B9EF;
5
+ --mc-title-color: #142D4C;
6
+ --mc-subtitle-color: #828B97;
7
+ --mc-placeholder-color: #A3AEBC;
8
+ --mc-primary-text-color: #00ADDF;
9
+ --mc-warning-color: #FD6B6D;
10
+ --mc-red-tag-text-color: #B84545;
11
+ --mc-special-number-color: #DF8400;
12
+ --mc-background-color: #F5F8FC;
13
+ --mc-split-color: #DCE4ED;
14
+ --mc-tab-color: #DCE4ED;
15
+ --mc-normal-font-color: #0A1830;
16
+ --mc-border-color: #F5F8FC;
17
+ --mc-checkbox-disabled-background: var(--mc-split-color);
18
+ --mc-disabled-input-background: #EAEEF3;
19
+ --mc-error-color: #FF4D4F;
20
+ --mc-collapse-header-bg-color: #6898A6;
21
+
22
+ /* gradient color */
23
+ --mc-gradient-blue-light: #83C3FB;
24
+ --mc-gradient-blue-deep: #446DEA;
25
+ --mc-gradient-blue-2-light: #B1DBFF;
26
+ --mc-gradient-blue-2-deep: #7294FF;
27
+ --mc-gradient-blue-3-light: #88C8FF;
28
+ --mc-gradient-blue-3-deep: #1444D8;
29
+
30
+ --mc-gradient-red-light: #ED866A;
31
+ --mc-gradient-red-deep: #E8361A;
32
+
33
+ --mc-gradient-purple-light: #9F97FE;
34
+ --mc-gradient-purple-deep: #7138EC;
35
+
36
+ --mc-gradient-origin-light: #F1BC61;
37
+ --mc-gradient-origin-deep: #E8701A;
38
+
39
+ --mc-gradient-green-light: #7AD48C;
40
+ --mc-gradient-green-deep: #27B111;
41
+
42
+ /* font */
43
+ --mc-title-size: 18px;
44
+ --mc-subtitle-size: 16px;
45
+ --mc-normal-size: 14px;
46
+ --mc-small-size: 12px;
47
+
48
+ --mc-title-line-height: 26px;
49
+ --mc-subtitle-line-height: 24px;
50
+ --mc-content-line-height: 22px;
51
+ --mc-explain-line-height: 20px;
52
+
53
+ /* button */
54
+ --mc-button-normal-bg: linear-gradient(60.7deg, var(--mc-gradient-blue-light), var(--mc-gradient-blue-deep));
55
+ --mc-button-hover-bg: linear-gradient(60.7deg, var(--mc-gradient-blue-2-light), var(--mc-gradient-blue-2-deep));
56
+ --mc-button-active-bg: linear-gradient(60.7deg, var(--mc-gradient-blue-3-light), var(--mc-gradient-blue-3-deep));
57
+
58
+ --mc-button-disabled-text: #A3AEBC;
59
+ --mc-button-disabled-bg: #EAEEF3;
60
+
61
+ --mc-button-warning-normal-text: #FF4D4F;
62
+ --mc-button-warning-normal-border: #FF4D4F;
63
+ --mc-button-warning-hover-text: #FF6668;
64
+ --mc-button-warning-hover-border: #FE7779;
65
+ --mc-button-warning-active-text: var(--mc-button-normal-warning-text);
66
+ --mc-button-warning-active-border: var(--mc-button-normal-warning-text);
67
+
68
+ --mc-button-cancel-normal-text: var(--mc-gradient-blue-deep);
69
+ --mc-button-cancel-normal-border: var(--mc-gradient-blue-deep);
70
+ --mc-button-cancel-hover-text: var(--mc-gradient-blue-2-deep);
71
+ --mc-button-cancel-hover-border: var(--mc-gradient-blue-2-deep);
72
+ --mc-button-cancel-active-text: var(--mc-gradient-blue-deep);
73
+ --mc-button-cancel-active-border: var(--mc-gradient-blue-deep);
74
+
75
+ --mc-button-inverse-normal-text: var(--mc-gradient-blue-deep);
76
+ --mc-button-inverse-normal-border: var(--mc-gradient-blue-deep);
77
+ --mc-button-inverse-hover-text: var(--mc-gradient-blue-2-deep);
78
+ --mc-button-inverse-hover-border: var(--mc-gradient-blue-2-deep);
79
+ --mc-button-inverse-active-text: var(--mc-gradient-blue-deep);
80
+ --mc-button-inverse-active-border: var(--mc-gradient-blue-deep);
81
+
82
+ --mc-link-normal-color: #00ADDF;
83
+ --mc-link-hover-color: var(--mc-main-color);
84
+ --mc-link-active-color: var(--mc-link-normal-color);
85
+ --mc-link-disabled-color: #A3AEBC;
86
+
87
+ /* float layer */
88
+ --mc-float-layer-box-shadow: 0px 1px 8px 2px rgba(104, 152, 166, .24);
89
+ --mc-float-layer-border-radius: 8px;
90
+
91
+ /* label */
92
+ --mc-label-default-text-color: #A3AEBC;
93
+ --mc-label-default-bg-color: #F5F8FC;
94
+
95
+ --mc-label-red-text-color: #B84545;
96
+ --mc-label-red-bg-color: #FAEAEA;
97
+
98
+ --mc-label-blue-text-color: #00ADDF;
99
+ --mc-label-blue-bg-color: #E7FAFF;
100
+
101
+ --mc-label-yellow-text-color: #D47802;
102
+ --mc-label-yellow-bg-color: #FBF0DB;
103
+
104
+ --mc-label-green-text-color: #3DB194;
105
+ --mc-label-green-bg-color: #EAFAF6;
106
+
107
+ --mc-tooltip-bg-color: rgba(0, 0, 0, 0.6);
108
+ }
@@ -0,0 +1,55 @@
1
+ export const deepCopy = data => {
2
+ let d
3
+ if (typeof data === 'object') {
4
+ if (Array.isArray(data)) {
5
+ d = []
6
+ for (let i = 0, len = data.length; i < len; i++) d[i] = deepCopy(data[i])
7
+ } else if (data === null) {
8
+ d = null
9
+ } else if (data.constructor === RegExp) {
10
+ d = data
11
+ } else if (Object.keys(data).length) {
12
+ d = {}
13
+ for (const key in data) d[key] = deepCopy(data[key])
14
+ } else {
15
+ d = data
16
+ }
17
+ } else {
18
+ d = data
19
+ }
20
+ return d
21
+ }
22
+
23
+ export const _uuid = () => {
24
+ let s = Date.now() + parseInt(Math.random() * 365 * 1000)
25
+ s = s.toString()
26
+ return s.substr(s.length - 5)
27
+
28
+ }
29
+
30
+ export const dateFormat = (time, format) => {
31
+ if(time){
32
+ const _t = typeof time === 'object'? time : typeof time === 'number'? new Date(time) : new Date(time.replace('-', '/'))
33
+ let formatStr = format
34
+ const o = {
35
+ 'M+': _t.getMonth() + 1, //month
36
+ 'd+': _t.getDate(), //day
37
+ 'h+': _t.getHours(), //hour
38
+ 'm+': _t.getMinutes(), //minute
39
+ 's+': _t.getSeconds(), //second
40
+ 'q+': Math.floor((_t.getMonth() + 3) / 3), //quarter
41
+ 'S': _t.getMilliseconds() //millisecond
42
+ };
43
+ if (/(y+)/.test(formatStr)){
44
+ formatStr = format.replace(RegExp.$1, (String(_t.getFullYear())).substr(4 - RegExp.$1.length))
45
+ }
46
+ for (const k in o) {
47
+ if (new RegExp('(' + k + ')').test(format)) {
48
+ formatStr = formatStr.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : ('00' + o[k]).substr((String(o[k])).length))
49
+ }
50
+ }
51
+ return formatStr
52
+ } else {
53
+ return ''
54
+ }
55
+ }
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "qtsk-vue3",
3
+ "version": "0.0.5",
4
+ "description": "vue3版组件库",
5
+ "main": "./package/index.js",
6
+ "scripts": {
7
+ "patch": "node publish/build.js patch",
8
+ "minor": "node publish/build.js minor",
9
+ "major": "node publish/build.js major"
10
+ },
11
+ "keywords": [
12
+ "qingtingzhiyun",
13
+ "qtzy"
14
+ ],
15
+ "files": [
16
+ "package"
17
+ ],
18
+ "author": "qingting_tech",
19
+ "license": "MIT",
20
+ "dependencies": {}
21
+ }