feat(custom): 增加游戏列表排序

This commit is contained in:
2024-03-07 18:57:16 +08:00
parent da59528747
commit 59f53fbc37
3 changed files with 6 additions and 1 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -25,7 +25,7 @@
}, },
"eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"], "eslint.validate": ["javascript", "javascriptreact", "typescript", "vue"],
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll.eslint": true "source.fixAll.eslint": "explicit"
}, },
"files.associations": { "files.associations": {
"*.env.*": "dotenv", "*.env.*": "dotenv",

View File

@@ -188,6 +188,7 @@ const model = ref({
introduction: '', introduction: '',
cover: [], cover: [],
status: 2, status: 2,
sort: 0,
}) })
const submit = () => { const submit = () => {
@@ -211,6 +212,7 @@ const clear = () => {
introduction: '', introduction: '',
cover: [], cover: [],
status: 2, status: 2,
sort: 0,
} }
formRef.value?.restoreValidation() formRef.value?.restoreValidation()
showModal.value = false showModal.value = false
@@ -266,6 +268,9 @@ const dropdownSelect = (e) => {
<n-form-item-gi :span="16" label="是否显示:" path="status"> <n-form-item-gi :span="16" label="是否显示:" path="status">
<n-switch v-model:value="model.status" :unchecked-value="2" :checked-value="1" /> <n-switch v-model:value="model.status" :unchecked-value="2" :checked-value="1" />
</n-form-item-gi> </n-form-item-gi>
<n-form-item-gi :span="16" label="序号:" path="sort">
<n-input-number v-model:value="model.sort" :min="0" placeholder="请输入游戏序号" />
</n-form-item-gi>
<n-form-item-gi :span="12"> <n-form-item-gi :span="12">
<div m-auto p-10> <div m-auto p-10>
<n-button type="primary" @click="submit">提交</n-button> <n-button type="primary" @click="submit">提交</n-button>