Skip to content

Commit 9b42a15

Browse files
author
sanfordsun
committed
feat: chatTool
1 parent 8b9f678 commit 9b42a15

File tree

273 files changed

+15154
-10
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

273 files changed

+15154
-10
lines changed

miniprogram/app.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,27 @@
99
"usingComponents": {
1010
"mp-navigation-bar": "/component/navigation-bar/navigation-bar"
1111
},
12+
"chatTools": [
13+
{
14+
"root": "packageChatTool",
15+
"entryPagePath": "pages/activity_create/index",
16+
"desc": "群签到工具",
17+
"scopes": [
18+
"scope.userLocation"
19+
]
20+
}
21+
],
1222
"subpackages": [
23+
{
24+
"root": "packageChatTool",
25+
"pages": [
26+
"pages/activity_detail/index",
27+
"pages/activity_create/index"
28+
],
29+
"entry": "entry.js",
30+
"independent": true,
31+
"renderer": "skyline"
32+
},
1333
{
1434
"root": "packageComponent",
1535
"pages": [
@@ -169,7 +189,8 @@
169189
"pages/framework/wxs/nearby",
170190
"pages/ai/mobilenet/index",
171191
"pages/ai/style-trans/index",
172-
"pages/ai/mobilenet_int8/index"
192+
"pages/ai/mobilenet_int8/index",
193+
"pages/chattool/open-chattool/open-chattool"
173194
]
174195
},
175196
{
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { SuperComponent, RelationsOptions } from '../common/src/index';
2+
export default class CellGroup extends SuperComponent {
3+
externalClasses: string[];
4+
relations: RelationsOptions;
5+
properties: import("./type").TdCellGroupProps;
6+
data: {
7+
prefix: string;
8+
classPrefix: string;
9+
};
10+
methods: {
11+
updateLastChid(): void;
12+
};
13+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5+
return c > 3 && r && Object.defineProperty(target, key, r), r;
6+
};
7+
import { SuperComponent, wxComponent } from '../common/src/index';
8+
import config from '../common/config';
9+
import props from './props';
10+
const { prefix } = config;
11+
const name = `${prefix}-cell-group`;
12+
let CellGroup = class CellGroup extends SuperComponent {
13+
constructor() {
14+
super(...arguments);
15+
this.externalClasses = [`${prefix}-class`, `${prefix}-class-title`];
16+
this.relations = {
17+
'../cell/cell': {
18+
type: 'child',
19+
linked() {
20+
this.updateLastChid();
21+
},
22+
unlinked() {
23+
this.updateLastChid();
24+
},
25+
},
26+
};
27+
this.properties = props;
28+
this.data = {
29+
prefix,
30+
classPrefix: name,
31+
};
32+
this.methods = {
33+
updateLastChid() {
34+
const items = this.$children;
35+
items.forEach((child, index) => child.setData({ isLastChild: index === items.length - 1 }));
36+
},
37+
};
38+
}
39+
};
40+
CellGroup = __decorate([
41+
wxComponent()
42+
], CellGroup);
43+
export default CellGroup;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"component": true,
3+
"styleIsolation": "apply-shared"
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<wxs src="../common/utils.wxs" module="_" />
2+
3+
<view wx:if="{{ title }}" class="class {{ classPrefix }}__title {{prefix}}-class-title"> {{ title }} </view>
4+
<view
5+
style="{{_._style([style, customStyle])}}"
6+
class="{{_.cls(classPrefix, [['bordered', bordered], theme])}} class {{prefix}}-class"
7+
>
8+
<slot />
9+
</view>
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
.t-float-left {
2+
float: left;
3+
}
4+
.t-float-right {
5+
float: right;
6+
}
7+
@keyframes tdesign-fade-out {
8+
from {
9+
opacity: 1;
10+
}
11+
to {
12+
opacity: 0;
13+
}
14+
}
15+
.hotspot-expanded.relative {
16+
position: relative;
17+
}
18+
.hotspot-expanded::after {
19+
content: '';
20+
display: block;
21+
position: absolute;
22+
left: 0;
23+
top: 0;
24+
right: 0;
25+
bottom: 0;
26+
transform: scale(1.5);
27+
}
28+
.t-cell-group {
29+
position: relative;
30+
}
31+
.t-cell-group__title {
32+
font-family: PingFangSC-Regular;
33+
font-size: var(--td-cell-group-title-font-size, 28rpx);
34+
color: var(--td-cell-group-title-color, var(--td-text-color-placeholder, var(--td-font-gray-3, rgba(0, 0, 0, 0.4))));
35+
text-align: left;
36+
line-height: var(--td-cell-group-title-line-height, 90rpx);
37+
background-color: var(--td-cell-group-title-bg-color, var(--td-bg-color-secondarycontainer, var(--td-gray-color-1, #f3f3f3)));
38+
padding-left: var(--td-cell-group-title-padding-left, 32rpx);
39+
}
40+
.t-cell-group--bordered::before {
41+
position: absolute;
42+
box-sizing: border-box;
43+
content: ' ';
44+
pointer-events: none;
45+
right: 0;
46+
left: 0;
47+
top: 0;
48+
border-top: 1px solid var(--td-cell-group-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
49+
transform: scaleY(0.5);
50+
transform-origin: 0 0;
51+
transform-origin: top;
52+
z-index: 1;
53+
}
54+
.t-cell-group--bordered::after {
55+
position: absolute;
56+
box-sizing: border-box;
57+
content: ' ';
58+
pointer-events: none;
59+
right: 0;
60+
left: 0;
61+
bottom: 0;
62+
border-bottom: 1px solid var(--td-cell-group-border-color, var(--td-component-stroke, var(--td-gray-color-3, #e7e7e7)));
63+
transform: scaleY(0.5);
64+
transform-origin: bottom;
65+
z-index: 1;
66+
}
67+
.t-cell-group--card {
68+
margin: 0 32rpx;
69+
border-radius: var(--td-radius-large, 18rpx);
70+
overflow: hidden;
71+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { TdCellGroupProps } from './type';
2+
declare const props: TdCellGroupProps;
3+
export default props;
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const props = {
2+
bordered: {
3+
type: Boolean,
4+
},
5+
externalClasses: {
6+
type: Array,
7+
},
8+
theme: {
9+
type: String,
10+
value: 'default',
11+
},
12+
title: {
13+
type: String,
14+
value: '',
15+
},
16+
};
17+
export default props;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
export interface TdCellGroupProps {
2+
bordered?: {
3+
type: BooleanConstructor;
4+
value?: boolean;
5+
};
6+
style?: {
7+
type: StringConstructor;
8+
value?: string;
9+
};
10+
externalClasses?: {
11+
type: ArrayConstructor;
12+
value?: ['t-class'];
13+
};
14+
theme?: {
15+
type: StringConstructor;
16+
value?: 'default' | 'card';
17+
};
18+
title?: {
19+
type: StringConstructor;
20+
value?: string;
21+
};
22+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

0 commit comments

Comments
 (0)