mirror of
				https://github.com/soybeanjs/soybean-admin.git
				synced 2025-11-04 15:53:43 +08:00 
			
		
		
		
	chore(projects): correct word spell & eslint fix code
This commit is contained in:
		@@ -10,7 +10,8 @@ module.exports = {
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      files: ['*.vue'],
 | 
					      files: ['*.vue'],
 | 
				
			||||||
      rules: {
 | 
					      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
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								.vscode/settings.json
									
									
									
									
										vendored
									
									
								
							@@ -16,7 +16,10 @@
 | 
				
			|||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "cSpell.words": [
 | 
					  "cSpell.words": [
 | 
				
			||||||
    "AMAP",
 | 
					    "AMAP",
 | 
				
			||||||
 | 
					    "antdesign",
 | 
				
			||||||
    "antv",
 | 
					    "antv",
 | 
				
			||||||
 | 
					    "apacheecharts",
 | 
				
			||||||
 | 
					    "areaspline",
 | 
				
			||||||
    "bmapgl",
 | 
					    "bmapgl",
 | 
				
			||||||
    "colord",
 | 
					    "colord",
 | 
				
			||||||
    "echarts",
 | 
					    "echarts",
 | 
				
			||||||
@@ -25,15 +28,24 @@
 | 
				
			|||||||
    "iconify",
 | 
					    "iconify",
 | 
				
			||||||
    "jsapi",
 | 
					    "jsapi",
 | 
				
			||||||
    "naiveui",
 | 
					    "naiveui",
 | 
				
			||||||
 | 
					    "Popconfirm",
 | 
				
			||||||
 | 
					    "Posva",
 | 
				
			||||||
 | 
					    "Shenzhen",
 | 
				
			||||||
    "Sider",
 | 
					    "Sider",
 | 
				
			||||||
    "tauri",
 | 
					    "tauri",
 | 
				
			||||||
    "unocss",
 | 
					    "unocss",
 | 
				
			||||||
    "unplugin",
 | 
					    "unplugin",
 | 
				
			||||||
    "vditor",
 | 
					    "vditor",
 | 
				
			||||||
 | 
					    "VERCEL",
 | 
				
			||||||
 | 
					    "Vite",
 | 
				
			||||||
 | 
					    "vitejs",
 | 
				
			||||||
 | 
					    "vuedraggable",
 | 
				
			||||||
    "vueuse",
 | 
					    "vueuse",
 | 
				
			||||||
    "wangeditor",
 | 
					    "wangeditor",
 | 
				
			||||||
    "wechat",
 | 
					    "wechat",
 | 
				
			||||||
    "xgplayer"
 | 
					    "xgplayer",
 | 
				
			||||||
 | 
					    "yanbowe",
 | 
				
			||||||
 | 
					    "ភាសាខ្មែរ"
 | 
				
			||||||
  ],
 | 
					  ],
 | 
				
			||||||
  "editor.codeActionsOnSave": {
 | 
					  "editor.codeActionsOnSave": {
 | 
				
			||||||
    "source.fixAll.eslint": true
 | 
					    "source.fixAll.eslint": true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
    <div class="w-56px h-56px my-36px">
 | 
					    <div class="w-56px h-56px my-36px">
 | 
				
			||||||
      <div class="relative h-full animate-spin">
 | 
					      <div class="relative h-full animate-spin">
 | 
				
			||||||
        <div
 | 
					        <div
 | 
				
			||||||
          v-for="(item, index) in lodingClasses"
 | 
					          v-for="(item, index) in loadingClasses"
 | 
				
			||||||
          :key="index"
 | 
					          :key="index"
 | 
				
			||||||
          class="absolute w-16px h-16px bg-primary rounded-8px animate-pulse"
 | 
					          class="absolute w-16px h-16px bg-primary rounded-8px animate-pulse"
 | 
				
			||||||
          :class="item"
 | 
					          :class="item"
 | 
				
			||||||
@@ -20,7 +20,7 @@ import { sessionStg, getRgbOfColor } from '@/utils';
 | 
				
			|||||||
import { $t } from '@/locales';
 | 
					import { $t } from '@/locales';
 | 
				
			||||||
import themeSettings from '@/settings/theme.json';
 | 
					import themeSettings from '@/settings/theme.json';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const lodingClasses = [
 | 
					const loadingClasses = [
 | 
				
			||||||
  'left-0 top-0',
 | 
					  'left-0 top-0',
 | 
				
			||||||
  'left-0 bottom-0 animate-delay-500',
 | 
					  'left-0 bottom-0 animate-delay-500',
 | 
				
			||||||
  'right-0 top-0 animate-delay-1000',
 | 
					  'right-0 top-0 animate-delay-1000',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,7 +8,7 @@ import { isNumber } from '@/utils';
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
defineOptions({ name: 'CountTo' });
 | 
					defineOptions({ name: 'CountTo' });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type TansitionKey = keyof typeof TransitionPresets;
 | 
					type TransitionKey = keyof typeof TransitionPresets;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
interface Props {
 | 
					interface Props {
 | 
				
			||||||
  /** 初始值 */
 | 
					  /** 初始值 */
 | 
				
			||||||
@@ -32,7 +32,7 @@ interface Props {
 | 
				
			|||||||
  /** 使用缓冲动画函数 */
 | 
					  /** 使用缓冲动画函数 */
 | 
				
			||||||
  useEasing?: boolean;
 | 
					  useEasing?: boolean;
 | 
				
			||||||
  /** 缓冲动画函数类型 */
 | 
					  /** 缓冲动画函数类型 */
 | 
				
			||||||
  transition?: TansitionKey;
 | 
					  transition?: TransitionKey;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const props = withDefaults(defineProps<Props>(), {
 | 
					const props = withDefaults(defineProps<Props>(), {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -37,13 +37,13 @@ const bindAttrs = computed<{ class: string; style: string }>(() => ({
 | 
				
			|||||||
}));
 | 
					}));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const symbolId = computed(() => {
 | 
					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 defaultLocalIcon = 'no-icon';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const icon = props.localIcon || defaultLocalIcon;
 | 
					  const icon = props.localIcon || defaultLocalIcon;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return `#${preffix}-${icon}`;
 | 
					  return `#${prefix}-${icon}`;
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** 渲染本地icon */
 | 
					/** 渲染本地icon */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,6 +22,9 @@ defineOptions({ name: 'SearchFooter' });
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
.icon {
 | 
					.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>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,4 +7,6 @@ import 'virtual:svg-icons-register';
 | 
				
			|||||||
import '../styles/css/global.css';
 | 
					import '../styles/css/global.css';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/** import static assets: css, js , font and so on. - [引入静态资源,css、js和字体文件等] */
 | 
					/** import static assets: css, js , font and so on. - [引入静态资源,css、js和字体文件等] */
 | 
				
			||||||
export default function setupAssets() {}
 | 
					export default function setupAssets() {
 | 
				
			||||||
 | 
					  //
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,7 @@ interface DataSource {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const { loading, startLoading, endLoading, empty, setEmpty } = useLoadingEmpty();
 | 
					const { loading, startLoading, endLoading, empty, setEmpty } = useLoadingEmpty();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const columns: DataTableColumn[] = [
 | 
					const columns: DataTableColumn<DataSource>[] = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    title: 'Name',
 | 
					    title: 'Name',
 | 
				
			||||||
    key: 'name',
 | 
					    key: 'name',
 | 
				
			||||||
@@ -49,13 +49,22 @@ const columns: DataTableColumn[] = [
 | 
				
			|||||||
    key: 'action',
 | 
					    key: 'action',
 | 
				
			||||||
    title: 'Action',
 | 
					    title: 'Action',
 | 
				
			||||||
    align: 'center',
 | 
					    align: 'center',
 | 
				
			||||||
    render: () => {
 | 
					    render: row => {
 | 
				
			||||||
      return (
 | 
					      return (
 | 
				
			||||||
        <NSpace justify={'center'}>
 | 
					        <NSpace justify={'center'}>
 | 
				
			||||||
          <NButton size={'small'} onClick={() => {}}>
 | 
					          <NButton
 | 
				
			||||||
 | 
					            size={'small'}
 | 
				
			||||||
 | 
					            onClick={() => {
 | 
				
			||||||
 | 
					              handleEdit(row.name);
 | 
				
			||||||
 | 
					            }}
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
            编辑
 | 
					            编辑
 | 
				
			||||||
          </NButton>
 | 
					          </NButton>
 | 
				
			||||||
          <NPopconfirm onPositiveClick={() => {}}>
 | 
					          <NPopconfirm
 | 
				
			||||||
 | 
					            onPositiveClick={() => {
 | 
				
			||||||
 | 
					              handleDelete(row.name);
 | 
				
			||||||
 | 
					            }}
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
            {{
 | 
					            {{
 | 
				
			||||||
              default: () => '确认删除',
 | 
					              default: () => '确认删除',
 | 
				
			||||||
              trigger: () => <NButton size={'small'}>删除</NButton>
 | 
					              trigger: () => <NButton size={'small'}>删除</NButton>
 | 
				
			||||||
@@ -99,6 +108,14 @@ function getEmptyDataSource() {
 | 
				
			|||||||
  }, 1000);
 | 
					  }, 1000);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function handleEdit(_name: string) {
 | 
				
			||||||
 | 
					  //
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function handleDelete(_name: string) {
 | 
				
			||||||
 | 
					  //
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
onMounted(() => {
 | 
					onMounted(() => {
 | 
				
			||||||
  getDataSource();
 | 
					  getDataSource();
 | 
				
			||||||
});
 | 
					});
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user