mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-21 10:27:27 +08:00
[admin] change uploaded & downloaded unit: GB
This commit is contained in:
@@ -228,7 +228,7 @@
|
||||
<DialogDisableUser ref="disableUser" :reload="fetchPageData" />
|
||||
<DialogModComment ref="modComment" />
|
||||
<DialogResetPassword ref="resetPassword" />
|
||||
<DialogIncrementDecrement ref="incrementDecrement" :reload="fetchPageData" :title="dialogTitle" />
|
||||
<DialogIncrementDecrement ref="incrementDecrement" :reload="fetchPageData" :title="dialogTitle" :valuePlaceholder="valuePlaceholder" />
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -266,7 +266,7 @@ export default {
|
||||
baseInfo: {},
|
||||
examInfo: null,
|
||||
dialogTitle: '',
|
||||
toChangeField: '',
|
||||
valuePlaceholder: '',
|
||||
})
|
||||
onMounted(() => {
|
||||
fetchPageData()
|
||||
@@ -310,7 +310,11 @@ export default {
|
||||
}
|
||||
const handleIncrementDecrement = async (field) => {
|
||||
state.dialogTitle = 'Change ' + field
|
||||
state.toChangeField = field
|
||||
if (['uploaded', 'downloaded'].includes(field)) {
|
||||
state.valuePlaceholder = 'Unit: GB'
|
||||
} else {
|
||||
state.valuePlaceholder = ''
|
||||
}
|
||||
incrementDecrement.value.open(id, field)
|
||||
}
|
||||
const handleEnableUser = async () => {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="Value" prop="value">
|
||||
<el-input v-model="formData.value" type="number" />
|
||||
<el-input v-model="formData.value" type="number" :placeholder="valuePlaceholder" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Reason" prop="reason">
|
||||
<el-input type="textarea" v-model="formData.reason"></el-input>
|
||||
@@ -43,7 +43,8 @@ export default {
|
||||
name: "DialogIncrementDecrement",
|
||||
props: {
|
||||
reload: Function,
|
||||
title: String
|
||||
title: String,
|
||||
valuePlaceholder: String
|
||||
},
|
||||
setup(props, context) {
|
||||
const formRef = ref(null)
|
||||
|
||||
Reference in New Issue
Block a user