feat: chat integration, tenant admin spec, backend chat service, miniprogram updates, DEMO moved to tmp, XCX-TEST removed, migrations & docs
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
Component({
|
||||
options: {
|
||||
styleIsolation: 'shared',
|
||||
},
|
||||
|
||||
/**
|
||||
* ai-title-badge — 标题行 AI 徽章组件
|
||||
*
|
||||
* ## 用法
|
||||
* 1. 在页面/组件的 .json 中注册:
|
||||
* "ai-title-badge": "/components/ai-title-badge/ai-title-badge"
|
||||
*
|
||||
* 2. 在 WXML 中使用:
|
||||
* <!-- 固定配色,默认文字 -->
|
||||
* <ai-title-badge color="indigo" />
|
||||
*
|
||||
* <!-- 自定义文字 -->
|
||||
* <ai-title-badge color="blue" label="AI 建议" />
|
||||
*
|
||||
* <!-- 页面随机配色(推荐) -->
|
||||
* <ai-title-badge color="{{aiColor}}" />
|
||||
*
|
||||
* ## color 可选值
|
||||
* red | orange | yellow | blue | indigo(默认)| purple
|
||||
*
|
||||
* ## label 默认值
|
||||
* "AI智能洞察"
|
||||
*
|
||||
* ## 样式来源
|
||||
* 全局 app.wxss:.ai-title-badge + .ai-color-*
|
||||
*
|
||||
* ## 页面随机配色初始化(复制到 Page.onLoad)
|
||||
* const AI_COLORS = ['red','orange','yellow','blue','indigo','purple']
|
||||
* const aiColor = AI_COLORS[Math.floor(Math.random() * AI_COLORS.length)]
|
||||
* this.setData({ aiColor })
|
||||
*/
|
||||
properties: {
|
||||
/** 颜色系列:red | orange | yellow | blue | indigo | purple */
|
||||
color: {
|
||||
type: String,
|
||||
value: 'indigo',
|
||||
},
|
||||
/** 徽章文字,默认「AI智能洞察」 */
|
||||
label: {
|
||||
type: String,
|
||||
value: 'AI智能洞察',
|
||||
},
|
||||
},
|
||||
})
|
||||
@@ -0,0 +1,6 @@
|
||||
<view class="ai-title-badge ai-color-{{color}}">
|
||||
<view class="ai-title-badge-icon">
|
||||
<image class="ai-title-badge-icon-img" src="/assets/icons/ai-robot-badge.svg" mode="aspectFit" />
|
||||
</view>
|
||||
<text>{{label}}</text>
|
||||
</view>
|
||||
@@ -0,0 +1,4 @@
|
||||
/* 引入全局 AI 样式 */
|
||||
@import "../../app.wxss";
|
||||
|
||||
/* 组件内样式继承全局定义 */
|
||||
Reference in New Issue
Block a user