@ruixinkeji/prism-ui 1.0.0 → 1.0.2

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.
Files changed (34) hide show
  1. package/README.md +1 -1
  2. package/components/PrismAIAssist/PrismAIAssist.vue +98 -98
  3. package/components/PrismAddressInput/PrismAddressInput.vue +597 -597
  4. package/components/PrismCityCascadeSelect/PrismCityCascadeSelect.vue +793 -793
  5. package/components/PrismCityPicker/PrismCityPicker.vue +1008 -1008
  6. package/components/PrismCitySelect/PrismCitySelect.vue +435 -435
  7. package/components/PrismCode/PrismCode.vue +749 -749
  8. package/components/PrismCodeInput/PrismCodeInput.vue +156 -156
  9. package/components/PrismDateTimePicker/PrismDateTimePicker.vue +953 -953
  10. package/components/PrismDropdown/PrismDropdown.vue +77 -77
  11. package/components/PrismGroupSticky/PrismGroupSticky.vue +352 -352
  12. package/components/PrismIdCardInput/PrismIdCardInput.vue +253 -253
  13. package/components/PrismImagePicker/PrismImagePicker.vue +457 -457
  14. package/components/PrismIndexBar/PrismIndexBar.vue +243 -243
  15. package/components/PrismLicensePlateInput/PrismLicensePlateInput.vue +1100 -1100
  16. package/components/PrismMusicPlayer/PrismMusicPlayer.vue +530 -530
  17. package/components/PrismNavBar/PrismNavBar.vue +199 -199
  18. package/components/PrismSecureInput/PrismSecureInput.vue +360 -360
  19. package/components/PrismSticky/PrismSticky.vue +173 -173
  20. package/components/PrismSwiper/PrismSwiper.vue +338 -338
  21. package/components/PrismSwitch/PrismSwitch.vue +202 -202
  22. package/components/PrismTabBar/PrismTabBar.vue +147 -147
  23. package/components/PrismTabs/PrismTabs.vue +49 -49
  24. package/components/PrismVoiceInput/PrismVoiceInput.vue +529 -529
  25. package/fonts/fa-brands-400.woff2 +0 -0
  26. package/fonts/fa-regular-400.woff2 +0 -0
  27. package/fonts/fa-solid-900.woff2 +0 -0
  28. package/fonts/fa-v4compatibility.woff2 +0 -0
  29. package/fonts/font-awesome.css +913 -0
  30. package/fonts/iconfont.woff2 +0 -0
  31. package/package.json +7 -1
  32. package/store/app.d.ts +21 -0
  33. package/store/app.js +68 -0
  34. package/styles/base.scss +2 -2
