chore: 初始开源发布
iotlcm-app:小程序端 + 用户端服务。 - app/:uni-app 小程序前端(基于 unibest,MIT) - 微信 AppID → YOUR_WX_APPID,uni-app AppID → __UNI__YOURAPPID - 内网后端地址 → admin.iotlcm.example.com - 应用标题与 unibest 模板 README 重写(保留上游致谢与 MIT 声明) - server/:GoFrame 用户端服务(基于 XiuAdmin,Apache-2.0) - module xiuadmin → git.5iot.com/iotlcm-public/iotlcm-app(360 文件) - 支付回调地址 → app.iotlcm.example.com,商户名与应用名泛化 - 真实手机号 → 合法 11 位编造号(保留号段前 3 位 + 后 4 位) - 依赖号码尾部的断言同步更新 - 补 server/LICENSE(Apache-2.0) - 移除内部资产:CI 触发器 - 补根 README,LF 行尾 + .gitattributes 已知:TestSysDept_RefreshDeptAncestors 在源仓同一提交上同样失败,属既有缺陷。
This commit is contained in:
@@ -0,0 +1,142 @@
|
||||
<script setup lang="ts">
|
||||
import type { MessageFilterKey } from '../data'
|
||||
import { messageFilterOptions } from '../data'
|
||||
|
||||
const props = defineProps<{
|
||||
placeholder: string
|
||||
modelValue: string
|
||||
filterKey: MessageFilterKey
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'refresh'): void
|
||||
(e: 'update:modelValue', value: string): void
|
||||
(e: 'update:filterKey', value: MessageFilterKey): void
|
||||
}>()
|
||||
|
||||
const keyword = computed({
|
||||
get: () => props.modelValue,
|
||||
set: value => emit('update:modelValue', value),
|
||||
})
|
||||
|
||||
const activeFilterKey = computed({
|
||||
get: () => props.filterKey,
|
||||
set: value => emit('update:filterKey', value),
|
||||
})
|
||||
|
||||
const dotColorMap: Record<MessageFilterKey, string> = {
|
||||
all: '#2563eb',
|
||||
recent30: '#2563eb',
|
||||
asc: '#64748b',
|
||||
}
|
||||
|
||||
function dotColor(key: MessageFilterKey) {
|
||||
return dotColorMap[key]
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="toolbar">
|
||||
<view class="search-row">
|
||||
<wd-search
|
||||
v-model="keyword"
|
||||
hide-cancel
|
||||
placeholder-left
|
||||
variant="filled"
|
||||
:placeholder="props.placeholder"
|
||||
custom-class="min-w-0 flex-1 !p-0"
|
||||
/>
|
||||
<wd-button
|
||||
class="refresh-btn"
|
||||
icon="i-carbon-renew"
|
||||
type="primary"
|
||||
plain
|
||||
round
|
||||
size="small"
|
||||
@click="emit('refresh')"
|
||||
/>
|
||||
</view>
|
||||
|
||||
<view class="tag-row">
|
||||
<view
|
||||
v-for="option in messageFilterOptions"
|
||||
:key="option.key"
|
||||
class="chip"
|
||||
:class="{ 'is-active': activeFilterKey === option.key }"
|
||||
@click="activeFilterKey = option.key"
|
||||
>
|
||||
<view class="dot" :style="{ background: dotColor(option.key) }" />
|
||||
<text class="chip-txt">{{ option.label }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.toolbar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 14rpx;
|
||||
}
|
||||
|
||||
.search-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.refresh-btn {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tag-row {
|
||||
display: flex;
|
||||
gap: 12rpx;
|
||||
overflow-x: auto;
|
||||
padding-bottom: 4rpx;
|
||||
}
|
||||
|
||||
.chip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7rpx;
|
||||
height: 44rpx;
|
||||
padding: 0 18rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #fff;
|
||||
border: 1px solid #e2e8f0;
|
||||
flex-shrink: 0;
|
||||
transition: all 0.18s ease;
|
||||
}
|
||||
|
||||
.chip:active {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
.chip.is-active {
|
||||
background: #eff6ff;
|
||||
border-color: #bfdbfe;
|
||||
}
|
||||
|
||||
.chip-txt {
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
color: #334155;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.chip.is-active .chip-txt {
|
||||
color: #2563eb;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 10rpx;
|
||||
height: 10rpx;
|
||||
border-radius: 50%;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.chip.is-active .dot {
|
||||
box-shadow: 0 0 0 4rpx rgba(37, 99, 235, 0.14);
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user