Skip to content

Commit

Permalink
chore(projects): correct word spell & eslint fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Aug 3, 2023
1 parent 24cf1d9 commit cffc30a
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module.exports = {
{
files: ['*.vue'],
rules: {
'no-undef': 'off' // use tsc to check the ts code of the vue
'no-undef': 'off', // use tsc to check the ts code of the vue
'vue/no-setup-props-destructure': 'off' // wait to fix this rule
}
}
],
Expand Down
14 changes: 13 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
],
"cSpell.words": [
"AMAP",
"antdesign",
"antv",
"apacheecharts",
"areaspline",
"bmapgl",
"colord",
"echarts",
Expand All @@ -25,15 +28,24 @@
"iconify",
"jsapi",
"naiveui",
"Popconfirm",
"Posva",
"Shenzhen",
"Sider",
"tauri",
"unocss",
"unplugin",
"vditor",
"VERCEL",
"Vite",
"vitejs",
"vuedraggable",
"vueuse",
"wangeditor",
"wechat",
"xgplayer"
"xgplayer",
"yanbowe",
"ភាសាខ្មែរ"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/app-loading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="w-56px h-56px my-36px">
<div class="relative h-full animate-spin">
<div
v-for="(item, index) in lodingClasses"
v-for="(item, index) in loadingClasses"
:key="index"
class="absolute w-16px h-16px bg-primary rounded-8px animate-pulse"
:class="item"
Expand All @@ -20,7 +20,7 @@ import { sessionStg, getRgbOfColor } from '@/utils';
import { $t } from '@/locales';
import themeSettings from '@/settings/theme.json';
const lodingClasses = [
const loadingClasses = [
'left-0 top-0',
'left-0 bottom-0 animate-delay-500',
'right-0 top-0 animate-delay-1000',
Expand Down
4 changes: 2 additions & 2 deletions src/components/custom/count-to.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { isNumber } from '@/utils';
defineOptions({ name: 'CountTo' });
type TansitionKey = keyof typeof TransitionPresets;
type TransitionKey = keyof typeof TransitionPresets;
interface Props {
/** 初始值 */
Expand All @@ -32,7 +32,7 @@ interface Props {
/** 使用缓冲动画函数 */
useEasing?: boolean;
/** 缓冲动画函数类型 */
transition?: TansitionKey;
transition?: TransitionKey;
}
const props = withDefaults(defineProps<Props>(), {
Expand Down
4 changes: 2 additions & 2 deletions src/components/custom/svg-icon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ const bindAttrs = computed<{ class: string; style: string }>(() => ({
}));
const symbolId = computed(() => {
const { VITE_ICON_LOCAL_PREFIX: preffix } = import.meta.env;
const { VITE_ICON_LOCAL_PREFIX: prefix } = import.meta.env;
const defaultLocalIcon = 'no-icon';
const icon = props.localIcon || defaultLocalIcon;
return `#${preffix}-${icon}`;
return `#${prefix}-${icon}`;
});
/** 渲染本地icon */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ defineOptions({ name: 'SearchFooter' });

<style lang="scss" scoped>
.icon {
box-shadow: inset 0 -2px #cdcde6, inset 0 0 1px 1px #fff, 0 1px 2px 1px #1e235a66;
box-shadow:
inset 0 -2px #cdcde6,
inset 0 0 1px 1px #fff,
0 1px 2px 1px #1e235a66;
}
</style>
4 changes: 3 additions & 1 deletion src/plugins/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ import 'virtual:svg-icons-register';
import '../styles/css/global.css';

/** import static assets: css, js , font and so on. - [引入静态资源,css、js和字体文件等] */
export default function setupAssets() {}
export default function setupAssets() {
//
}
25 changes: 21 additions & 4 deletions src/views/component/table/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ interface DataSource {
const { loading, startLoading, endLoading, empty, setEmpty } = useLoadingEmpty();
const columns: DataTableColumn[] = [
const columns: DataTableColumn<DataSource>[] = [
{
title: 'Name',
key: 'name',
Expand All @@ -49,13 +49,22 @@ const columns: DataTableColumn[] = [
key: 'action',
title: 'Action',
align: 'center',
render: () => {
render: row => {
return (
<NSpace justify={'center'}>
<NButton size={'small'} onClick={() => {}}>
<NButton
size={'small'}
onClick={() => {
handleEdit(row.name);
}}
>
编辑
</NButton>
<NPopconfirm onPositiveClick={() => {}}>
<NPopconfirm
onPositiveClick={() => {
handleDelete(row.name);
}}
>
{{
default: () => '确认删除',
trigger: () => <NButton size={'small'}>删除</NButton>
Expand Down Expand Up @@ -99,6 +108,14 @@ function getEmptyDataSource() {
}, 1000);
}
function handleEdit(_name: string) {
//
}
function handleDelete(_name: string) {
//
}
onMounted(() => {
getDataSource();
});
Expand Down

1 comment on commit cffc30a

@vercel
Copy link

@vercel vercel bot commented on cffc30a Aug 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.