diff --git a/web/src/views/admin/TokenManageView.vue b/web/src/views/admin/TokenManageView.vue index d6031bb..43a7a04 100644 --- a/web/src/views/admin/TokenManageView.vue +++ b/web/src/views/admin/TokenManageView.vue @@ -20,6 +20,28 @@ const rowOut = ref(null) const addDataDialogVisible = ref(false) const dataDialogVisible = ref(false) +const isAdding = ref(false) +const optionName = ref('') + +const onAddOption = () => { + isAdding.value = true +} + +const onConfirm = () => { + if (optionName.value) { + dataFormatOptions.push({ + label: optionName.value, + value: optionName.value, + }) + clear() + } +} + +const clear = () => { + optionName.value = '' + isAdding.value = false +} + const options = [ {value: 'uid', label: 'uid'}, {value: 'secid', label: 'secid'}, @@ -31,8 +53,8 @@ const options = [ const dataFormatOptions = [ {value: 'uid----secid----pid----comment_id', label: 'uid----secid----pid----comment_id'}, - {value: 'uid----secid', label: 'uid----secid'}, {value: "uid----pid----弹幕ID", label: "uid----pid----弹幕ID"}, + {value: 'uid----secid', label: 'uid----secid'}, {value: 'dyid', label: 'dyid'} ] @@ -154,8 +176,23 @@ onMounted(() => { + + :label="item.label" + />