mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 07:04:24 +00:00
fix(CRUD):修复生成的代码在添加时权重字段无效的问题
This commit is contained in:
parent
c5c0451c05
commit
5297adade8
@ -1,6 +1,8 @@
|
||||
|
||||
protected static function onAfterInsert($model)
|
||||
{
|
||||
$pk = $model->getPk();
|
||||
$model->where($pk, $model[$pk])->update(['{%order%}' => $model[$pk]]);
|
||||
if ($model->weigh == 0) {
|
||||
$pk = $model->getPk();
|
||||
$model->where($pk, $model[$pk])->update(['{%order%}' => $model[$pk]]);
|
||||
}
|
||||
}
|
@ -90,6 +90,7 @@ export default defineComponent({
|
||||
return () => {
|
||||
const valueComputed = computed(() => {
|
||||
if (props.type == 'radio') {
|
||||
if (props.modelValue == undefined) return ''
|
||||
return '' + props.modelValue
|
||||
} else {
|
||||
let modelValueArr: anyObj = []
|
||||
@ -129,6 +130,7 @@ export default defineComponent({
|
||||
return () => {
|
||||
const valueComputed = computed(() => {
|
||||
if (props.type == 'select') {
|
||||
if (props.modelValue == undefined) return ''
|
||||
return '' + props.modelValue
|
||||
} else {
|
||||
let modelValueArr: anyObj = []
|
||||
|
Loading…
Reference in New Issue
Block a user