Skip to content

Commit 3a376da

Browse files
author
v_guanglwen
committed
feat: 回滚代码(packageChatTool/tdesign)
1 parent f3ac601 commit 3a376da

Some content is hidden

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

96 files changed

+4664
-4744
lines changed
Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,43 @@
1-
import { SuperComponent, wxComponent } from '../common/src/index'
2-
import config from '../common/config'
3-
import props from './props'
4-
import { uniqueFactory } from '../common/utils'
5-
6-
const __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
7-
const c = arguments.length; let r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc; let
8-
d
9-
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc)
10-
else for (let 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
11-
return c > 3 && r && Object.defineProperty(target, key, r), r
12-
}
13-
14-
const { prefix } = config
15-
const name = `${prefix}-badge`
16-
const getUniqueID = uniqueFactory('badge')
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+
import { uniqueFactory } from '../common/utils';
11+
const { prefix } = config;
12+
const name = `${prefix}-badge`;
13+
const getUniqueID = uniqueFactory('badge');
1714
let Badge = class Badge extends SuperComponent {
18-
constructor() {
19-
super(...arguments)
20-
this.options = {
21-
multipleSlots: true,
15+
constructor() {
16+
super(...arguments);
17+
this.options = {
18+
multipleSlots: true,
19+
};
20+
this.externalClasses = [`${prefix}-class`, `${prefix}-class-count`, `${prefix}-class-content`];
21+
this.properties = props;
22+
this.data = {
23+
prefix,
24+
classPrefix: name,
25+
value: '',
26+
labelID: '',
27+
descriptionID: '',
28+
};
29+
this.lifetimes = {
30+
ready() {
31+
const uniqueID = getUniqueID();
32+
this.setData({
33+
labelID: `${uniqueID}_label`,
34+
descriptionID: `${uniqueID}_description`,
35+
});
36+
},
37+
};
2238
}
23-
this.externalClasses = [`${prefix}-class`, `${prefix}-class-count`, `${prefix}-class-content`]
24-
this.properties = props
25-
this.data = {
26-
prefix,
27-
classPrefix: name,
28-
value: '',
29-
labelID: '',
30-
descriptionID: '',
31-
}
32-
this.lifetimes = {
33-
ready() {
34-
const uniqueID = getUniqueID()
35-
this.setData({
36-
labelID: `${uniqueID}_label`,
37-
descriptionID: `${uniqueID}_description`,
38-
})
39-
},
40-
}
41-
}
42-
}
39+
};
4340
Badge = __decorate([
44-
wxComponent()
45-
], Badge)
46-
export default Badge
41+
wxComponent()
42+
], Badge);
43+
export default Badge;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from './type'
2-
export * from './props'
3-
export * from './badge'
1+
export * from './type';
2+
export * from './props';
3+
export * from './badge';
Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
11
const props = {
2-
color: {
3-
type: String,
4-
value: '',
5-
},
6-
content: {
7-
type: String,
8-
value: '',
9-
},
10-
count: {
11-
type: null,
12-
value: 0,
13-
},
14-
dot: {
15-
type: Boolean,
16-
value: false,
17-
},
18-
externalClasses: {
19-
type: Array,
20-
},
21-
maxCount: {
22-
type: Number,
23-
value: 99,
24-
},
25-
offset: {
26-
type: Array,
27-
},
28-
shape: {
29-
type: String,
30-
value: 'circle',
31-
},
32-
showZero: {
33-
type: Boolean,
34-
value: false,
35-
},
36-
size: {
37-
type: String,
38-
value: 'medium',
39-
},
40-
}
41-
export default props
2+
color: {
3+
type: String,
4+
value: '',
5+
},
6+
content: {
7+
type: String,
8+
value: '',
9+
},
10+
count: {
11+
type: null,
12+
value: 0,
13+
},
14+
dot: {
15+
type: Boolean,
16+
value: false,
17+
},
18+
externalClasses: {
19+
type: Array,
20+
},
21+
maxCount: {
22+
type: Number,
23+
value: 99,
24+
},
25+
offset: {
26+
type: Array,
27+
},
28+
shape: {
29+
type: String,
30+
value: 'circle',
31+
},
32+
showZero: {
33+
type: Boolean,
34+
value: false,
35+
},
36+
size: {
37+
type: String,
38+
value: 'medium',
39+
},
40+
};
41+
export default props;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export {}
1+
export {};
Lines changed: 98 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,101 @@
1-
import { SuperComponent, wxComponent } from '../common/src/index'
2-
import config from '../common/config'
3-
import props from './props'
4-
import { canIUseFormFieldButton } from '../common/version'
5-
import { calcIcon } from '../common/utils'
6-
7-
const __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
8-
const c = arguments.length; let r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc; let
9-
d
10-
if (typeof Reflect === 'object' && typeof Reflect.decorate === 'function') r = Reflect.decorate(decorators, target, key, desc)
11-
else for (let 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
12-
return c > 3 && r && Object.defineProperty(target, key, r), r
13-
}
14-
15-
const { prefix } = config
16-
const name = `${prefix}-button`
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+
import { canIUseFormFieldButton } from '../common/version';
11+
import { calcIcon } from '../common/utils';
12+
const { prefix } = config;
13+
const name = `${prefix}-button`;
1714
let Button = class Button extends SuperComponent {
18-
constructor() {
19-
super(...arguments)
20-
this.externalClasses = [`${prefix}-class`, `${prefix}-class-icon`, `${prefix}-class-loading`]
21-
this.behaviors = canIUseFormFieldButton() ? ['wx://form-field-button'] : []
22-
this.properties = props
23-
this.options = {
24-
multipleSlots: true,
15+
constructor() {
16+
super(...arguments);
17+
this.externalClasses = [`${prefix}-class`, `${prefix}-class-icon`, `${prefix}-class-loading`];
18+
this.behaviors = canIUseFormFieldButton() ? ['wx://form-field-button'] : [];
19+
this.properties = props;
20+
this.options = {
21+
multipleSlots: true,
22+
};
23+
this.data = {
24+
prefix,
25+
className: '',
26+
classPrefix: name,
27+
};
28+
this.observers = {
29+
'theme, size, plain, block, shape, disabled, loading, variant'() {
30+
this.setClass();
31+
},
32+
icon(icon) {
33+
this.setData({
34+
_icon: calcIcon(icon, ''),
35+
});
36+
},
37+
};
38+
this.lifetimes = {
39+
attached() {
40+
this.setClass();
41+
},
42+
};
43+
this.methods = {
44+
setClass() {
45+
const classList = [
46+
name,
47+
`${prefix}-class`,
48+
`${name}--${this.data.variant || 'base'}`,
49+
`${name}--${this.data.theme || 'default'}`,
50+
`${name}--${this.data.shape || 'rectangle'}`,
51+
`${name}--size-${this.data.size || 'medium'}`,
52+
];
53+
if (this.data.block) {
54+
classList.push(`${name}--block`);
55+
}
56+
if (this.data.disabled) {
57+
classList.push(`${name}--disabled`);
58+
}
59+
if (this.data.ghost) {
60+
classList.push(`${name}--ghost`);
61+
}
62+
this.setData({
63+
className: classList.join(' '),
64+
});
65+
},
66+
getuserinfo(e) {
67+
this.triggerEvent('getuserinfo', e.detail);
68+
},
69+
contact(e) {
70+
this.triggerEvent('contact', e.detail);
71+
},
72+
getphonenumber(e) {
73+
this.triggerEvent('getphonenumber', e.detail);
74+
},
75+
error(e) {
76+
this.triggerEvent('error', e.detail);
77+
},
78+
opensetting(e) {
79+
this.triggerEvent('opensetting', e.detail);
80+
},
81+
launchapp(e) {
82+
this.triggerEvent('launchapp', e.detail);
83+
},
84+
chooseavatar(e) {
85+
this.triggerEvent('chooseavatar', e.detail);
86+
},
87+
agreeprivacyauthorization(e) {
88+
this.triggerEvent('agreeprivacyauthorization', e.detail);
89+
},
90+
handleTap(e) {
91+
if (this.data.disabled || this.data.loading)
92+
return;
93+
this.triggerEvent('tap', e);
94+
},
95+
};
2596
}
26-
this.data = {
27-
prefix,
28-
className: '',
29-
classPrefix: name,
30-
}
31-
this.observers = {
32-
'theme, size, plain, block, shape, disabled, loading, variant': function () {
33-
this.setClass()
34-
},
35-
icon(icon) {
36-
this.setData({
37-
_icon: calcIcon(icon, ''),
38-
})
39-
},
40-
}
41-
this.lifetimes = {
42-
attached() {
43-
this.setClass()
44-
},
45-
}
46-
this.methods = {
47-
setClass() {
48-
const classList = [
49-
name,
50-
`${prefix}-class`,
51-
`${name}--${this.data.variant || 'base'}`,
52-
`${name}--${this.data.theme || 'default'}`,
53-
`${name}--${this.data.shape || 'rectangle'}`,
54-
`${name}--size-${this.data.size || 'medium'}`,
55-
]
56-
if (this.data.block) {
57-
classList.push(`${name}--block`)
58-
}
59-
if (this.data.disabled) {
60-
classList.push(`${name}--disabled`)
61-
}
62-
if (this.data.ghost) {
63-
classList.push(`${name}--ghost`)
64-
}
65-
this.setData({
66-
className: classList.join(' '),
67-
})
68-
},
69-
getuserinfo(e) {
70-
this.triggerEvent('getuserinfo', e.detail)
71-
},
72-
contact(e) {
73-
this.triggerEvent('contact', e.detail)
74-
},
75-
getphonenumber(e) {
76-
this.triggerEvent('getphonenumber', e.detail)
77-
},
78-
error(e) {
79-
this.triggerEvent('error', e.detail)
80-
},
81-
opensetting(e) {
82-
this.triggerEvent('opensetting', e.detail)
83-
},
84-
launchapp(e) {
85-
this.triggerEvent('launchapp', e.detail)
86-
},
87-
chooseavatar(e) {
88-
this.triggerEvent('chooseavatar', e.detail)
89-
},
90-
agreeprivacyauthorization(e) {
91-
this.triggerEvent('agreeprivacyauthorization', e.detail)
92-
},
93-
handleTap(e) {
94-
if (this.data.disabled || this.data.loading) return
95-
this.triggerEvent('tap', e)
96-
},
97-
}
98-
}
99-
}
97+
};
10098
Button = __decorate([
101-
wxComponent()
102-
], Button)
103-
export default Button
99+
wxComponent()
100+
], Button);
101+
export default Button;
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
export * from './props'
2-
export * from './type'
3-
export * from './button'
1+
export * from './props';
2+
export * from './type';
3+
export * from './button';

0 commit comments

Comments
 (0)