配置变化: eslint配置变化
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = {
|
||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||
'@typescript-eslint/no-redeclare': 'error',
|
||||
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
|
||||
'@typescript-eslint/no-unused-vars': [2],
|
||||
'@typescript-eslint/no-unused-vars': ['off'],
|
||||
'vue/custom-event-name-casing': 'off',
|
||||
'vue/attributes-order': 'off',
|
||||
'vue/one-component-per-file': 'off',
|
||||
@@ -67,7 +67,8 @@ module.exports = {
|
||||
'generator-star-spacing': 'off',
|
||||
'no-unreachable': 'off',
|
||||
'no-multiple-template-root': 'off',
|
||||
'no-unused-vars': 'error',
|
||||
'no-unused-vars': 'warn',
|
||||
'vue/no-unused-vars': "off",
|
||||
'no-v-model-argument': 'off',
|
||||
'no-case-declarations': 'off',
|
||||
'no-console': 'error',
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<script type="text/javascript">
|
||||
var _hmt = _hmt || [];
|
||||
// let _hmt = _hmt || [];
|
||||
(function () {
|
||||
var hm = document.createElement('script');
|
||||
let hm = document.createElement('script');
|
||||
hm.src = 'https://hm.baidu.com/hm.js?d9c8b87d10717013641458b300c552e4';
|
||||
var s = document.getElementsByTagName('script')[0];
|
||||
let s = document.getElementsByTagName('script')[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -158,7 +158,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
|
||||
{
|
||||
path: '/system/configSystem',
|
||||
name: 'configSystem',
|
||||
component: () => import('/@/views/system/dic/index.vue'),
|
||||
component: () => import('/@/views/system/dept/index.vue'),
|
||||
meta: {
|
||||
title: 'message.router.configSystem',
|
||||
isLink: '',
|
||||
|
||||
@@ -54,12 +54,6 @@ export const createCrudOptions = function ({ crudExpose }: { crudExpose: CrudExp
|
||||
align: 'center',
|
||||
width: '70px',
|
||||
columnSetDisabled: true, //禁止在列设置中选择
|
||||
formatter: (context) => {
|
||||
//计算序号,你可以自定义计算规则,此处为翻页累加
|
||||
let index = context.index ?? 1;
|
||||
let pagination = crudExpose.crudBinding.value.pagination;
|
||||
return ((pagination.currentPage ?? 1) - 1) * pagination.pageSize + index + 1;
|
||||
},
|
||||
},
|
||||
},
|
||||
search: {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
import { request } from '/@/utils/service';
|
||||
import { PageQuery, AddReq, DelReq, EditReq, InfoReq } from '@fast-crud/fast-crud';
|
||||
import {request} from '/@/utils/service';
|
||||
import {PageQuery, AddReq, DelReq, EditReq, InfoReq} from '@fast-crud/fast-crud';
|
||||
|
||||
export const apiPrefix = '/api/system/message_center/';
|
||||
|
||||
export function GetList(query: PageQuery) {
|
||||
return request({
|
||||
url: apiPrefix,
|
||||
@@ -9,6 +10,7 @@ export function GetList(query: PageQuery) {
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
export function GetObj(id: InfoReq) {
|
||||
return request({
|
||||
url: apiPrefix + id,
|
||||
@@ -17,7 +19,6 @@ export function GetObj(id: InfoReq) {
|
||||
}
|
||||
|
||||
export function AddObj(obj: AddReq) {
|
||||
console.log(20,obj)
|
||||
return request({
|
||||
url: apiPrefix,
|
||||
method: 'post',
|
||||
@@ -37,6 +38,6 @@ export function DelObj(id: DelReq) {
|
||||
return request({
|
||||
url: apiPrefix + id + '/',
|
||||
method: 'delete',
|
||||
data: { id },
|
||||
data: {id},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -223,15 +223,7 @@ export const createCrudOptions = function ({crudExpose}: { crudExpose: CrudExpos
|
||||
required: true,
|
||||
message: '必填项'
|
||||
}
|
||||
],
|
||||
itemProps: {
|
||||
class: {yxtInput: true}
|
||||
}
|
||||
},
|
||||
component: {
|
||||
name: 'manyToMany',
|
||||
valueBinding: 'dept_info',
|
||||
children: 'name'
|
||||
]
|
||||
}
|
||||
},
|
||||
content: {
|
||||
@@ -249,9 +241,9 @@ export const createCrudOptions = function ({crudExpose}: { crudExpose: CrudExpos
|
||||
}
|
||||
],
|
||||
component: {
|
||||
disabled: compute(({form}) => {
|
||||
return form.disabled;
|
||||
}),
|
||||
// disabled: compute(({form}) => {
|
||||
// return form.disabled;
|
||||
// }),
|
||||
id: "1", // 当同一个页面有多个editor时,需要配置不同的id
|
||||
config: {},
|
||||
uploader: {
|
||||
@@ -264,6 +256,6 @@ export const createCrudOptions = function ({crudExpose}: { crudExpose: CrudExpos
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<fs-page>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
|
||||
<fs-crud ref="crudRef" v-bind="crudBinding"></fs-crud>
|
||||
</fs-page>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from 'vue';
|
||||
import { useExpose, useCrud } from '@fast-crud/fast-crud';
|
||||
import { createCrudOptions } from './crud';
|
||||
import {ref, onMounted} from 'vue';
|
||||
import {useExpose, useCrud} from '@fast-crud/fast-crud';
|
||||
import {createCrudOptions} from './crud';
|
||||
// crud组件的ref
|
||||
const crudRef = ref();
|
||||
// crud 配置的ref
|
||||
const crudBinding = ref();
|
||||
// 暴露的方法
|
||||
const { crudExpose } = useExpose({ crudRef, crudBinding });
|
||||
const {crudExpose} = useExpose({crudRef, crudBinding});
|
||||
// 你的crud配置
|
||||
const { crudOptions } = createCrudOptions({ crudExpose });
|
||||
const {crudOptions} = createCrudOptions({crudExpose});
|
||||
// 初始化crud配置
|
||||
const { resetCrudOptions } = useCrud({ crudExpose, crudOptions });
|
||||
const {resetCrudOptions} = useCrud({crudExpose, crudOptions});
|
||||
|
||||
// 页面打开后获取列表数据
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user