Results 22 issues of YanjingGuo

如题:Module not found: Error: Can't resolve '..\..\node_modules\art-template\lib\runtime.js'

### Existing Component 是 ### Component Name Cascader 级联选择器 ### Description 希望实现级联选择器中 叶子节点仅能单选,或者说能根据节点中某一参数自主设置某一级节点为 单选 或 多选 方式。

如题,使用 saveAll 关联新增数据的时候,因为同时包含有:新增的数据(没有 主键id)与更新的数据(有 主键id)导致数据只更新了一条,怎么处理? ![image](https://user-images.githubusercontent.com/45870098/192663327-6197a39e-6ac9-4e28-9682-a151c945f3c8.png) ![image](https://user-images.githubusercontent.com/45870098/192664001-fd430315-f872-4c4f-9881-8293544d5477.png) ![image](https://user-images.githubusercontent.com/45870098/192664127-dd833d13-9a1a-49bd-b1e1-138e2a7f0d53.png)

![image](https://user-images.githubusercontent.com/45870098/193435617-f0a5a0bf-46d6-4145-936d-d00f0673d20b.png) 如题,在更新数据时因为数据包含 code 值,使用 unique 验证唯一性会提示重复,查看 think/Validate 下的源码文件,发现 getPk() 函数获取的主键为 null.

如下图所示,使用 append 方法添加的属性不显示 ![image](https://user-images.githubusercontent.com/45870098/188342568-67c83c2b-f660-4bba-bb5d-f5b158501501.png) ![image](https://user-images.githubusercontent.com/45870098/188342446-e93437d2-208c-419d-943d-8024efacf8a7.png)

如题,使用 LIKE 模糊查询,数据库中 Null 值查询不到,Thinkphp 查询条件中如何将数据库的空值转换为空字符串以查询出来? ![image](https://user-images.githubusercontent.com/45870098/188318623-17400f10-0e2a-4846-ae02-0ab1e973ffc2.png) ![image](https://user-images.githubusercontent.com/45870098/188318641-9ef7c043-0b03-4b29-a3eb-21a0b0ae40eb.png) ![image](https://user-images.githubusercontent.com/45870098/188318660-1f374c51-8ed1-4f5f-8663-6f53e87431d3.png)

手册中没有实现批量删除恢复的示例,使用: $newCustomers = CustomerModel::select($ids); $newCustomers->restore(); 报错: Call to undefined method think\\model\\Collection::restore() 使用 saveAll 更新 delete_time 为 null 无效。估计是框架过滤了。

Thinkphp 验证规则 require 时,空字符串默认能通过验证对吧?require 只校验 null 吗?

请问如何设置当模板文件中使用的变量未定义时使用默认值而不是报错 undefined ?尝试使用 setting="setting|default=[]" 无效 另外,如何获取当前模板文件传入的变量列表?方便判断那些变量可用