@@ -1,199 +1,199 @@
1
- <template>
2
- <view class="prism-nav-bar" :class="{ 'dark-mode': appStore.isDarkMode, 'glass-effect': glass }" :style="{ paddingTop: appStore.statusBarHeight + 'px' }">
3
- <view class="nav-bar-content">
4
- <view class="nav-bar-left">
5
- <!-- 返回按钮 -->
6
- <view v-if="showBack" class="nav-bar-back" @click="handleBack">
7
- <text class="fa fa-arrow-left"></text>
8
- </view>
9
- <!-- 图标 -->
10
- <view v-if="icon" class="nav-bar-icon prism-icon" :class="iconColor">
11
- <text class="fa" :class="icon"></text>
12
- </view>
13
- <text class="nav-bar-title">{{ title }}</text>
14
- </view>
15
- <view class="nav-bar-actions">
16
- <view class="prism-icon-btn prism-icon-btn--md theme-btn" @click="handleThemeClick">
17
- <text class="fa" :class="themeIcon"></text>
18
- </view>
19
- </view>
20
- </view>
21
- </view>
22
- </template>
23
-
24
- <script setup>
25
- import { computed } from 'vue';
26
- import { useAppStore } from '@/store/app';
27
-
28
- const props = defineProps({
29
- title: {
30
- type: String,
31
- required: true
32
- },
33
- icon: {
34
- type: String,
35
- default: ''
36
- },
37
- iconColor: {
38
- type: String,
39
- default: 'blue'
40
- },
41
- glass: {
42
- type: Boolean,
43
- default: true
44
- },
45
- showBack: {
46
- type: Boolean,
47
- default: false
48
- }
49
- });
50
-
51
- const appStore = useAppStore();
52
-
53
- // 主题图标
54
- const themeIcon = computed(() => {
55
- const icons = {
56
- 'light': 'fa-sun',
57
- 'dark': 'fa-moon',
58
- 'system': 'fa-circle-half-stroke'
59
- };
60
- return icons[appStore.themeMode] || 'fa-moon';
61
- });
62
-
63
- function handleThemeClick() {
64
- appStore.toggleTheme();
65
- }
66
-
67
- function handleBack() {
68
- const pages = getCurrentPages();
69
- if (pages.length > 1) {
70
- // 有历史记录,正常返回
71
- uni.navigateBack();
72
- } else {
73
- // 没有历史记录,返回首页
74
- uni.reLaunch({ url: '/pages/index/index' });
75
- }
76
- }
77
- </script>
78
-
79
- <style lang="scss">
80
- .prism-nav-bar {
81
- position: fixed;
82
- top: 0;
83
- left: 0;
84
- right: 0;
85
- z-index: 100;
86
- background: var(--prism-bg-color-card);
87
- border-bottom: 1rpx solid var(--prism-border-color-light);
88
-
89
- /* #ifndef H5 */
90
- &.glass-effect {
91
- background: rgba(255, 255, 255, 0.4);
92
- backdrop-filter: saturate(180%) blur(40px);
93
- -webkit-backdrop-filter: saturate(180%) blur(40px);
94
- border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
95
- }
96
- /* #endif */
97
- }
98
-
99
- .nav-bar-content {
100
- height: 88rpx;
101
- display: flex;
102
- align-items: center;
103
- justify-content: space-between;
104
- padding: 0 32rpx;
105
- }
106
-
107
- .nav-bar-left {
108
- display: flex;
109
- align-items: center;
110
- gap: 16rpx;
111
- margin-top: -6rpx;
112
- }
113
-
114
- .nav-bar-back {
115
- width: 56rpx;
116
- height: 56rpx;
117
- display: flex;
118
- align-items: center;
119
- justify-content: center;
120
- border-radius: 50%;
121
- flex-shrink: 0;
122
- transition: all 0.2s;
123
-
124
- &:active {
125
- opacity: 0.7;
126
- transform: scale(0.95);
127
- }
128
-
129
- .fa {
130
- font-size: 28rpx;
131
- color: var(--prism-text-primary);
132
- }
133
- }
134
-
135
- .nav-bar-icon {
136
- width: 56rpx;
137
- height: 56rpx;
138
- display: flex;
139
- align-items: center;
140
- justify-content: center;
141
- border-radius: 16rpx;
142
- flex-shrink: 0;
143
-
144
- .fa {
145
- font-size: 32rpx;
146
- line-height: 1;
147
- }
148
- }
149
-
150
- .nav-bar-title {
151
- font-size: 32rpx;
152
- font-weight: 600;
153
- color: var(--prism-text-primary);
154
- line-height: 1;
155
- }
156
-
157
- .nav-bar-actions {
158
- display: flex;
159
- align-items: center;
160
- gap: 12rpx;
161
- margin-top: -6rpx;
162
-
163
- /* 小程序环境下预留胶囊位置 */
164
- /* #ifdef MP */
165
- margin-right: 160rpx;
166
- /* #endif */
167
- }
168
-
169
- /* 主题切换按钮 */
170
- .theme-btn {
171
- width: 56rpx;
172
- height: 56rpx;
173
- border-radius: 288rpx;
174
- background: var(--prism-bg-color-icon-btn);
175
- border: 1rpx solid var(--prism-border-color-light);
176
- display: flex;
177
- align-items: center;
178
- justify-content: center;
179
- transition: all 0.2s;
180
-
181
- &:active {
182
- opacity: 0.7;
183
- transform: scale(0.96);
184
- }
185
-
186
- .fa {
187
- color: var(--prism-warning-color);
188
- font-size: 24rpx;
189
- }
190
- }
191
-
192
- /* 深色模式 - 毛玻璃效果 */
193
- /* #ifndef H5 */
194
- .prism-nav-bar.dark-mode.glass-effect {
195
- background: rgba(26, 26, 26, 0.4);
196
- border-bottom-color: rgba(255, 255, 255, 0.12);
197
- }
198
- /* #endif */
199
- </style>
1
+ <template>
2
+ <view class="prism-nav-bar" :class="{ 'dark-mode': appStore.isDarkMode, 'glass-effect': glass }" :style="{ paddingTop: appStore.statusBarHeight + 'px' }">
3
+ <view class="nav-bar-content">
4
+ <view class="nav-bar-left">
5
+ <!-- 返回按钮 -->
6
+ <view v-if="showBack" class="nav-bar-back" @click="handleBack">
7
+ <text class="fa fa-arrow-left"></text>
8
+ </view>
9
+ <!-- 图标 -->
10
+ <view v-if="icon" class="nav-bar-icon prism-icon" :class="iconColor">
11
+ <text class="fa" :class="icon"></text>
12
+ </view>
13
+ <text class="nav-bar-title">{{ title }}</text>
14
+ </view>
15
+ <view class="nav-bar-actions">
16
+ <view class="prism-icon-btn prism-icon-btn--md theme-btn" @click="handleThemeClick">
17
+ <text class="fa" :class="themeIcon"></text>
18
+ </view>
19
+ </view>
20
+ </view>
21
+ </view>
22
+ </template>
23
+
24
+ <script setup>
25
+ import { computed } from 'vue';
26
+ import { useAppStore } from '@/store/app';
27
+
28
+ const props = defineProps({
29
+ title: {
30
+ type: String,
31
+ required: true
32
+ },
33
+ icon: {
34
+ type: String,
35
+ default: ''
36
+ },
37
+ iconColor: {
38
+ type: String,
39
+ default: 'blue'
40
+ },
41
+ glass: {
42
+ type: Boolean,
43
+ default: true
44
+ },
45
+ showBack: {
46
+ type: Boolean,
47
+ default: false
48
+ }
49
+ });
50
+
51
+ const appStore = useAppStore();
52
+
53
+ // 主题图标
54
+ const themeIcon = computed(() => {
55
+ const icons = {
56
+ 'light': 'fa-sun',
57
+ 'dark': 'fa-moon',
58
+ 'system': 'fa-circle-half-stroke'
59
+ };
60
+ return icons[appStore.themeMode] || 'fa-moon';
61
+ });
62
+
63
+ function handleThemeClick() {
64
+ appStore.toggleTheme();
65
+ }
66
+
67
+ function handleBack() {
68
+ const pages = getCurrentPages();
69
+ if (pages.length > 1) {
70
+ // 有历史记录,正常返回
71
+ uni.navigateBack();
72
+ } else {
73
+ // 没有历史记录,返回首页
74
+ uni.reLaunch({ url: '/pages/index/index' });
75
+ }
76
+ }
77
+ </script>
78
+
79
+ <style lang="scss">
80
+ .prism-nav-bar {
81
+ position: fixed;
82
+ top: 0;
83
+ left: 0;
84
+ right: 0;
85
+ z-index: 100;
86
+ background: var(--prism-bg-color-card);
87
+ border-bottom: 1rpx solid var(--prism-border-color-light);
88
+
89
+ /* #ifndef H5 */
90
+ &.glass-effect {
91
+ background: rgba(255, 255, 255, 0.4);
92
+ backdrop-filter: saturate(180%) blur(40px);
93
+ -webkit-backdrop-filter: saturate(180%) blur(40px);
94
+ border-bottom: 1rpx solid rgba(0, 0, 0, 0.1);
95
+ }
96
+ /* #endif */
97
+ }
98
+
99
+ .nav-bar-content {
100
+ height: 88rpx;
101
+ display: flex;
102
+ align-items: center;
103
+ justify-content: space-between;
104
+ padding: 0 32rpx;
105
+ }
106
+
107
+ .nav-bar-left {
108
+ display: flex;
109
+ align-items: center;
110
+ gap: 16rpx;
111
+ margin-top: -6rpx;
112
+ }
113
+
114
+ .nav-bar-back {
115
+ width: 56rpx;
116
+ height: 56rpx;
117
+ display: flex;
118
+ align-items: center;
119
+ justify-content: center;
120
+ border-radius: 50%;
121
+ flex-shrink: 0;
122
+ transition: all 0.2s;
123
+
124
+ &:active {
125
+ opacity: 0.7;
126
+ transform: scale(0.95);
127
+ }
128
+
129
+ .fa {
130
+ font-size: 28rpx;
131
+ color: var(--prism-text-primary);
132
+ }
133
+ }
134
+
135
+ .nav-bar-icon {
136
+ width: 56rpx;
137
+ height: 56rpx;
138
+ display: flex;
139
+ align-items: center;
140
+ justify-content: center;
141
+ border-radius: 16rpx;
142
+ flex-shrink: 0;
143
+
144
+ .fa {
145
+ font-size: 32rpx;
146
+ line-height: 1;
147
+ }
148
+ }
149
+
150
+ .nav-bar-title {
151
+ font-size: 32rpx;
152
+ font-weight: 600;
153
+ color: var(--prism-text-primary);
154
+ line-height: 1;
155
+ }
156
+
157
+ .nav-bar-actions {
158
+ display: flex;
159
+ align-items: center;
160
+ gap: 12rpx;
161
+ margin-top: -6rpx;
162
+
163
+ /* 小程序环境下预留胶囊位置 */
164
+ /* #ifdef MP */
165
+ margin-right: 160rpx;
166
+ /* #endif */
167
+ }
168
+
169
+ /* 主题切换按钮 */
170
+ .theme-btn {
171
+ width: 56rpx;
172
+ height: 56rpx;
173
+ border-radius: 288rpx;
174
+ background: var(--prism-bg-color-icon-btn);
175
+ border: 1rpx solid var(--prism-border-color-light);
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: center;
179
+ transition: all 0.2s;
180
+
181
+ &:active {
182
+ opacity: 0.7;
183
+ transform: scale(0.96);
184
+ }
185
+
186
+ .fa {
187
+ color: var(--prism-warning-color);
188
+ font-size: 24rpx;
189
+ }
190
+ }
191
+
192
+ /* 深色模式 - 毛玻璃效果 */
193
+ /* #ifndef H5 */
194
+ .prism-nav-bar.dark-mode.glass-effect {
195
+ background: rgba(26, 26, 26, 0.4);
196
+ border-bottom-color: rgba(255, 255, 255, 0.12);
197
+ }
198
+ /* #endif */
199
+ </style>