Files
Daniel a94bd44c3a Initial commit
Made-with: Cursor
2026-02-28 18:43:09 +08:00

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 });
},
},
});