export const DISCOUNT_TYPE = {
jutuike: 1,
}
export const DISCOUNT_TYPE_PLATFORM = {
[DISCOUNT_TYPE.jutuike]: "jutuike"
}
19:10:09.625 error: Expecting property name or receiver type
19:10:09.625 at common/constants.uts:57:2
19:10:09.625 55 | }
19:10:09.625 56 | export const DISCOUNT_TYPE_PLATFORM = {
19:10:09.625 57 | [DISCOUNT_TYPE.getNumber(jutuike)]: "jutuike",
19:10:09.625 | ^
19:10:09.625 59 | }
19:10:09.625 error: Property getter or setter expected
19:10:09.625 at common/constants.uts:57:2
19:10:09.625 55 | }
19:10:09.625 56 | export const DISCOUNT_TYPE_PLATFORM = {
19:10:09.625 57 | [DISCOUNT_TYPE.getNumber(jutuike)]: "jutuike",
19:10:09.625 | ^
19:10:09.625 59 | }
kaleidosJohna
- 发布:2025-01-13 19:13
- 更新:2025-01-14 14:19
- 阅读:89
kaleidosJohna (作者)
有具体示例不,感谢
2025-01-14 10:08
DCloud_UNI_FengXY
回复 kaleidosJohna:
后续会支持该写法:https://issues.dcloud.net.cn/pages/issues/detail?id=6919
临时绕过方案:
const DISCOUNT_TYPE_PLATFORM = {}
DISCOUNT_TYPE_PLATFORM[DISCOUNT_TYPE.jutuike!] = 'jutuike'
2025-01-14 14:59
kaleidosJohna (作者)
回复 DCloud_UNI_FengXY: 好的感谢
2025-01-14 15:16