mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-07 20:57:08 +08:00
refactor: 调整 eslint.config.js
This commit is contained in:
@@ -8,6 +8,10 @@ export default antfu(
|
|||||||
'vue/block-order': ['error', {
|
'vue/block-order': ['error', {
|
||||||
order: [['script', 'template'], 'style'],
|
order: [['script', 'template'], 'style'],
|
||||||
}], // 强制组件顶级元素的顺序
|
}], // 强制组件顶级元素的顺序
|
||||||
|
'vue/define-macros-order': ['error', {
|
||||||
|
order: ['defineOptions', 'defineModel', 'defineProps', 'defineEmits', 'defineSlots'],
|
||||||
|
defineExposeLast: true,
|
||||||
|
}], // 强制执行定义限制和定义弹出编译器宏的顺序
|
||||||
'vue/singleline-html-element-content-newline': 'off', // 要求在单行元素的内容前后换行
|
'vue/singleline-html-element-content-newline': 'off', // 要求在单行元素的内容前后换行
|
||||||
'vue/html-self-closing': ['off', {
|
'vue/html-self-closing': ['off', {
|
||||||
html: {
|
html: {
|
||||||
|
@@ -49,8 +49,6 @@ const open = (cron: string = '') => {
|
|||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
|
||||||
|
|
||||||
// 确定
|
// 确定
|
||||||
const handlerOk = () => {
|
const handlerOk = () => {
|
||||||
if (cronInputRef.value?.checkCron()) {
|
if (cronInputRef.value?.checkCron()) {
|
||||||
@@ -65,6 +63,8 @@ const handlerOk = () => {
|
|||||||
const handlerClose = () => {
|
const handlerClose = () => {
|
||||||
visible.value = false
|
visible.value = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
@@ -55,8 +55,6 @@ const attrs = useAttrs()
|
|||||||
const form = computed(() => ({ tableData: props.data }))
|
const form = computed(() => ({ tableData: props.data }))
|
||||||
|
|
||||||
const formRef = useTemplateRef('formRef')
|
const formRef = useTemplateRef('formRef')
|
||||||
defineExpose({ formRef })
|
|
||||||
|
|
||||||
const headerCellClass = (col: ColumnItem) => {
|
const headerCellClass = (col: ColumnItem) => {
|
||||||
return col.required ? 'gi_column_require' : ''
|
return col.required ? 'gi_column_require' : ''
|
||||||
}
|
}
|
||||||
@@ -122,6 +120,7 @@ const isDisabled: Props['cellDisabled'] = (p) => {
|
|||||||
if (typeof props?.cellDisabled === 'function') return props.cellDisabled(p)
|
if (typeof props?.cellDisabled === 'function') return props.cellDisabled(p)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
defineExpose({ formRef })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped></style>
|
<style lang='scss' scoped></style>
|
||||||
|
@@ -167,8 +167,6 @@ const isDisabled = (disabled?: ColumnsItemDisabled<boolean | object>) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ formRef })
|
|
||||||
|
|
||||||
props.columns.forEach((item) => {
|
props.columns.forEach((item) => {
|
||||||
if (item.request && typeof item.request === 'function' && item?.init) {
|
if (item.request && typeof item.request === 'function' && item?.init) {
|
||||||
item.request(props.modelValue).then((res) => {
|
item.request(props.modelValue).then((res) => {
|
||||||
@@ -213,6 +211,8 @@ watch(cloneForm as any, (newVal, oldVal) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
defineExpose({ formRef })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
@@ -106,8 +106,6 @@ const open = () => {
|
|||||||
visible.value = true
|
visible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ open })
|
|
||||||
|
|
||||||
// 默认显示的主题色列表
|
// 默认显示的主题色列表
|
||||||
const defaultColorList = [
|
const defaultColorList = [
|
||||||
'#165DFF',
|
'#165DFF',
|
||||||
@@ -139,6 +137,8 @@ const changeColor = (colorObj: ColorObj) => {
|
|||||||
if (!/^#[0-9A-Z]{6}/i.test(colorObj.hex)) return
|
if (!/^#[0-9A-Z]{6}/i.test(colorObj.hex)) return
|
||||||
appStore.setThemeColor(colorObj.hex)
|
appStore.setThemeColor(colorObj.hex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
Reference in New Issue
Block a user