@ruixinkeji/prism-ui 1.0.0 → 1.0.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/README.md +1 -1
- package/components/PrismAIAssist/PrismAIAssist.vue +98 -98
- package/components/PrismAddressInput/PrismAddressInput.vue +597 -597
- package/components/PrismCityCascadeSelect/PrismCityCascadeSelect.vue +793 -793
- package/components/PrismCityPicker/PrismCityPicker.vue +1008 -1008
- package/components/PrismCitySelect/PrismCitySelect.vue +435 -435
- package/components/PrismCode/PrismCode.vue +749 -749
- package/components/PrismCodeInput/PrismCodeInput.vue +156 -156
- package/components/PrismDateTimePicker/PrismDateTimePicker.vue +953 -953
- package/components/PrismDropdown/PrismDropdown.vue +77 -77
- package/components/PrismGroupSticky/PrismGroupSticky.vue +352 -352
- package/components/PrismIdCardInput/PrismIdCardInput.vue +253 -253
- package/components/PrismImagePicker/PrismImagePicker.vue +457 -457
- package/components/PrismIndexBar/PrismIndexBar.vue +243 -243
- package/components/PrismLicensePlateInput/PrismLicensePlateInput.vue +1100 -1100
- package/components/PrismMusicPlayer/PrismMusicPlayer.vue +530 -530
- package/components/PrismNavBar/PrismNavBar.vue +199 -199
- package/components/PrismSecureInput/PrismSecureInput.vue +360 -360
- package/components/PrismSticky/PrismSticky.vue +173 -173
- package/components/PrismSwiper/PrismSwiper.vue +338 -338
- package/components/PrismSwitch/PrismSwitch.vue +202 -202
- package/components/PrismTabBar/PrismTabBar.vue +147 -147
- package/components/PrismTabs/PrismTabs.vue +49 -49
- package/components/PrismVoiceInput/PrismVoiceInput.vue +529 -529
- package/fonts/fa-brands-400.woff2 +0 -0
- package/fonts/fa-regular-400.woff2 +0 -0
- package/fonts/fa-solid-900.woff2 +0 -0
- package/fonts/fa-v4compatibility.woff2 +0 -0
- package/fonts/font-awesome.css +913 -0
- package/fonts/iconfont.woff2 +0 -0
- package/package.json +7 -1
- package/store/app.d.ts +21 -0
- package/store/app.js +68 -0
- package/styles/base.scss +2 -2
package/README.md
CHANGED
|
@@ -1,98 +1,98 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="prism-ai-assist" :class="{ 'dark-mode': appStore.isDarkMode }">
|
|
3
|
-
<view class="ai-btn" :class="{ 'loading': isLoading }" @click="handleClick">
|
|
4
|
-
<text class="fa" :class="isLoading ? 'fa-spinner fa-spin' : 'fa-wand-magic-sparkles'"></text>
|
|
5
|
-
<text class="ai-text">{{ isLoading ? loadingText : text }}</text>
|
|
6
|
-
</view>
|
|
7
|
-
</view>
|
|
8
|
-
</template>
|
|
9
|
-
|
|
10
|
-
<script setup>
|
|
11
|
-
import { ref } from 'vue';
|
|
12
|
-
import { useAppStore } from '@/store/app';
|
|
13
|
-
|
|
14
|
-
const props = defineProps({
|
|
15
|
-
text: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: 'AI帮我完善'
|
|
18
|
-
},
|
|
19
|
-
loadingText: {
|
|
20
|
-
type: String,
|
|
21
|
-
default: 'AI优化中...'
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const emit = defineEmits(['click']);
|
|
26
|
-
|
|
27
|
-
const appStore = useAppStore();
|
|
28
|
-
const isLoading = ref(false);
|
|
29
|
-
|
|
30
|
-
function handleClick() {
|
|
31
|
-
if (isLoading.value) return;
|
|
32
|
-
emit('click', {
|
|
33
|
-
setLoading: (val) => {
|
|
34
|
-
isLoading.value = val;
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// 暴露方法给父组件
|
|
40
|
-
defineExpose({
|
|
41
|
-
setLoading: (val) => {
|
|
42
|
-
isLoading.value = val;
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
</script>
|
|
46
|
-
|
|
47
|
-
<style lang="scss">
|
|
48
|
-
.prism-ai-assist {
|
|
49
|
-
display: inline-flex;
|
|
50
|
-
|
|
51
|
-
.ai-btn {
|
|
52
|
-
height: 64rpx;
|
|
53
|
-
padding: 0 4rpx;
|
|
54
|
-
background: transparent;
|
|
55
|
-
display: inline-flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
gap: 12rpx;
|
|
58
|
-
font-size: 30rpx;
|
|
59
|
-
font-weight: 700;
|
|
60
|
-
cursor: pointer;
|
|
61
|
-
transition: all 0.2s ease;
|
|
62
|
-
|
|
63
|
-
&:active {
|
|
64
|
-
opacity: 0.7;
|
|
65
|
-
transform: scale(0.98);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
&.loading {
|
|
69
|
-
pointer-events: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.fa {
|
|
73
|
-
font-size: 36rpx;
|
|
74
|
-
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 25%, #c44569 50%, #764ba2 75%, #667eea 100%);
|
|
75
|
-
-webkit-background-clip: text;
|
|
76
|
-
-webkit-text-fill-color: transparent;
|
|
77
|
-
background-clip: text;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.ai-text {
|
|
81
|
-
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 25%, #c44569 50%, #764ba2 75%, #667eea 100%);
|
|
82
|
-
-webkit-background-clip: text;
|
|
83
|
-
-webkit-text-fill-color: transparent;
|
|
84
|
-
background-clip: text;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// 旋转动画
|
|
90
|
-
@keyframes fa-spin {
|
|
91
|
-
0% { transform: rotate(0deg); }
|
|
92
|
-
100% { transform: rotate(360deg); }
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.fa-spin {
|
|
96
|
-
animation: fa-spin 1s infinite linear;
|
|
97
|
-
}
|
|
98
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<view class="prism-ai-assist" :class="{ 'dark-mode': appStore.isDarkMode }">
|
|
3
|
+
<view class="ai-btn" :class="{ 'loading': isLoading }" @click="handleClick">
|
|
4
|
+
<text class="fa" :class="isLoading ? 'fa-spinner fa-spin' : 'fa-wand-magic-sparkles'"></text>
|
|
5
|
+
<text class="ai-text">{{ isLoading ? loadingText : text }}</text>
|
|
6
|
+
</view>
|
|
7
|
+
</view>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script setup>
|
|
11
|
+
import { ref } from 'vue';
|
|
12
|
+
import { useAppStore } from '@/store/app';
|
|
13
|
+
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
text: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: 'AI帮我完善'
|
|
18
|
+
},
|
|
19
|
+
loadingText: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'AI优化中...'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const emit = defineEmits(['click']);
|
|
26
|
+
|
|
27
|
+
const appStore = useAppStore();
|
|
28
|
+
const isLoading = ref(false);
|
|
29
|
+
|
|
30
|
+
function handleClick() {
|
|
31
|
+
if (isLoading.value) return;
|
|
32
|
+
emit('click', {
|
|
33
|
+
setLoading: (val) => {
|
|
34
|
+
isLoading.value = val;
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// 暴露方法给父组件
|
|
40
|
+
defineExpose({
|
|
41
|
+
setLoading: (val) => {
|
|
42
|
+
isLoading.value = val;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="scss">
|
|
48
|
+
.prism-ai-assist {
|
|
49
|
+
display: inline-flex;
|
|
50
|
+
|
|
51
|
+
.ai-btn {
|
|
52
|
+
height: 64rpx;
|
|
53
|
+
padding: 0 4rpx;
|
|
54
|
+
background: transparent;
|
|
55
|
+
display: inline-flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 12rpx;
|
|
58
|
+
font-size: 30rpx;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
transition: all 0.2s ease;
|
|
62
|
+
|
|
63
|
+
&:active {
|
|
64
|
+
opacity: 0.7;
|
|
65
|
+
transform: scale(0.98);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.loading {
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.fa {
|
|
73
|
+
font-size: 36rpx;
|
|
74
|
+
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 25%, #c44569 50%, #764ba2 75%, #667eea 100%);
|
|
75
|
+
-webkit-background-clip: text;
|
|
76
|
+
-webkit-text-fill-color: transparent;
|
|
77
|
+
background-clip: text;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.ai-text {
|
|
81
|
+
background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 25%, #c44569 50%, #764ba2 75%, #667eea 100%);
|
|
82
|
+
-webkit-background-clip: text;
|
|
83
|
+
-webkit-text-fill-color: transparent;
|
|
84
|
+
background-clip: text;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// 旋转动画
|
|
90
|
+
@keyframes fa-spin {
|
|
91
|
+
0% { transform: rotate(0deg); }
|
|
92
|
+
100% { transform: rotate(360deg); }
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.fa-spin {
|
|
96
|
+
animation: fa-spin 1s infinite linear;
|
|
97
|
+
}
|
|
98
|
+
</style>
|