mirror of
https://github.com/bufanyun/hotgo.git
synced 2026-02-15 19:04:30 +08:00
发布v2.8.4版本,更新内容请查看:https://github.com/bufanyun/hotgo/tree/v2.0/docs/guide-zh-CN/addon-version-upgrade.md
This commit is contained in:
@@ -98,34 +98,30 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { h, onMounted, reactive, ref } from 'vue';
|
||||
import { h, reactive, ref } from 'vue';
|
||||
import { NTag, useDialog, useMessage } from 'naive-ui';
|
||||
import { BasicTable, TableAction } from '@/components/Table';
|
||||
import { BasicForm, FormSchema, useForm } from '@/components/Form/index';
|
||||
import { Delete, Edit, List, Status } from '@/api/sys/blacklist';
|
||||
import { DeleteOutlined, PlusOutlined } from '@vicons/antd';
|
||||
import { statusActions, statusOptions } from '@/enums/optionsiEnum';
|
||||
import { Dict } from '@/api/dict/dict';
|
||||
import { getOptionLabel, getOptionTag } from '@/utils/hotgo';
|
||||
import { statusActions } from '@/enums/optionsiEnum';
|
||||
import { getOptionLabel, getOptionTag, Option } from '@/utils/hotgo';
|
||||
import { defRangeShortcuts } from '@/utils/dateUtil';
|
||||
|
||||
const blacklistOptions = [
|
||||
const blacklistOptions: Option[] = [
|
||||
{
|
||||
key: 1,
|
||||
value: 1,
|
||||
label: '封禁中',
|
||||
listClass: 'warning',
|
||||
},
|
||||
{
|
||||
key: 2,
|
||||
value: 2,
|
||||
label: '已解封',
|
||||
listClass: 'success',
|
||||
},
|
||||
].map((s) => {
|
||||
return s;
|
||||
});
|
||||
|
||||
const options = ref({
|
||||
status: blacklistOptions,
|
||||
});
|
||||
];
|
||||
|
||||
const columns = [
|
||||
{
|
||||
@@ -150,16 +146,15 @@
|
||||
style: {
|
||||
marginRight: '6px',
|
||||
},
|
||||
type: getOptionTag(options.value.status, row.status),
|
||||
type: getOptionTag(blacklistOptions, row.status),
|
||||
bordered: false,
|
||||
},
|
||||
{
|
||||
default: () => getOptionLabel(options.value.status, row.status),
|
||||
default: () => getOptionLabel(blacklistOptions, row.status),
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
|
||||
{
|
||||
title: '创建时间',
|
||||
key: 'createdAt',
|
||||
@@ -173,13 +168,7 @@
|
||||
status: null,
|
||||
});
|
||||
|
||||
const rules = {
|
||||
title: {
|
||||
// required: true,
|
||||
trigger: ['blur', 'input'],
|
||||
message: '请输入标题',
|
||||
},
|
||||
};
|
||||
const rules = {};
|
||||
|
||||
const schemas = ref<FormSchema[]>([
|
||||
{
|
||||
@@ -207,6 +196,31 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'created_at',
|
||||
component: 'NDatePicker',
|
||||
label: '创建时间',
|
||||
componentProps: {
|
||||
type: 'datetimerange',
|
||||
clearable: true,
|
||||
shortcuts: defRangeShortcuts(),
|
||||
onUpdateValue: (e: any) => {
|
||||
console.log(e);
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'remark',
|
||||
component: 'NInput',
|
||||
label: '备注',
|
||||
componentProps: {
|
||||
placeholder: '请输入备注',
|
||||
onUpdateValue: (e: any) => {
|
||||
console.log(e);
|
||||
},
|
||||
},
|
||||
rules: [{ message: '请输入备注', trigger: ['blur'] }],
|
||||
},
|
||||
]);
|
||||
|
||||
const message = useMessage();
|
||||
|
||||
@@ -7,13 +7,7 @@
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="网站logo" path="basicLogo">
|
||||
<UploadImage
|
||||
:maxNumber="1"
|
||||
v-model:value="formValue.basicLogo"
|
||||
:helpText="
|
||||
'网站logo适用于客户端使用,图片大小不超过' + componentSetting.upload.maxSize + 'MB'
|
||||
"
|
||||
/>
|
||||
<FileChooser v-model:value="formValue.basicLogo" file-type="image" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="网站域名" path="basicDomain">
|
||||
@@ -67,8 +61,8 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useDialog, useMessage } from 'naive-ui';
|
||||
import componentSetting from '@/settings/componentSetting';
|
||||
import { getConfig, updateConfig } from '@/api/sys/config';
|
||||
import FileChooser from '@/components/FileChooser/index.vue';
|
||||
|
||||
const group = ref('basic');
|
||||
const show = ref(false);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<n-spin :show="show" description="请稍候...">
|
||||
<n-form :label-width="100" :model="formValue" :rules="rules" ref="formRef">
|
||||
<n-form :label-width="100" :model="formValue" ref="formRef">
|
||||
<n-divider title-placement="left">开关配置</n-divider>
|
||||
<n-form-item label="登录验证码开关" path="loginCaptchaSwitch">
|
||||
<n-radio-group v-model:value="formValue.loginCaptchaSwitch" name="loginCaptchaSwitch">
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
<n-divider title-placement="left">注册默认信息配置</n-divider>
|
||||
<n-form-item label="默认注册头像" path="loginAvatar">
|
||||
<UploadImage :maxNumber="1" v-model:value="formValue.loginAvatar" />
|
||||
<FileChooser v-model:value="formValue.loginAvatar" file-type="image" />
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="默认注册角色" path="loginRoleId">
|
||||
@@ -100,16 +100,16 @@
|
||||
import { useMessage } from 'naive-ui';
|
||||
import { getConfig, updateConfig } from '@/api/sys/config';
|
||||
import Editor from '@/components/Editor/editor.vue';
|
||||
import FileChooser from '@/components/FileChooser/index.vue';
|
||||
import { getDeptOption } from '@/api/org/dept';
|
||||
import { getRoleOption } from '@/api/system/role';
|
||||
import { getPostOption } from '@/api/org/post';
|
||||
import UploadImage from '@/components/Upload/uploadImage.vue';
|
||||
|
||||
const message = useMessage();
|
||||
const formRef: any = ref(null);
|
||||
const group = ref('login');
|
||||
const show = ref(false);
|
||||
const rules = {};
|
||||
const formRef: any = ref(null);
|
||||
const message = useMessage();
|
||||
|
||||
const formValue = ref({
|
||||
loginRegisterSwitch: 1,
|
||||
loginCaptchaSwitch: 1,
|
||||
@@ -180,12 +180,6 @@
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
show.value = true;
|
||||
await loadOptions();
|
||||
load();
|
||||
});
|
||||
|
||||
function load() {
|
||||
show.value = true;
|
||||
new Promise((_resolve, _reject) => {
|
||||
@@ -200,4 +194,10 @@
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
onMounted(async () => {
|
||||
show.value = true;
|
||||
await loadOptions();
|
||||
load();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<div>
|
||||
<n-space>
|
||||
<n-button type="primary" @click="formSubmit">保存更新</n-button>
|
||||
<!-- <n-button type="default" @click="sendTest">测试支付</n-button>-->
|
||||
<!-- <n-button type="default" @click="sendTest">测试支付</n-button>-->
|
||||
</n-space>
|
||||
</div>
|
||||
</n-form>
|
||||
|
||||
@@ -152,9 +152,7 @@
|
||||
<n-icon :size="16" :component="Glasses" />
|
||||
</template>
|
||||
</n-input>
|
||||
<template #feedback
|
||||
>创建地址:https://ram.console.aliyun.com/manage/ak</template
|
||||
>
|
||||
<template #feedback>创建地址:https://ram.console.aliyun.com/manage/ak</template>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="AccessKey Secret" path="uploadOssSecretKey">
|
||||
@@ -200,9 +198,7 @@
|
||||
<n-icon :size="16" :component="Glasses" />
|
||||
</template>
|
||||
</n-input>
|
||||
<template #feedback
|
||||
>创建地址:https://portal.qiniu.com/user/key</template
|
||||
>
|
||||
<template #feedback>创建地址:https://portal.qiniu.com/user/key</template>
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="SecretKey" path="uploadQiNiuSecretKey">
|
||||
@@ -287,12 +283,12 @@
|
||||
uploadOssEndpoint: '',
|
||||
uploadOssBucketURL: '',
|
||||
uploadOssPath: '',
|
||||
uploadOssBucket:'',
|
||||
uploadQiNiuAccessKey:'',
|
||||
uploadQiNiuSecretKey:'',
|
||||
uploadQiNiuDomain:'',
|
||||
uploadQiNiuPath:'',
|
||||
uploadQiNiuBucket:'',
|
||||
uploadOssBucket: '',
|
||||
uploadQiNiuAccessKey: '',
|
||||
uploadQiNiuSecretKey: '',
|
||||
uploadQiNiuDomain: '',
|
||||
uploadQiNiuPath: '',
|
||||
uploadQiNiuBucket: '',
|
||||
});
|
||||
|
||||
function formSubmit() {
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
clearable
|
||||
/>
|
||||
<template #feedback
|
||||
>与公众平台接入设置值一致,必须为英文或者数字,长度为43个字符 </template
|
||||
>
|
||||
>与公众平台接入设置值一致,必须为英文或者数字,长度为43个字符
|
||||
</template>
|
||||
</n-form-item>
|
||||
|
||||
<n-divider title-placement="left">开放平台</n-divider>
|
||||
@@ -56,7 +56,7 @@
|
||||
>
|
||||
</n-form-item>
|
||||
|
||||
<!-- <n-divider title-placement="left">小程序</n-divider>-->
|
||||
<!-- <n-divider title-placement="left">小程序</n-divider>-->
|
||||
|
||||
<div>
|
||||
<n-space>
|
||||
|
||||
@@ -445,7 +445,6 @@
|
||||
}
|
||||
|
||||
const GroupModalRef = ref();
|
||||
|
||||
function openGroupModal() {
|
||||
const { openDrawer } = GroupModalRef.value;
|
||||
openDrawer();
|
||||
|
||||
Reference in New Issue
Block a user