20 lines
428 B
TypeScript
20 lines
428 B
TypeScript
const STATUS_TEXT: Record<string, string> = {
|
|
tradable: '可交易',
|
|
compressed: '风险压缩',
|
|
locked: '锁仓',
|
|
};
|
|
|
|
Component({
|
|
properties: {
|
|
status: { type: String, value: 'tradable' },
|
|
text: { type: String, value: '' },
|
|
},
|
|
lifetimes: {
|
|
attached() {
|
|
const s = this.properties.status;
|
|
const t = this.properties.text || STATUS_TEXT[s] || s;
|
|
this.setData({ text: t });
|
|
},
|
|
},
|
|
});
|