mirror of
https://gitee.com/wonderful-code/buildadmin
synced 2024-11-22 15:24:09 +00:00
fix:余额日志切换会员时表格数据跟随切换
This commit is contained in:
parent
a5f1d31d27
commit
d12a7edc7d
@ -19,7 +19,7 @@ class MoneyLog extends Backend
|
||||
// 排除字段
|
||||
protected $preExcludeFields = ['createtime'];
|
||||
|
||||
protected $quickSearchField = ['username', 'nickname'];
|
||||
protected $quickSearchField = ['user.username', 'user.nickname'];
|
||||
|
||||
public function initialize()
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ defineExpose({
|
||||
.ba-data-table :deep(.el-button + .el-button) {
|
||||
margin-left: 6px;
|
||||
}
|
||||
:deep(.table-header-cell) .cell {
|
||||
:deep(.ba-data-table) .table-header-cell .cell {
|
||||
color: var(--color-text-primary);
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
@ -71,7 +71,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { reactive, ref, inject } from 'vue'
|
||||
import { reactive, ref, inject, watch } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import type baTableClass from '/@/utils/baTable'
|
||||
import type { ElForm } from 'element-plus'
|
||||
@ -145,7 +145,7 @@ const getAdd = () => {
|
||||
}
|
||||
|
||||
const changeMoney = (value: string) => {
|
||||
if (!state.userInfo.money) {
|
||||
if (!state.userInfo || typeof state.userInfo == 'undefined') {
|
||||
state.after = 0
|
||||
return
|
||||
}
|
||||
@ -153,7 +153,14 @@ const changeMoney = (value: string) => {
|
||||
state.after = parseFloat(state.userInfo.money) + newValue
|
||||
}
|
||||
|
||||
getAdd()
|
||||
watch(
|
||||
() => baTable.form.operate,
|
||||
(newValue) => {
|
||||
if (newValue) {
|
||||
getAdd()
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
@ -66,11 +66,4 @@ baTable.getIndex()
|
||||
provide('baTable', baTable)
|
||||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue'
|
||||
export default defineComponent({
|
||||
name: 'user/moneyLog',
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
@ -207,6 +207,7 @@ const onAvatarBeforeUpload = (file: any) => {
|
||||
}
|
||||
|
||||
const changeAccount = (type: string) => {
|
||||
baTable.toggleForm()
|
||||
router.push({
|
||||
name: type == 'money' ? 'user/moneyLog' : 'user/scoreLog',
|
||||
query: {
|
||||
|
Loading…
Reference in New Issue
Block a user