获得徽章 15
- 两万七千字大章带你使用 Vue3、Vite、TypeScript、Less、Pinia、Naive-ui 开发 Chrome V3 插件
Chrome 插件开发,带热加载16 - 探讨 SwiftUI 中的属性包装器:@AppStorage、@SceneStorage、@FocusState、@GestureState 和 @ScaledMetric
在本文中,我们将继续了解 SwiftUI 中的属性包装器。这些属性包装器涵盖了数据持久化、交互响应、辅助功能、多窗口支持等多个方面, 为开发者提供了简洁实用的解决方案。fatbobman.com
展开评论5 - #每天一个知识点#
Spring环境变量-属性赋值
第一步:通过注解PropertySource引入外部文件。可以引入多个,若担心文件不存在,可以通过参数ignoreResourceNotFound设置忽略
第二步:通过注解Value从外部文件中获取值,一般采用${}格式,还支持#{} SpEL表达式,也可以直接传字符串。如果想接收一些复杂的值,比如集合,可以考虑使用注解ConfigurationProperties,后续会详细介绍两者的优缺点。
/**
* 知识点一:引入外部文件,并从文件中获取值 @PropertySource 引入外部文件,支持多个,如果文件不存在会报错,可以通过设置参数ignoreResourceNotFound=true忽略
* @Value 从外部文件中获取值,支持spel表达式,#{},${},string
*/
@Configuration
@PropertySource(value={"classpath:propertySource.properties","classpth:xxx.properties"},ignoreResourceNotFound=true)
public class PropertiesConfigValue {
@Value("TestValue") // 普通赋值
private String str;
@Value("#{(1+2-3)/4*5}") // 算术运算
private String operator;
@Value("#{1>2 || 2 <= 3}") // 关系运算
private Boolean comparison;
@Value("#{systemProperties['java.version']}") // 系统配置:os.name
private String systemProperties;
@Value("#{T(java.lang.Math).abs(-18)}") // 表达式
private String mapExpression;
}展开17 - 我这个admin框架的富文本编辑器终于有进展了,调研了好几款现成的编辑器,多多少少和现有的ui有点不和谐,后来看到了quilljs和tiptap,最终选择了tiptap作为核心去开发,体验还可以。
XDM,献丑了。
代码在(可以给个小星星吗
)github.com
demo(有bug可以提个issue
)tiger.happykit.org
展开2928
)
)