@ray-js/t-agent 0.0.9-beta-3 → 0.0.9
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-zh_CN.md +3 -3
- package/README.md +3 -3
- package/package.json +2 -2
package/README-zh_CN.md
CHANGED
|
@@ -1155,7 +1155,7 @@ const MyComponent = () => {
|
|
|
1155
1155
|
import { useTileProps } from '@ray-js/t-agent-ui-ray';
|
|
1156
1156
|
|
|
1157
1157
|
const MyTilePart = () => {
|
|
1158
|
-
const { message, agent, tile,
|
|
1158
|
+
const { message, agent, tile, emitTileEvent } = useTileProps();
|
|
1159
1159
|
|
|
1160
1160
|
return <div>My Tile</div>;
|
|
1161
1161
|
};
|
|
@@ -1240,8 +1240,8 @@ import {
|
|
|
1240
1240
|
import { View, Text, Button } from '@ray-js/ray';
|
|
1241
1241
|
|
|
1242
1242
|
const MyCard: ChatCardComponent<{ title: string }, { clicked: boolean }> = props => {
|
|
1243
|
-
// 如果你需要拿到 agent、message、tile、
|
|
1244
|
-
const { message, agent, tile,
|
|
1243
|
+
// 如果你需要拿到 agent、message、tile、emitTileEvent 等属性,可以使用 useTileProps
|
|
1244
|
+
const { message, agent, tile, emitTileEvent } = useTileProps();
|
|
1245
1245
|
const { card, setCardState } = props;
|
|
1246
1246
|
const { cardData, cardState, cardCode } = card as ChatCardObject<{ title: string }>;
|
|
1247
1247
|
|
package/README.md
CHANGED
|
@@ -1150,7 +1150,7 @@ Get the `TileProps` object in the tile component; if it's a tile, you can direct
|
|
|
1150
1150
|
import { useTileProps } from '@ray-js/t-agent-ui-ray';
|
|
1151
1151
|
|
|
1152
1152
|
const MyTilePart = () => {
|
|
1153
|
-
const { message, agent, tile,
|
|
1153
|
+
const { message, agent, tile, emitTileEvent } = useTileProps();
|
|
1154
1154
|
|
|
1155
1155
|
return <div>My Tile</div>;
|
|
1156
1156
|
};
|
|
@@ -1235,8 +1235,8 @@ import {
|
|
|
1235
1235
|
import { View, Text, Button } from '@ray-js/ray';
|
|
1236
1236
|
|
|
1237
1237
|
const MyCard: ChatCardComponent<{ title: string }, { clicked: boolean }> = props => {
|
|
1238
|
-
// If you need to access attributes like agent, message, tile,
|
|
1239
|
-
const { message, agent, tile,
|
|
1238
|
+
// If you need to access attributes like agent, message, tile, emitTileEvent, use useTileProps
|
|
1239
|
+
const { message, agent, tile, emitTileEvent } = useTileProps();
|
|
1240
1240
|
const { card, setCardState } = props;
|
|
1241
1241
|
const { cardData, cardState, cardCode } = card as ChatCardObject<{ title: string }>;
|
|
1242
1242
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ray-js/t-agent",
|
|
3
|
-
"version": "0.0.9
|
|
3
|
+
"version": "0.0.9",
|
|
4
4
|
"author": "Tuya.inc",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"build": "ray build --type=component --output dist",
|
|
27
27
|
"clean": "rimraf ./dist"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "328a8616b0356cbaef02d7a4ad46ee0c077d04be"
|
|
30
30
|
}
|