适配了编译器对常量属性的处理

This commit is contained in:
Xu Chang 2023-02-15 19:23:37 +08:00
parent 1a22ecc7d6
commit 4fd66ee537
10 changed files with 54 additions and 7 deletions

View File

@ -50,6 +50,13 @@ var locale = {
grant: '授予',
transfer: '转交',
},
qrCodeType: {
webForWechatPublic: '网站引流到公众号',
wechatMpDomainUrl: '小程序url码',
wechatMpWxaCode: '小程序码',
wechatPublic: '公众号关注码',
wechatPublicForMp: '公众号回复小程序码',
}
},
},
};

View File

@ -52,5 +52,14 @@ var locale = {
application: '应用',
props: '属性',
},
v: {
type: {
webForWechatPublic: '网站引流到公众号',
wechatMpDomainUrl: '小程序url码',
wechatMpWxaCode: '小程序码',
wechatPublic: '公众号关注码',
wechatPublicForMp: '公众号回复小程序码',
}
}
},
};

View File

@ -27,7 +27,10 @@ exports.desc = {
}
},
weight: {
type: "object"
type: "varchar",
params: {
length: 24
}
},
restriction: {
type: "object"

View File

@ -5,7 +5,10 @@ var Action_1 = require("./Action");
exports.desc = {
attributes: {
channel: {
type: "object"
type: "varchar",
params: {
length: 24
}
},
applicationId: {
type: "ref",

View File

@ -55,7 +55,10 @@ exports.desc = {
ref: "user"
},
qrCodeType: {
type: "object"
type: "varchar",
params: {
length: 24
}
},
expiresAt: {
type: "datetime"

View File

@ -1 +1 @@
{ "attr": { "relation": "关系", "entity": "关联对象", "entityId": "关联对象id", "type": "类型", "number": "次数", "confirmed": "已确认人数", "remark": "备注", "grantee": "领取人", "granter": "授权人", "codes": "微信码", "expired": "是否过期", "expiresAt": "过期时间", "redirectTo": "重定向页面", "qrCodeType": "二维码类型" }, "action": { "confirm": "确认" }, "v": { "type": { "grant": "授予", "transfer": "转交" } } }
{ "attr": { "relation": "关系", "entity": "关联对象", "entityId": "关联对象id", "type": "类型", "number": "次数", "confirmed": "已确认人数", "remark": "备注", "grantee": "领取人", "granter": "授权人", "codes": "微信码", "expired": "是否过期", "expiresAt": "过期时间", "redirectTo": "重定向页面", "qrCodeType": "二维码类型" }, "action": { "confirm": "确认" }, "v": { "type": { "grant": "授予", "transfer": "转交" }, "qrCodeType": { "webForWechatPublic": "网站引流到公众号", "wechatMpDomainUrl": "小程序url码", "wechatMpWxaCode": "小程序码", "wechatPublic": "公众号关注码", "wechatPublicForMp": "公众号回复小程序码" } } }

View File

@ -18,7 +18,10 @@ exports.desc = {
}
},
type: {
type: "object"
type: "varchar",
params: {
length: 24
}
},
allowShare: {
type: "boolean"

View File

@ -1 +1 @@
{ "attr": { "entity": "关联对象", "entityId": "关联对象id", "type": "类型", "allowShare": "允许分享", "tag": "tag", "ticket": "ticket", "url": "url", "permanent": "是否永久码", "buffer": "小程序码数据(动态)", "expired": "是否过期", "expiresAt": "过期时间", "application": "应用", "props": "属性" } }
{ "attr": { "entity": "关联对象", "entityId": "关联对象id", "type": "类型", "allowShare": "允许分享", "tag": "tag", "ticket": "ticket", "url": "url", "permanent": "是否永久码", "buffer": "小程序码数据(动态)", "expired": "是否过期", "expiresAt": "过期时间", "application": "应用", "props": "属性" }, "v": { "type": { "webForWechatPublic": "网站引流到公众号", "wechatMpDomainUrl": "小程序url码", "wechatMpWxaCode": "小程序码", "wechatPublic": "公众号关注码", "wechatPublicForMp": "公众号回复小程序码" } } }

View File

@ -56,6 +56,7 @@ const locale: LocaleDef<
'',
{
type: Schema['type'];
qrCodeType: QrCodeType;
}
> = {
zh_CN: {
@ -83,6 +84,13 @@ const locale: LocaleDef<
grant: '授予',
transfer: '转交',
},
qrCodeType: {
webForWechatPublic: '网站引流到公众号',
wechatMpDomainUrl: '小程序url码',
wechatMpWxaCode: '小程序码',
wechatPublic: '公众号关注码',
wechatPublicForMp: '公众号回复小程序码',
}
},
},
};

View File

@ -63,7 +63,9 @@ const indexes: Index<Schema>[] = [
},
];
const locale: LocaleDef<Schema, '', '', {}> = {
const locale: LocaleDef<Schema, '', '', {
type: QrCodeType,
}> = {
zh_CN: {
attr: {
entity: '关联对象',
@ -80,5 +82,14 @@ const locale: LocaleDef<Schema, '', '', {}> = {
application: '应用',
props: '属性',
},
v: {
type: {
webForWechatPublic: '网站引流到公众号',
wechatMpDomainUrl: '小程序url码',
wechatMpWxaCode: '小程序码',
wechatPublic: '公众号关注码',
wechatPublicForMp: '公众号回复小程序码',
}
}
},
};