mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-02-02 18:28:40 +08:00
chore: format code (#3753)
* feat: 格式化代码 * feat: 修改 gitlinter.yml node 版本配置 * feat: 补充格式化代码 --------- Co-authored-by: fuwedong <fuwendong5@outlook.com>
This commit is contained in:
parent
d53a5b22cc
commit
4e8ac0ec4c
4
.github/workflows/stale.yml
vendored
4
.github/workflows/stale.yml
vendored
@ -1,8 +1,8 @@
|
|||||||
name: "Close stale issues"
|
name: 'Close stale issues'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "30 1 * * *"
|
- cron: '30 1 * * *'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
|
2
.vscode/extensions.json
vendored
2
.vscode/extensions.json
vendored
@ -9,6 +9,6 @@
|
|||||||
"antfu.iconify",
|
"antfu.iconify",
|
||||||
"antfu.unocss",
|
"antfu.unocss",
|
||||||
"mikestead.dotenv",
|
"mikestead.dotenv",
|
||||||
"warmthsea.vscode-custom-code-color",
|
"warmthsea.vscode-custom-code-color"
|
||||||
]
|
]
|
||||||
}
|
}
|
26
.vscode/settings.json
vendored
26
.vscode/settings.json
vendored
@ -55,14 +55,7 @@
|
|||||||
"**/yarn.lock": true
|
"**/yarn.lock": true
|
||||||
},
|
},
|
||||||
"stylelint.enable": true,
|
"stylelint.enable": true,
|
||||||
"stylelint.validate": [
|
"stylelint.validate": ["css", "less", "postcss", "scss", "vue", "sass"],
|
||||||
"css",
|
|
||||||
"less",
|
|
||||||
"postcss",
|
|
||||||
"scss",
|
|
||||||
"vue",
|
|
||||||
"sass"
|
|
||||||
],
|
|
||||||
"path-intellisense.mappings": {
|
"path-intellisense.mappings": {
|
||||||
"@/": "${workspaceRoot}/src"
|
"@/": "${workspaceRoot}/src"
|
||||||
},
|
},
|
||||||
@ -101,24 +94,15 @@
|
|||||||
},
|
},
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||||
},
|
},
|
||||||
"i18n-ally.localesPaths": [
|
"i18n-ally.localesPaths": ["src/locales/lang"],
|
||||||
"src/locales/lang"
|
|
||||||
],
|
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested",
|
||||||
"i18n-ally.sortKeys": true,
|
"i18n-ally.sortKeys": true,
|
||||||
"i18n-ally.namespace": true,
|
"i18n-ally.namespace": true,
|
||||||
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
|
"i18n-ally.pathMatcher": "{locale}/{namespaces}.{ext}",
|
||||||
"i18n-ally.enabledParsers": [
|
"i18n-ally.enabledParsers": ["json", "ts", "js"],
|
||||||
"json",
|
|
||||||
"ts",
|
|
||||||
"js"
|
|
||||||
],
|
|
||||||
"i18n-ally.sourceLanguage": "en",
|
"i18n-ally.sourceLanguage": "en",
|
||||||
"i18n-ally.displayLanguage": "zh-CN",
|
"i18n-ally.displayLanguage": "zh-CN",
|
||||||
"i18n-ally.enabledFrameworks": [
|
"i18n-ally.enabledFrameworks": ["vue", "react"],
|
||||||
"vue",
|
|
||||||
"react"
|
|
||||||
],
|
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"antd",
|
"antd",
|
||||||
"antv",
|
"antv",
|
||||||
@ -188,5 +172,5 @@
|
|||||||
"terminal.integrated.scrollback": 10000,
|
"terminal.integrated.scrollback": 10000,
|
||||||
"nuxt.isNuxtApp": false,
|
"nuxt.isNuxtApp": false,
|
||||||
"vscodeCustomCodeColor.highlightValue": "v-auth",
|
"vscodeCustomCodeColor.highlightValue": "v-auth",
|
||||||
"vscodeCustomCodeColor.highlightValueColor": "#6366f1",
|
"vscodeCustomCodeColor.highlightValueColor": "#6366f1"
|
||||||
}
|
}
|
@ -163,7 +163,7 @@ export function useFormEvents({
|
|||||||
} else {
|
} else {
|
||||||
nestKeyArray.forEach((nestKey: string) => {
|
nestKeyArray.forEach((nestKey: string) => {
|
||||||
try {
|
try {
|
||||||
const value = get(values,nestKey)
|
const value = get(values, nestKey);
|
||||||
if (isDef(value)) {
|
if (isDef(value)) {
|
||||||
unref(formModel)[nestKey] = unref(value);
|
unref(formModel)[nestKey] = unref(value);
|
||||||
validKeys.push(nestKey);
|
validKeys.push(nestKey);
|
||||||
|
@ -127,7 +127,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (max-height: 600px) {
|
@media screen and (max-height: 600px) {
|
||||||
.ant-modal {
|
.ant-modal {
|
||||||
top: 60px;
|
top: 60px;
|
||||||
|
@ -180,7 +180,7 @@
|
|||||||
submitFunc: () => {
|
submitFunc: () => {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
validate()
|
validate()
|
||||||
.then((_e) => {
|
.then(() => {
|
||||||
resolve();
|
resolve();
|
||||||
console.log(getFieldsValueValiate());
|
console.log(getFieldsValueValiate());
|
||||||
createMessage.success(`请到控制台查看结果`);
|
createMessage.success(`请到控制台查看结果`);
|
||||||
|
@ -13,12 +13,9 @@
|
|||||||
</CollapseContainer>
|
</CollapseContainer>
|
||||||
<CollapseContainer title="表单组增删" class="my-3">
|
<CollapseContainer title="表单组增删" class="my-3">
|
||||||
<a-button @click="setGroup">设置初始值</a-button>
|
<a-button @click="setGroup">设置初始值</a-button>
|
||||||
<a-button class="m-2" @click="addGroup">
|
<a-button class="m-2" @click="addGroup"> 批量添加表单 </a-button>
|
||||||
批量添加表单
|
|
||||||
</a-button>
|
|
||||||
<a-button @click="delGroup">批量减少表单</a-button>
|
<a-button @click="delGroup">批量减少表单</a-button>
|
||||||
<BasicForm @register="registerGroup" @submit="handleSubmitGroup">
|
<BasicForm @register="registerGroup" @submit="handleSubmitGroup" />
|
||||||
</BasicForm>
|
|
||||||
</CollapseContainer>
|
</CollapseContainer>
|
||||||
</PageWrapper>
|
</PageWrapper>
|
||||||
</template>
|
</template>
|
||||||
@ -29,6 +26,7 @@
|
|||||||
import { PageWrapper } from '@/components/Page';
|
import { PageWrapper } from '@/components/Page';
|
||||||
|
|
||||||
import { useMessage } from '@/hooks/web/useMessage';
|
import { useMessage } from '@/hooks/web/useMessage';
|
||||||
|
|
||||||
const { createMessage } = useMessage();
|
const { createMessage } = useMessage();
|
||||||
const count = ref(0);
|
const count = ref(0);
|
||||||
const [register, { appendSchemaByField, removeSchemaByField, validate }] = useForm({
|
const [register, { appendSchemaByField, removeSchemaByField, validate }] = useForm({
|
||||||
@ -60,7 +58,7 @@
|
|||||||
async function handleSubmit() {
|
async function handleSubmit() {
|
||||||
try {
|
try {
|
||||||
const data = await validate();
|
const data = await validate();
|
||||||
createMessage.success("请前往控制台查看输出")
|
createMessage.success('请前往控制台查看输出');
|
||||||
console.log(data);
|
console.log(data);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
@ -136,7 +134,12 @@
|
|||||||
}
|
}
|
||||||
const [
|
const [
|
||||||
registerGroup,
|
registerGroup,
|
||||||
{ appendSchemaByField: appendSchemaByFieldGroup, removeSchemaByField:removeSchemaByFieldGroup, getFieldsValue:getFieldsValueGroup,setFieldsValue },
|
{
|
||||||
|
appendSchemaByField: appendSchemaByFieldGroup,
|
||||||
|
removeSchemaByField: removeSchemaByFieldGroup,
|
||||||
|
getFieldsValue: getFieldsValueGroup,
|
||||||
|
setFieldsValue,
|
||||||
|
},
|
||||||
] = useForm({
|
] = useForm({
|
||||||
schemas: [
|
schemas: [
|
||||||
{
|
{
|
||||||
@ -144,7 +147,6 @@
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
label: '字段a',
|
label: '字段a',
|
||||||
colProps: { span: 9 },
|
colProps: { span: 9 },
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: `field[${count.value}].b`,
|
field: `field[${count.value}].b`,
|
||||||
@ -152,7 +154,6 @@
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
label: '字段b',
|
label: '字段b',
|
||||||
},
|
},
|
||||||
|
|
||||||
],
|
],
|
||||||
labelWidth: 100,
|
labelWidth: 100,
|
||||||
actionColOptions: { span: 24 },
|
actionColOptions: { span: 24 },
|
||||||
@ -161,7 +162,9 @@
|
|||||||
|
|
||||||
function addGroup() {
|
function addGroup() {
|
||||||
count.value++;
|
count.value++;
|
||||||
appendSchemaByFieldGroup([ {
|
appendSchemaByFieldGroup(
|
||||||
|
[
|
||||||
|
{
|
||||||
field: `field[${count.value}].a`,
|
field: `field[${count.value}].a`,
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
colProps: { span: 9 },
|
colProps: { span: 9 },
|
||||||
@ -173,7 +176,9 @@
|
|||||||
colProps: { span: 9 },
|
colProps: { span: 9 },
|
||||||
label: '字段b',
|
label: '字段b',
|
||||||
},
|
},
|
||||||
],"")
|
],
|
||||||
|
'',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function delGroup() {
|
function delGroup() {
|
||||||
@ -183,15 +188,17 @@
|
|||||||
|
|
||||||
function setGroup() {
|
function setGroup() {
|
||||||
setFieldsValue({
|
setFieldsValue({
|
||||||
field:[{
|
field: [
|
||||||
a:"默认a",
|
{
|
||||||
b:"默认b"
|
a: '默认a',
|
||||||
}]
|
b: '默认b',
|
||||||
})
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSubmitGroup() {
|
function handleSubmitGroup() {
|
||||||
createMessage.success("请前往控制台查看输出")
|
createMessage.success('请前往控制台查看输出');
|
||||||
console.log(getFieldsValueGroup())
|
console.log(getFieldsValueGroup());
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
import { areaRecord } from '@/api/demo/cascader';
|
import { areaRecord } from '@/api/demo/cascader';
|
||||||
import { uploadApi } from '@/api/sys/upload';
|
import { uploadApi } from '@/api/sys/upload';
|
||||||
|
|
||||||
let debounceOptionsFn = useDebounceFn(onSearch, 300)
|
let debounceOptionsFn = useDebounceFn(onSearch, 300);
|
||||||
const valueSelectA = ref<string[]>([]);
|
const valueSelectA = ref<string[]>([]);
|
||||||
const valueSelectB = ref<string[]>([]);
|
const valueSelectB = ref<string[]>([]);
|
||||||
const options = ref<Required<SelectProps>['options']>([]);
|
const options = ref<Required<SelectProps>['options']>([]);
|
||||||
|
Loading…
Reference in New Issue
Block a user