Merge remote-tracking branch 'origin/v2.x' into v2.x
commit
53e00f93ad
|
@ -80,6 +80,9 @@ class CustomModelSerializer(DynamicFieldsMixin, ModelSerializer):
|
|||
|
||||
def update(self, instance, validated_data):
|
||||
if self.request:
|
||||
if str(self.request.user) != "AnonymousUser":
|
||||
if self.modifier_field_id in self.fields.fields:
|
||||
validated_data[self.modifier_field_id] = self.get_request_user_id()
|
||||
if hasattr(self.instance, self.modifier_field_id):
|
||||
setattr(
|
||||
self.instance, self.modifier_field_id, self.get_request_user_id()
|
||||
|
|
|
@ -160,8 +160,8 @@ export default {
|
|||
routerViewKey () {
|
||||
// 默认情况下 key 类似 __transition-n-/foo
|
||||
// 这里的字符串操作是为了最终 key 的格式和原来相同 类似 __transition-n-__stamp-time-/foo
|
||||
const stamp = this.$route.meta[`__stamp-${this.$route.path}`] || ''
|
||||
return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.path}`
|
||||
const stamp = this.$route.meta[`__stamp-${this.$route.fullpath}`] || ''
|
||||
return `${stamp ? `__stamp-${stamp}-` : ''}${this.$route.fullpath}`
|
||||
},
|
||||
/**
|
||||
* @description 最外层容器的背景图片样式
|
||||
|
|
Loading…
Reference in New Issue