时间轴

时间轴

Demon ·

JustAuth: 开箱即用的整合第三方登录的开源组件

Demon ·

sshpass 一个简单、轻量级命令行工具,提供非交互式密码验证

Demon ·

Non-function value encountered for default slot. Prefer function slots
Non-function value encountered for default slot. Prefer function slots
问题原因:
Vue3 使用h函数 推荐使用函数式插槽,以便获得更佳的性能。

解决方式:
// 错误
return h(xxx,
, );
// 正确
return h(xxx,
, { default: () => xxx });
// 多个插槽
return h( xxx,
, { default: () => [xxx, xxx], });

Demon ·

vue 动态加载路由

next({ path: to.path });
              // hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
              next({ ...to, replace: true });
Demon ·

encodeURIComponentencodeURI 区别:encodeURIComponent加密URI参数;encodeURI加密URI

Demon ·

1.安装插件:@babel/plugin-proposal-optional-chaining 和 @babel/plugin-proposal-nullish-coalescing-operator

可选链?.

npm install @babel/plugin-proposal-optional-chaining --save

yarn add @babel/plugin-proposal-optional-chaining

空值合并 ??

npm install @babel/plugin-proposal-nullish-coalescing-operator --save

yarn add @babel/plugin-proposal-nullish-coalescing-operator

  1. 在.babelrc 或babel.config.js中 的 plugins中添加 @babel/plugin-proposal-optional-chaining

module.exports = {
plugins: [
'@babel/plugin-proposal-optional-chaining', // 可选链 ?.

    '@babel/plugin-proposal-nullish-coalescing-operator' // 空值合并 ??
]

}

Demon ·

微信小程序map组件使用的经纬度是火星坐标系,调用 wx.getLocation 接口需要指定 type 为 gcj02

Demon ·

Ant Design Charts 解决页面scale可在config中添加supportCSSTransform: true 参数

{
    supportCSSTransform: true
}
Demon ·

MySQL GROUP_CONCAT()查询结果截断解决方案 。

  1. 修改配置文件
# group_count最大长度
group_concat_max_len = 1024000
  1. 执行sql语句
    SET SESSION group_concat_max_len = 10240;
Demon ·

Raft和Pbft算法