@xlui/xux-ui 0.1.0 → 0.2.1
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.
- package/LICENSE +194 -0
- package/README.md +57 -10
- package/README.zip +0 -0
- package/dist/index.css +1 -1
- package/dist/index.js +87 -20
- package/dist/index.mjs +3236 -1474
- package/package.json +63 -57
- package/src/components/Accordion/index.vue +2 -0
- package/src/components/Button/index.vue +81 -34
- package/src/components/DateTimePicker/index.vue +919 -0
- package/src/components/Modal/index.vue +18 -12
- package/src/components/Radio/index.vue +620 -0
- package/src/components/Score/index.vue +264 -0
- package/src/components/Tooltips/index.vue +374 -0
- package/src/composables/Alert.ts +238 -0
- package/src/composables/DateTime.ts +391 -0
- package/src/index.ts +11 -0
package/package.json
CHANGED
@@ -1,57 +1,63 @@
|
|
1
|
-
{
|
2
|
-
"name": "@xlui/xux-ui",
|
3
|
-
"version": "0.1
|
4
|
-
"description": "VUE3 电商组件库",
|
5
|
-
"author": "leheya",
|
6
|
-
"license": "MIT",
|
7
|
-
"main": "./dist/index.js",
|
8
|
-
"module": "./dist/index.mjs",
|
9
|
-
"types": "./dist/index.d.ts",
|
10
|
-
"exports": {
|
11
|
-
".": {
|
12
|
-
"types": "./dist/index.d.ts",
|
13
|
-
"import": "./dist/index.mjs",
|
14
|
-
"require": "./dist/index.js"
|
15
|
-
},
|
16
|
-
"
|
17
|
-
|
18
|
-
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
"
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
"
|
31
|
-
|
32
|
-
|
33
|
-
"
|
34
|
-
"
|
35
|
-
"
|
36
|
-
"ui-
|
37
|
-
],
|
38
|
-
"repository": {
|
39
|
-
"type": "git",
|
40
|
-
"url": "https://gitee.com/leheya/xux"
|
41
|
-
},
|
42
|
-
"homepage": "https://gitee.com/leheya/xux",
|
43
|
-
"bugs": {
|
44
|
-
"url": "https://gitee.com/leheya/xux/issues"
|
45
|
-
},
|
46
|
-
"
|
47
|
-
"
|
48
|
-
},
|
49
|
-
"
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
"vue": "^
|
54
|
-
"
|
55
|
-
|
56
|
-
|
57
|
-
|
1
|
+
{
|
2
|
+
"name": "@xlui/xux-ui",
|
3
|
+
"version": "0.2.1",
|
4
|
+
"description": "VUE3 电商组件库",
|
5
|
+
"author": "leheya",
|
6
|
+
"license": "MIT",
|
7
|
+
"main": "./dist/index.js",
|
8
|
+
"module": "./dist/index.mjs",
|
9
|
+
"types": "./dist/index.d.ts",
|
10
|
+
"exports": {
|
11
|
+
".": {
|
12
|
+
"types": "./dist/index.d.ts",
|
13
|
+
"import": "./dist/index.mjs",
|
14
|
+
"require": "./dist/index.js"
|
15
|
+
},
|
16
|
+
"./dist/index.css": "./dist/index.css",
|
17
|
+
"./style.css": "./dist/index.css",
|
18
|
+
"./*": {
|
19
|
+
"types": "./dist/*.d.ts",
|
20
|
+
"import": "./dist/*.mjs",
|
21
|
+
"require": "./dist/*.js"
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"files": [
|
25
|
+
"dist",
|
26
|
+
"src",
|
27
|
+
"README.md"
|
28
|
+
],
|
29
|
+
"keywords": [
|
30
|
+
"vue3",
|
31
|
+
"vue3-ui",
|
32
|
+
"components",
|
33
|
+
"ui-library",
|
34
|
+
"ecommerce",
|
35
|
+
"电商组件",
|
36
|
+
"ui-components"
|
37
|
+
],
|
38
|
+
"repository": {
|
39
|
+
"type": "git",
|
40
|
+
"url": "https://gitee.com/leheya/xux"
|
41
|
+
},
|
42
|
+
"homepage": "https://gitee.com/leheya/xux",
|
43
|
+
"bugs": {
|
44
|
+
"url": "https://gitee.com/leheya/xux/issues"
|
45
|
+
},
|
46
|
+
"dependencies": {
|
47
|
+
"dayjs": "^1.11.10"
|
48
|
+
},
|
49
|
+
"peerDependencies": {
|
50
|
+
"vue": "^3.3.0"
|
51
|
+
},
|
52
|
+
"devDependencies": {
|
53
|
+
"@vitejs/plugin-vue": "^5.0.3",
|
54
|
+
"typescript": "^5.3.3",
|
55
|
+
"vite": "^5.0.11",
|
56
|
+
"vue": "^3.4.15",
|
57
|
+
"vue-tsc": "^1.8.27"
|
58
|
+
},
|
59
|
+
"scripts": {
|
60
|
+
"dev": "vite build --watch",
|
61
|
+
"build": "vite build"
|
62
|
+
}
|
63
|
+
}
|
@@ -12,6 +12,7 @@
|
|
12
12
|
'is-disabled': disabled || item.disabled
|
13
13
|
}"
|
14
14
|
>
|
15
|
+
|
15
16
|
<button
|
16
17
|
@click="toggle(index)"
|
17
18
|
class="accordion-header"
|
@@ -49,6 +50,7 @@
|
|
49
50
|
</template>
|
50
51
|
|
51
52
|
<script setup lang="ts">
|
53
|
+
|
52
54
|
import { withDefaults, watch, nextTick, ref } from 'vue'
|
53
55
|
|
54
56
|
/**
|
@@ -86,9 +86,9 @@ interface Props {
|
|
86
86
|
*/
|
87
87
|
round?: boolean
|
88
88
|
/**
|
89
|
-
*
|
89
|
+
* 是否为幽灵按钮(透明背景,只有边框)
|
90
90
|
*/
|
91
|
-
|
91
|
+
ghost?: boolean
|
92
92
|
}
|
93
93
|
|
94
94
|
const props = withDefaults(defineProps<Props>(), {
|
@@ -98,7 +98,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|
98
98
|
loading: false,
|
99
99
|
block: false,
|
100
100
|
round: false,
|
101
|
-
|
101
|
+
ghost: false
|
102
102
|
})
|
103
103
|
|
104
104
|
const emit = defineEmits<{
|
@@ -131,7 +131,7 @@ const buttonClass = computed(() => {
|
|
131
131
|
'x-btn-loading': props.loading,
|
132
132
|
'x-btn-block': props.block,
|
133
133
|
'x-btn-round': props.round,
|
134
|
-
'x-btn-
|
134
|
+
'x-btn-ghost': props.ghost,
|
135
135
|
}
|
136
136
|
]
|
137
137
|
})
|
@@ -340,53 +340,100 @@ function handleMouseDown(event: MouseEvent) {
|
|
340
340
|
color: var(--x-color-primary, #ff6b35);
|
341
341
|
}
|
342
342
|
|
343
|
-
/*
|
344
|
-
.x-btn-
|
345
|
-
background-color:
|
346
|
-
|
347
|
-
color:
|
343
|
+
/* 幽灵按钮 - Ghost Button */
|
344
|
+
.x-btn-ghost.x-btn-default {
|
345
|
+
background-color: transparent;
|
346
|
+
background: transparent;
|
347
|
+
border-color: var(--x-color-gray-300, #cacaca);
|
348
|
+
color: var(--x-color-black, #1a1a1a);
|
349
|
+
box-shadow: none;
|
348
350
|
}
|
349
351
|
|
350
|
-
.x-btn-
|
351
|
-
background-color: rgba(26, 26, 26, 0.
|
352
|
-
|
353
|
-
color:
|
352
|
+
.x-btn-ghost.x-btn-default:hover:not(.x-btn-disabled):not(.x-btn-loading) {
|
353
|
+
background-color: rgba(26, 26, 26, 0.05);
|
354
|
+
background: rgba(26, 26, 26, 0.05);
|
355
|
+
border-color: var(--x-color-gray-400, #a0a0a0);
|
354
356
|
}
|
355
357
|
|
356
|
-
.x-btn-
|
357
|
-
background-color:
|
358
|
-
|
359
|
-
color:
|
358
|
+
.x-btn-ghost.x-btn-primary {
|
359
|
+
background-color: transparent;
|
360
|
+
background: transparent;
|
361
|
+
border-color: var(--x-color-primary, #ff6b35);
|
362
|
+
color: var(--x-color-primary, #ff6b35);
|
363
|
+
box-shadow: none;
|
360
364
|
}
|
361
365
|
|
362
|
-
.x-btn-
|
363
|
-
background-color: rgba(
|
366
|
+
.x-btn-ghost.x-btn-primary:hover:not(.x-btn-disabled):not(.x-btn-loading) {
|
367
|
+
background-color: rgba(255, 107, 53, 0.1);
|
368
|
+
background: rgba(255, 107, 53, 0.1);
|
369
|
+
border-color: var(--x-color-primary, #ff6b35);
|
370
|
+
box-shadow: none;
|
371
|
+
}
|
372
|
+
|
373
|
+
.x-btn-ghost.x-btn-success {
|
374
|
+
background-color: transparent;
|
375
|
+
background: transparent;
|
364
376
|
border-color: var(--x-color-success, #10b981);
|
365
|
-
color:
|
377
|
+
color: var(--x-color-success, #10b981);
|
378
|
+
box-shadow: none;
|
366
379
|
}
|
367
380
|
|
368
|
-
.x-btn-
|
369
|
-
background-color: rgba(
|
370
|
-
|
371
|
-
color:
|
381
|
+
.x-btn-ghost.x-btn-success:hover:not(.x-btn-disabled):not(.x-btn-loading) {
|
382
|
+
background-color: rgba(16, 185, 129, 0.1);
|
383
|
+
background: rgba(16, 185, 129, 0.1);
|
384
|
+
border-color: var(--x-color-success, #10b981);
|
385
|
+
box-shadow: none;
|
372
386
|
}
|
373
387
|
|
374
|
-
.x-btn-
|
375
|
-
background-color:
|
388
|
+
.x-btn-ghost.x-btn-warning {
|
389
|
+
background-color: transparent;
|
390
|
+
background: transparent;
|
376
391
|
border-color: var(--x-color-warning, #f59e0b);
|
377
|
-
color:
|
392
|
+
color: var(--x-color-warning, #f59e0b);
|
393
|
+
box-shadow: none;
|
378
394
|
}
|
379
395
|
|
380
|
-
.x-btn-
|
381
|
-
background-color: rgba(
|
382
|
-
|
383
|
-
color:
|
396
|
+
.x-btn-ghost.x-btn-warning:hover:not(.x-btn-disabled):not(.x-btn-loading) {
|
397
|
+
background-color: rgba(245, 158, 11, 0.1);
|
398
|
+
background: rgba(245, 158, 11, 0.1);
|
399
|
+
border-color: var(--x-color-warning, #f59e0b);
|
400
|
+
box-shadow: none;
|
384
401
|
}
|
385
402
|
|
386
|
-
.x-btn-
|
387
|
-
background-color:
|
403
|
+
.x-btn-ghost.x-btn-danger {
|
404
|
+
background-color: transparent;
|
405
|
+
background: transparent;
|
388
406
|
border-color: var(--x-color-danger, #ef4444);
|
389
|
-
color:
|
407
|
+
color: var(--x-color-danger, #ef4444);
|
408
|
+
box-shadow: none;
|
409
|
+
}
|
410
|
+
|
411
|
+
.x-btn-ghost.x-btn-danger:hover:not(.x-btn-disabled):not(.x-btn-loading) {
|
412
|
+
background-color: rgba(239, 68, 68, 0.1);
|
413
|
+
background: rgba(239, 68, 68, 0.1);
|
414
|
+
border-color: var(--x-color-danger, #ef4444);
|
415
|
+
box-shadow: none;
|
416
|
+
}
|
417
|
+
|
418
|
+
/* 幽灵按钮波纹效果调整 */
|
419
|
+
.x-btn-ghost .x-btn-ripple {
|
420
|
+
background-color: rgba(0, 0, 0, 0.08);
|
421
|
+
}
|
422
|
+
|
423
|
+
.x-btn-ghost.x-btn-primary .x-btn-ripple {
|
424
|
+
background-color: rgba(255, 107, 53, 0.15);
|
425
|
+
}
|
426
|
+
|
427
|
+
.x-btn-ghost.x-btn-success .x-btn-ripple {
|
428
|
+
background-color: rgba(16, 185, 129, 0.15);
|
429
|
+
}
|
430
|
+
|
431
|
+
.x-btn-ghost.x-btn-warning .x-btn-ripple {
|
432
|
+
background-color: rgba(245, 158, 11, 0.15);
|
433
|
+
}
|
434
|
+
|
435
|
+
.x-btn-ghost.x-btn-danger .x-btn-ripple {
|
436
|
+
background-color: rgba(239, 68, 68, 0.15);
|
390
437
|
}
|
391
438
|
|
392
439
|
/* 圆角按钮 */
|