wui-components-v2 1.2.45 → 1.2.48
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.
|
@@ -39,6 +39,26 @@ const props = defineProps({
|
|
|
39
39
|
type: Boolean,
|
|
40
40
|
default: true,
|
|
41
41
|
},
|
|
42
|
+
// 是否显示搜索栏,默认不显示
|
|
43
|
+
showSearchBar: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false,
|
|
46
|
+
},
|
|
47
|
+
// 是否显示轮播图,默认不显示
|
|
48
|
+
showBannerCarousel: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
// 是否显示快捷菜单,默认不显示
|
|
53
|
+
showSectionMenus: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
default: false,
|
|
56
|
+
},
|
|
57
|
+
// 是否显示统计,默认不显示
|
|
58
|
+
showQuickPanel: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
default: false,
|
|
61
|
+
},
|
|
42
62
|
// 菜单网格列数,调用方可覆盖默认 4 列
|
|
43
63
|
column: {
|
|
44
64
|
type: Number,
|
|
@@ -104,13 +124,13 @@ onMounted(() => {
|
|
|
104
124
|
<!-- 自定义顶部图片插槽:直接渲染在可滚动内容区顶部,避免被当作 z-paging 不存在的 topImg 插槽而丢弃 -->
|
|
105
125
|
<slot name="topImg" />
|
|
106
126
|
<!-- 菜单搜索 -->
|
|
107
|
-
<searchBar v-if="themeConfig?.showHomePage" />
|
|
127
|
+
<searchBar v-if="themeConfig?.showHomePage && props.showSearchBar" />
|
|
108
128
|
<!-- 轮播图 -->
|
|
109
|
-
<bannerCarousel v-if="themeConfig?.showHomePage" />
|
|
129
|
+
<bannerCarousel v-if="themeConfig?.showHomePage && props.showBannerCarousel" />
|
|
110
130
|
<!-- 快捷菜单 -->
|
|
111
|
-
<sectionMenus v-if="themeConfig?.showHomePage" />
|
|
131
|
+
<sectionMenus v-if="themeConfig?.showHomePage && props.showSectionMenus" />
|
|
112
132
|
<!-- 统计 -->
|
|
113
|
-
<quickPanel v-if="themeConfig?.showHomePage" />
|
|
133
|
+
<quickPanel v-if="themeConfig?.showHomePage && props.showQuickPanel" />
|
|
114
134
|
<!-- 消息 -->
|
|
115
135
|
<!-- <wuiNotifyInfo /> -->
|
|
116
136
|
|
|
@@ -163,7 +183,7 @@ onMounted(() => {
|
|
|
163
183
|
>
|
|
164
184
|
<view
|
|
165
185
|
class="menu-icon-wrapper flex items-center justify-center"
|
|
166
|
-
:style="{ background: subItem.themeColor }"
|
|
186
|
+
:style="{ background: subItem.themeColor || currentThemeColor.primary }"
|
|
167
187
|
>
|
|
168
188
|
<text class="menu-icon !text-xl iconfont" :class="[subItem.appIcon || 'i-carbon:grid']" />
|
|
169
189
|
<view class="icon-shine" />
|
|
@@ -145,20 +145,14 @@ const listenDuration = ref(2) // 单次听音时长,默认2秒
|
|
|
145
145
|
const sensor = ref(0) // 传感器在线状态 1:在线 0:离线
|
|
146
146
|
// 传感器编号:优先外部传入 prop,其次本地缓存 sensorCode,再尝试从 userInfo 缓存读取
|
|
147
147
|
const sensorCode = ref(
|
|
148
|
-
props.sensorCode ||
|
|
149
|
-
uni.getStorageSync('sensorCode') ||
|
|
150
|
-
uni.getStorageSync('userInfo')?.sensorCode ||
|
|
151
|
-
''
|
|
148
|
+
props.sensorCode || uni.getStorageSync('sensorCode') || uni.getStorageSync('userInfo')?.sensorCode || ''
|
|
152
149
|
)
|
|
153
150
|
|
|
154
151
|
onShow(() => {
|
|
155
152
|
// 组件内部获取用户信息(租户名称等),保持独立
|
|
156
153
|
fetchUserInfo()
|
|
157
154
|
if (!props.sensorCode) {
|
|
158
|
-
sensorCode.value =
|
|
159
|
-
uni.getStorageSync('sensorCode') ||
|
|
160
|
-
uni.getStorageSync('userInfo')?.sensorCode ||
|
|
161
|
-
''
|
|
155
|
+
sensorCode.value = uni.getStorageSync('sensorCode') || uni.getStorageSync('userInfo')?.sensorCode || ''
|
|
162
156
|
}
|
|
163
157
|
// 进入页面时查询传感器在线状态
|
|
164
158
|
getSensorInfo()
|
|
@@ -290,7 +284,7 @@ function saveSensorConfig() {
|
|
|
290
284
|
</view>
|
|
291
285
|
|
|
292
286
|
<!-- 传感器状态卡片 -->
|
|
293
|
-
<view v-if="
|
|
287
|
+
<view v-if="isYunyin" class="card-box">
|
|
294
288
|
<view class="card" :class="{ 'card-dark': isDark }">
|
|
295
289
|
<view class="item">
|
|
296
290
|
<text class="label">租户名称</text>
|