cocos creator 通过属性装饰器在编辑器中增加下拉选择属性
// 定义一个枚举作为下拉菜单的选项
enum Shape {
rect,//只能是数字枚举
triangle
}
Enum(Shape);//这步必须
@ccclass('graph')
export class graph extends Component {
@property({ type: Shape})
private shape: Shape = Shape.rect;
// 定义一个枚举作为下拉菜单的选项
enum Shape {
rect,//只能是数字枚举
triangle
}
Enum(Shape);//这步必须
@ccclass('graph')
export class graph extends Component {
@property({ type: Shape})
private shape: Shape = Shape.rect;
昨天一个朋友突然找我帮他看一个问题,他的前端项目需要嵌入到第三方的 webview 中运行,他在本地调试没有问题,打包嵌入之后发现请求接口时的自定义header不见了,尝试了很多办法无解。
以前用的是 CNZZ,但后来它就不免费了,今天无意间看到了 微软的 Clarity。
一开始被它的免费功能吸引到了,能轻松查看用户在网站上的各种行为,感觉特别赞。之前用 CNZZ 没想到会有这么强大又免费的替代品,真的让人惊喜。