feat(eslint): eslint-import规则调整&自动修复

This commit is contained in:
baiqi 2023-10-17 10:35:21 +08:00 committed by rubylliu
parent d9fd9b11aa
commit 098320c68f
228 changed files with 1227 additions and 849 deletions

View File

@ -3,4 +3,4 @@
dist
postcss.config.js
*.md
/src/assets/icon-font
/src/assets/icon-font/iconfont.js

View File

@ -18,7 +18,7 @@ module.exports = {
'node': true,
'vue/setup-compiler-macros': true,
},
plugins: ['@typescript-eslint'],
plugins: ['@typescript-eslint', 'simple-import-sort'],
extends: [
// Airbnb JavaScript Style Guide https://github.com/airbnb/javascript
'airbnb-base',
@ -75,6 +75,44 @@ module.exports = {
'no-plusplus': 'off',
'no-underscore-dangle': 'off',
'vue/attributes-order': 1,
'simple-import-sort/exports': 'error',
// 调整导入语句的顺序
'simple-import-sort/imports': [
'error',
{
groups: [
[
'^vue$',
'^vue-router$',
'^vue-i18n$',
'^pinia$',
'^@vueuse/core$',
'^@arco-design/web-vue$',
'^monaco-editor$',
'^lodash-es$',
'^axios$',
'^dayjs$',
'^jsencrypt$',
'^echarts$',
'^color$',
], // node依赖
['.*/assets/.*', '^@/assets$'], // 项目静态资源
['^@/components/pure/.*', '^@/components/business/.*', '.*\\.vue$'], // 组件
[
'^@/api($|/.*)',
'^@/config($|/.*)',
'^@/directive($|/.*)',
'^@/hooks($|/.*)',
'^@/locale($|/.*)',
'^@/router($|/.*)',
'^@/store($|/.*)',
'^@/utils($|/.*)',
], // 项目公共模块
['^@/models($|/.*)', '^@/enums($|/.*)'], // model、enum
['^type'], // 第三方类型声明 or 全局类型声明
],
},
],
},
// 对特定文件进行配置
overrides: [

View File

@ -1,6 +1,7 @@
import Footer from '@/components/pure/footer/index.vue';
import { mount } from '@vue/test-utils';
import { describe, expect, test } from 'vitest';
import Footer from '@/components/pure/footer/index.vue';
describe('Footer', () => {
test('renders the correct text', () => {

View File

@ -1,11 +1,14 @@
import { mount } from '@vue/test-utils';
import { describe, expect, test } from 'vitest';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import { nextTick } from 'vue';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import { MsTableColumn } from '@/components/pure/ms-table/type';
import useTable from '@/components/pure/ms-table/useTable';
import { getTableList } from '@/api/modules/api-test/index';
import { mount } from '@vue/test-utils';
import { describe, expect, test } from 'vitest';
const columns: MsTableColumn = [
{
title: 'ID',

View File

@ -1,19 +1,21 @@
import { describe, expect, test } from 'vitest';
import logo from '@/assets/svg/logo.svg';
import {
isArray,
isObject,
isBlob,
isEmptyObject,
isExist,
isFile,
isFunction,
isNull,
isUndefined,
isNumber,
isString,
isObject,
isRegExp,
isFile,
isBlob,
isString,
isUndefined,
} from '@/utils/is';
import logo from '@/assets/svg/logo.svg';
import { describe, expect, test } from 'vitest';
describe('Is tool', () => {
test('isArray', () => {

View File

@ -6,8 +6,8 @@
* Although the Pro project is full of imported components, this plugin will be used by default.
* Pro项目中是全量引入组件使
*/
import Components from 'unplugin-vue-components/vite';
import { ArcoResolver } from 'unplugin-vue-components/resolvers';
import Components from 'unplugin-vue-components/vite';
export default function configArcoResolverPlugin() {
const arcoResolverPlugin = Components({

View File

@ -2,8 +2,8 @@
* Generation packaging analysis
*
*/
import visualizer from 'rollup-plugin-visualizer';
import { isReportMode } from '../utils';
import visualizer from 'rollup-plugin-visualizer';
export default function configVisualizerPlugin() {
if (isReportMode()) {

View File

@ -1,13 +1,13 @@
import { resolve } from 'path';
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import vueJsx from '@vitejs/plugin-vue-jsx';
import svgLoader from 'vite-svg-loader';
import { resolve } from 'path';
import AutoImport from 'unplugin-auto-import/vite';
import { defineConfig } from 'vite';
// import configArcoStyleImportPlugin from './plugin/arcoStyleImport';
// import configArcoResolverPlugin from './plugin/arcoResolver';
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons';
import vueSetupExtend from 'vite-plugin-vue-setup-extend';
import AutoImport from 'unplugin-auto-import/vite';
import svgLoader from 'vite-svg-loader';
export default defineConfig({
plugins: [

View File

@ -1,7 +1,7 @@
/// <reference types="vitest" />
import baseConfig from './vite.config.base';
import { mergeConfig } from 'vite';
import eslint from 'vite-plugin-eslint';
import baseConfig from './vite.config.base';
export default mergeConfig(
{

View File

@ -1,8 +1,8 @@
import { mergeConfig } from 'vite';
import baseConfig from './vite.config.base';
import configCompressPlugin from './plugin/compress';
import configVisualizerPlugin from './plugin/visualizer';
import configImageminPlugin from './plugin/imagemin';
import configVisualizerPlugin from './plugin/visualizer';
import baseConfig from './vite.config.base';
import { mergeConfig } from 'vite';
export default mergeConfig(
{

View File

@ -12,7 +12,7 @@
"report": "cross-env REPORT=true npm run build",
"preview": "npm run build && vite preview --host",
"type:check": "vue-tsc --noEmit --skipLibCheck",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .eslintignore",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
"lint:styles": "stylelint 'src/**/*.{vue,html,css,scss,less}' --fix",
"lint-staged": "npx lint-staged",
"prepare": "cd .. && husky install frontend/.husky",
@ -37,7 +37,7 @@
"dependencies": {
"@7polo/kity": "2.0.8",
"@7polo/kityminder-core": "1.4.53",
"@arco-design/web-vue": "^2.51.2",
"@arco-design/web-vue": "^2.52.0",
"@arco-themes/vue-ms-theme-default": "^0.0.30",
"@form-create/arco-design": "^3.1.23",
"@halo-dev/richtext-editor": "0.0.0-alpha.32",
@ -50,7 +50,6 @@
"hotbox-minder": "1.0.15",
"jsencrypt": "^3.3.2",
"jsonpath-picker-vanilla": "^1.2.4",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"mitt": "^3.0.1",
"monaco-editor": "^0.39.0",
@ -95,6 +94,7 @@
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-simple-import-sort": "^10.0.0",
"eslint-plugin-vue": "^9.17.0",
"fast-glob": "^3.3.1",
"husky": "^8.0.3",
@ -146,4 +146,4 @@
"rollup": "^2.79.1",
"gifsicle": "5.2.0"
}
}
}

View File

@ -1,32 +1,30 @@
<template>
<a-config-provider :locale="locale">
<router-view />
<template #empty>
<MsEmpty />
</template>
<!-- <global-setting /> -->
</a-config-provider>
</template>
<script lang="ts" setup>
import { computed, onBeforeMount, onMounted } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
import { useRoute, useRouter } from 'vue-router';
import { useEventListener, useWindowSize } from '@vueuse/core';
import { saveBaseUrl } from '@/api/modules/setting/config';
import { GetPlatformIconUrl } from '@/api/requrls/setting/config';
// import GlobalSetting from '@/components/pure/global-setting/index.vue';
import useLocale from '@/locale/useLocale';
import { WHITE_LIST } from '@/router/constants';
import { useUserStore } from '@/store';
import useAppStore from '@/store/modules/app';
import useLicenseStore from '@/store/modules/setting/license';
import { saveBaseUrl } from '@/api/modules/setting/config';
import { GetPlatformIconUrl } from '@/api/requrls/setting/config';
import { getLocalStorage, setLocalStorage } from '@/utils/local-storage';
import { watchStyle, watchTheme, setFavicon } from '@/utils/theme';
import { WorkbenchRouteEnum } from './enums/routeEnum';
import { setFavicon, watchStyle, watchTheme } from '@/utils/theme';
import { getPublicKeyRequest } from './api/modules/user';
import MsEmpty from '@/components/pure/ms-empty/index.vue';
import { useEventListener, useWindowSize } from '@vueuse/core';
import { WHITE_LIST } from '@/router/constants';
import { WorkbenchRouteEnum } from './enums/routeEnum';
import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
const appStore = useAppStore();
const userStore = useUserStore();

View File

@ -1,12 +1,14 @@
import axios from 'axios';
import { AxiosCanceler } from './axiosCancel';
import { isFunction } from '@/utils/is';
import { cloneDeep } from 'lodash-es';
import axios from 'axios';
import { isFunction } from '@/utils/is';
import { ContentTypeEnum } from '@/enums/httpEnum';
import type { AxiosRequestConfig, AxiosInstance, AxiosResponse, AxiosError } from 'axios';
import type { RequestOptions, Result, UploadFileParams } from '#/axios';
import { AxiosCanceler } from './axiosCancel';
import type { CreateAxiosOptions } from './axiosTransform';
import type { RequestOptions, Result, UploadFileParams } from '#/axios';
import type { AxiosError, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
export * from './axiosTransform';

View File

@ -1,7 +1,9 @@
import type { AxiosRequestConfig, Canceler } from 'axios';
import axios from 'axios';
import { isFunction } from '@/utils/is';
import type { AxiosRequestConfig, Canceler } from 'axios';
let pendingMap = new Map<string, Canceler>();
export const getPendingUrl = (config: AxiosRequestConfig) => [config.method, config.url].join('&');

View File

@ -1,8 +1,8 @@
/**
* Data processing class, can be configured according to the project
*/
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
import type { RequestOptions, Result } from '#/axios';
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
export abstract class AxiosTransform {
/**

View File

@ -1,8 +1,10 @@
import { Message, Modal } from '@arco-design/web-vue';
import { useI18n } from '@/hooks/useI18n';
import type { ErrorMessageMode } from '#/axios';
import useUser from '@/hooks/useUser';
import type { ErrorMessageMode } from '#/axios';
export default function checkStatus(status: number, msg: string, errorMessageMode: ErrorMessageMode = 'message'): void {
const { t } = useI18n();
const { logout, isLoginPage } = useUser();

View File

@ -1,19 +1,21 @@
import { MSAxios } from './Axios';
import checkStatus from './checkStatus';
import { Message, Modal } from '@arco-design/web-vue';
import { RequestEnum, ContentTypeEnum } from '@/enums/httpEnum';
import { isString } from '@/utils/is';
import { getToken } from '@/utils/auth';
import { setObjToUrlParams, deepMerge } from '@/utils';
import { useI18n } from '@/hooks/useI18n';
import useLocale from '@/locale/useLocale';
import { joinTimestamp } from './helper';
import useAppStore from '@/store/modules/app';
import { deepMerge, setObjToUrlParams } from '@/utils';
import { getToken } from '@/utils/auth';
import { isString } from '@/utils/is';
import type { AxiosResponse } from 'axios';
import { ContentTypeEnum, RequestEnum } from '@/enums/httpEnum';
import { MSAxios } from './Axios';
import type { AxiosTransform, CreateAxiosOptions } from './axiosTransform';
import type { Recordable } from '#/global';
import checkStatus from './checkStatus';
import { joinTimestamp } from './helper';
import type { RequestOptions, Result } from '#/axios';
import type { Recordable } from '#/global';
import type { AxiosResponse } from 'axios';
/**
* @description: 便

View File

@ -1,7 +1,8 @@
import MSR from '@/api/http/index';
import { GetApiTestList, GetApiTestListUrl } from '@/api/requrls/api-test';
import { TableQueryParams, CommonList } from '@/models/common';
import { APIListItemI } from '@/models/api-test';
import { CommonList, TableQueryParams } from '@/models/common';
export function getTableList(params: TableQueryParams) {
const { current, pageSize, sort, filter, keyword } = params;

View File

@ -1,5 +1,6 @@
import MSR from '@/api/http/index';
import { ProjectBasicInfoUrl, UpdateProjectUrl } from '@/api/requrls/project-management/basicInfo';
import type { ProjectBasicInfoModel, UpdateProject } from '@/models/projectManagement/basicInfo';
// 获取项目详情

View File

@ -1,7 +1,7 @@
import MSR from '@/api/http/index';
import { FileDetailUrl, FileListUrl } from '@/api/requrls/project-management/fileManagement';
import type { TableQueryParams, CommonList } from '@/models/common';
import type { CommonList, TableQueryParams } from '@/models/common';
const fileList = [
{

View File

@ -1,15 +1,15 @@
import MSR from '@/api/http/index';
import * as Url from '@/api/requrls/project-management/menuManagement';
import { CommonList, TableQueryParams } from '@/models/common';
import type {
MenuTableConfigItem,
MenuTableListItem,
MenuTableListParams,
MenuTableConfigItem,
PoolOption,
} from '@/models/projectManagement/menuManagement';
import { MenuEnum } from '@/enums/commonEnum';
import { TableQueryParams, CommonList } from '@/models/common';
export async function postTabletList(params: TableQueryParams): Promise<CommonList<MenuTableListItem>> {
const list = await MSR.get<MenuTableListItem[]>({ url: `${Url.getMenuListUrl}${params.projectId}` });
const result: CommonList<MenuTableListItem> = {

View File

@ -1,5 +1,6 @@
import MSR from '@/api/http/index';
import { ProjectListUrl } from '@/api/requrls/project-management/project';
import type { ProjectListItem } from '@/models/setting/project';
export function getProjectList(organizationId: string) {

View File

@ -1,16 +1,17 @@
import MSR from '@/api/http/index';
import {
GetProjectMemberListUrl,
AddMemberToProjectUrl,
EditProjectMemberUrl,
BatchAddUserGroup,
BatchRemoveMemberUrl,
RemoveProjectMemberUrl,
ProjectUserGroupUrl,
EditProjectMemberUrl,
GetProjectMemberListUrl,
ProjectMemberOptions,
ProjectUserGroupUrl,
RemoveProjectMemberUrl,
} from '@/api/requrls/project-management/projectMember';
import type { ProjectMemberItem, ActionProjectMember } from '@/models/projectManagement/projectAndPermission';
import type { TableQueryParams, CommonList } from '@/models/common';
import type { CommonList, TableQueryParams } from '@/models/common';
import type { ActionProjectMember, ProjectMemberItem } from '@/models/projectManagement/projectAndPermission';
// 获取项目成员列表
export function getProjectMemberList(data: TableQueryParams) {

View File

@ -1,12 +1,13 @@
import MSR from '@/api/http/index';
import * as ugUrl from '@/api/requrls/project-management/usergroup';
import { TableQueryParams, CommonList } from '@/models/common';
import { CommonList, TableQueryParams } from '@/models/common';
import {
UserGroupItem,
SaveGlobalUSettingData,
SystemUserGroupParams,
UserGroupAuthSetting,
UserGroupItem,
UserTableItem,
SaveGlobalUSettingData,
} from '@/models/setting/usergroup';
// 项目-创建或修改用户组

View File

@ -1,5 +1,6 @@
import MSR from '@/api/http/index';
import { getLicenseUrl, addLicenseUrl } from '@/api/requrls/setting/authorizedManagement';
import { addLicenseUrl, getLicenseUrl } from '@/api/requrls/setting/authorizedManagement';
import type { LicenseInfo } from '@/models/setting/authorizedManagement';
// 获取当前信息
export function getLicenseInfo() {

View File

@ -1,36 +1,36 @@
import MSR from '@/api/http/index';
import {
TestEmailUrl,
SaveBaseInfoUrl,
SaveEmailInfoUrl,
GetBaseInfoUrl,
GetEmailInfoUrl,
SavePageConfigUrl,
GetPageConfigUrl,
GetAuthListUrl,
GetAuthDetailUrl,
UpdateAuthUrl,
UpdateAuthStatusUrl,
AddAuthUrl,
DeleteAuthUrl,
GetAuthDetailUrl,
GetAuthListUrl,
GetBaseInfoUrl,
GetEmailInfoUrl,
GetPageConfigUrl,
SaveBaseInfoUrl,
SaveBaseUrlUrl,
SaveEmailInfoUrl,
SavePageConfigUrl,
TestEmailUrl,
TestLdapConnectUrl,
TestLdapLoginUrl,
SaveBaseUrlUrl,
UpdateAuthStatusUrl,
UpdateAuthUrl,
} from '@/api/requrls/setting/config';
import type { CommonList, TableQueryParams } from '@/models/common';
import type {
SaveInfoParams,
TestEmailParams,
EmailConfig,
BaseConfig,
SavePageConfigParams,
PageConfigReturns,
AuthItem,
AuthParams,
UpdateAuthStatusParams,
BaseConfig,
EmailConfig,
LDAPConfig,
LDAPConnectConfig,
PageConfigReturns,
SaveInfoParams,
SavePageConfigParams,
TestEmailParams,
UpdateAuthStatusParams,
} from '@/models/setting/config';
// 测试邮箱连接

View File

@ -1,17 +1,17 @@
import MSR from '@/api/http/index';
import {
GetSystemLogListUrl,
GetSystemLogOptionsUrl,
GetSystemLogUserUrl,
GetOrgLogListUrl,
GetOrgLogOptionsUrl,
GetOrgLogUserUrl,
GetProjectLogListUrl,
GetProjectLogUserUrl,
GetSystemLogListUrl,
GetSystemLogOptionsUrl,
GetSystemLogUserUrl,
} from '@/api/requrls/setting/log';
import type { CommonList } from '@/models/common';
import type { LogOptions, LogItem, UserItem, LogListParams } from '@/models/setting/log';
import type { LogItem, LogListParams, LogOptions, UserItem } from '@/models/setting/log';
// 获取系统日志列表
export function getSystemLogList(data: LogListParams) {

View File

@ -1,17 +1,18 @@
import MSR from '@/api/http/index';
import {
GetMemberListUrl,
AddMemberUrl,
UpdateMemberUrl,
BatchAddProjectUrl,
BatchAddUserGroupUrl,
DeleteMemberUrl,
GetMemberListUrl,
getProjectListUrl,
getUserGroupList,
getUserList,
getProjectListUrl,
UpdateMemberUrl,
} from '@/api/requrls/setting/member';
import type { MemberItem, AddorUpdateMemberModel, BatchAddProjectModel, LinkItem } from '@/models/setting/member';
import type { TableQueryParams, CommonList } from '@/models/common';
import type { CommonList, TableQueryParams } from '@/models/common';
import type { AddorUpdateMemberModel, BatchAddProjectModel, LinkItem, MemberItem } from '@/models/setting/member';
// 获取成员列表
export function getMemberList(data: TableQueryParams) {
return MSR.post<CommonList<MemberItem>>({ url: GetMemberListUrl, data });

View File

@ -1,7 +1,7 @@
import MSR from '@/api/http/index';
import * as orgUrl from '@/api/requrls/setting/organizationAndProject';
import { CommonList, TableQueryParams } from '@/models/common';
import { AddUserToOrgOrProjectParams } from '@/models/setting/systemOrg';
import {
CreateOrUpdateOrgProjectParams,
CreateOrUpdateSystemOrgParams,
@ -9,6 +9,7 @@ import {
OrgProjectTableItem,
SystemGetUserByOrgOrProjectIdParams,
} from '@/models/setting/system/orgAndProject';
import { AddUserToOrgOrProjectParams } from '@/models/setting/systemOrg';
// 组织与项目-公共
// 系统-组织及项目,获取管理员下拉选项

View File

@ -1,12 +1,13 @@
import MSR from '@/api/http/index';
import {
GetPluginListUrl,
UploadPluginUrl,
UpdatePluginUrl,
DeletePluginUrl,
GetPluginListUrl,
GetScriptUrl,
UpdatePluginUrl,
UploadPluginUrl,
} from '@/api/requrls/setting/plugin';
import type { PluginList, PluginItem, AddReqData, UpdatePluginModel, UploadFile } from '@/models/setting/plugin';
import type { AddReqData, PluginItem, PluginList, UpdatePluginModel, UploadFile } from '@/models/setting/plugin';
export function getPluginList() {
return MSR.get<PluginList>({ url: GetPluginListUrl });

View File

@ -1,21 +1,22 @@
import MSR from '@/api/http/index';
import {
AddPoolUrl,
DeletePoolUrl,
DetailPoolUrl,
EnablePoolUrl,
PoolListUrl,
UpdatePoolUrl,
AddPoolUrl,
DetailPoolUrl,
DeletePoolUrl,
EnablePoolUrl,
} from '@/api/requrls/setting/resourcePool';
import type { LocationQueryValue } from 'vue-router';
import type {
ResourcePoolItem,
AddResourcePoolParams,
UpdateResourcePoolParams,
ResourcePoolDetail,
} from '@/models/setting/resourcePool';
import type { CommonList, TableQueryParams } from '@/models/common';
import type {
AddResourcePoolParams,
ResourcePoolDetail,
ResourcePoolItem,
UpdateResourcePoolParams,
} from '@/models/setting/resourcePool';
import type { LocationQueryValue } from 'vue-router';
// 获取资源池列表
export function getPoolList(data: TableQueryParams) {

View File

@ -1,15 +1,16 @@
import MSR from '@/api/http/index';
import {
GetServiceListUrl,
AddServiceUrl,
UpdateServiceUrl,
ResetServiceUrl,
GetValidateServiceUrl,
PostValidateServiceUrl,
ConfigServiceScriptUrl,
getLogoUrl,
GetServiceListUrl,
GetValidateServiceUrl,
PostValidateServiceUrl,
ResetServiceUrl,
UpdateServiceUrl,
} from '@/api/requrls/setting/serviceIntegration';
import type { ServiceList, AddOrUpdateServiceModel } from '@/models/setting/serviceIntegration';
import type { AddOrUpdateServiceModel, ServiceList } from '@/models/setting/serviceIntegration';
// 获取集成列表
export function getServiceList(organizationId: string) {
return MSR.get<ServiceList>({ url: GetServiceListUrl, params: organizationId });

View File

@ -1,38 +1,39 @@
import MSR from '@/api/http/index';
import {
GetUserListUrl,
CreateUserUrl,
UpdateUserUrl,
DeleteUserUrl,
ImportUserUrl,
EnableUserUrl,
GetSystemRoleUrl,
ResetPasswordUrl,
BatchAddUserGroupUrl,
BatchAddOrgUrl,
BatchAddProjectUrl,
BatchAddUserGroupUrl,
CreateUserUrl,
DeleteUserUrl,
EnableUserUrl,
GetOrgsUrl,
GetProjectsUrl,
GetSystemRoleUrl,
GetUserInfoUrl,
GetUserListUrl,
ImportUserUrl,
InviteUserUrl,
RegisterByInviteUrl,
ResetPasswordUrl,
UpdateUserUrl,
} from '@/api/requrls/setting/user';
import type { CommonList, TableQueryParams } from '@/models/common';
import type {
UserListItem,
BatchAddParams,
CreateUserParams,
DeleteUserParams,
ImportResult,
ImportUserParams,
InviteUserParams,
OrgsItem,
RegisterByInviteParams,
ResetUserPasswordParams,
SystemRole,
UpdateUserInfoParams,
UpdateUserStatusParams,
DeleteUserParams,
ImportUserParams,
SystemRole,
ImportResult,
BatchAddParams,
ResetUserPasswordParams,
OrgsItem,
InviteUserParams,
RegisterByInviteParams,
UserListItem,
} from '@/models/setting/user';
import type { CommonList, TableQueryParams } from '@/models/common';
// 获取用户列表
export function getUserList(data: TableQueryParams) {

View File

@ -1,12 +1,13 @@
import MSR from '@/api/http/index';
import * as ugUrl from '@/api/requrls/setting/usergroup';
import { TableQueryParams, CommonList } from '@/models/common';
import { CommonList, TableQueryParams } from '@/models/common';
import {
UserGroupItem,
SystemUserGroupParams,
OrgUserGroupParams,
UserGroupAuthSetting,
SaveGlobalUSettingData,
SystemUserGroupParams,
UserGroupAuthSetting,
UserGroupItem,
UserTableItem,
} from '@/models/setting/usergroup';

View File

@ -1,8 +1,10 @@
import MSR from '@/api/http/index';
import { LoginUrl, LogoutUrl, GetMenuListUrl, isLoginUrl, getPublicKeyUrl } from '@/api/requrls/user';
import type { RouteRecordNormalized } from 'vue-router';
import { GetMenuListUrl, getPublicKeyUrl, isLoginUrl, LoginUrl, LogoutUrl } from '@/api/requrls/user';
import type { LoginData, LoginRes } from '@/models/user';
import type { RouteRecordNormalized } from 'vue-router';
export function login(data: LoginData) {
return MSR.post<LoginRes>({ url: LoginUrl, data });
}

File diff suppressed because one or more lines are too long

View File

@ -786,3 +786,11 @@
margin-top: 1px;
}
/** empty **/
.arco-empty {
@apply flex flex-col;
.arco-icon-empty {
font-size: 28px;
}
}

View File

@ -74,12 +74,13 @@
</template>
<script setup lang="ts">
import { ref, watchEffect, unref } from 'vue';
import { ref, unref, watchEffect } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import { scrollIntoView } from '@/utils/dom';
import type { ValidatedError, FormInstance } from '@arco-design/web-vue';
import type { FormItemModel, FormMode } from './types';
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
const { t } = useI18n();

View File

@ -23,12 +23,13 @@
</template>
<script setup lang="ts">
import { type Ref, ref, watch, nextTick, onMounted, watchEffect, computed } from 'vue';
import { computed, nextTick, onMounted, type Ref, ref, watch, watchEffect } from 'vue';
import { useResizeObserver } from '@vueuse/core';
import { debounce } from 'lodash-es';
import useContainerShadow from '@/hooks/useContainerShadow';
import type { TableQueryParams, CommonList } from '@/models/common';
import type { CommonList, TableQueryParams } from '@/models/common';
const props = withDefaults(
defineProps<{

View File

@ -55,11 +55,12 @@
<script setup lang="ts">
import { computed, ref, watch } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
import MsDrawer from '@/components/pure/ms-drawer/index.vue';
import type { MsPaginationI } from '@/components/pure/ms-table/type';
import { useI18n } from '@/hooks/useI18n';
const props = defineProps<{
visible: boolean;
title: string;

View File

@ -84,13 +84,16 @@
<script setup lang="ts">
import { computed, ref, watchEffect } from 'vue';
import { cloneDeep } from 'lodash-es';
import { useI18n } from '@/hooks/useI18n';
import { TEST_PLAN_TEST_CASE } from './caseUtils';
import TimerSelect from './time-select.vue';
import { SelectOptionData } from '@arco-design/web-vue';
import type { FormInstance } from '@arco-design/web-vue';
import { cloneDeep } from 'lodash-es';
import TimerSelect from './time-select.vue';
import { useI18n } from '@/hooks/useI18n';
import { TEST_PLAN_TEST_CASE } from './caseUtils';
import type { SearchKeyType } from './type';
import type { FormInstance } from '@arco-design/web-vue';
const { t } = useI18n();

View File

@ -48,10 +48,13 @@
</template>
<script setup lang="ts">
import { Message } from '@arco-design/web-vue';
import { computed, ref } from 'vue';
import { Message } from '@arco-design/web-vue';
import QueryFromItem from './query-form-item.vue';
import { useI18n } from '@/hooks/useI18n';
import type { ConditionOptions, QueryTemplate } from './type';
const { t } = useI18n();

View File

@ -25,9 +25,10 @@
</template>
<script setup lang="ts">
import { CalendarValue } from '@arco-design/web-vue/es/date-picker/interface';
import { ref, watch, watchEffect } from 'vue';
import { CalendarValue } from '@arco-design/web-vue/es/date-picker/interface';
type PickerType = 'between' | 'gt' | 'lt'; // | |
const props = defineProps<{

View File

@ -1,4 +1,4 @@
import { SelectOptionData, FieldRule } from '@arco-design/web-vue';
import { FieldRule, SelectOptionData } from '@arco-design/web-vue';
export interface ConditionOptions {
id: string;

View File

@ -13,10 +13,12 @@
</template>
<script setup lang="ts">
import { useI18n } from '@/hooks/useI18n';
import { ref } from 'vue';
import MsButton from '@/components/pure/ms-button/index.vue';
import MsPopconfirm from '@/components/pure/ms-popconfirm/index.vue';
import { ref } from 'vue';
import { useI18n } from '@/hooks/useI18n';
const props = defineProps<{
title: string;

View File

@ -3,7 +3,8 @@
</template>
<script setup lang="ts">
import { ref, watchEffect, computed } from 'vue';
import { computed, ref, watchEffect } from 'vue';
import { getPoolOptionsByOrgOrSystem } from '@/api/modules/setting/organizationAndProject';
const options = ref([]);

View File

@ -15,12 +15,13 @@
<script setup lang="ts">
import { computed } from 'vue';
import { UploadStatus } from '@/enums/uploadEnum';
import { getFileEnum, FileIconMap } from '@/components/pure/ms-upload/iconMap';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import type { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import { FileIconMap, getFileEnum } from '@/components/pure/ms-upload/iconMap';
import { UploadStatus } from '@/enums/uploadEnum';
const props = withDefaults(
defineProps<{

View File

@ -14,13 +14,14 @@
<script setup lang="ts">
import { Ref, ref, watch } from 'vue';
import { useRouter, RouteRecordRaw, RouteRecordName } from 'vue-router';
import { RouteRecordName, RouteRecordRaw, useRouter } from 'vue-router';
import { cloneDeep } from 'lodash-es';
import { useAppStore } from '@/store';
import { listenerRouteChange } from '@/utils/route-listener';
import { useI18n } from '@/hooks/useI18n';
import usePermission from '@/hooks/usePermission';
import appClientMenus from '@/router/app-menus';
import { useI18n } from '@/hooks/useI18n';
import { useAppStore } from '@/store';
import { listenerRouteChange } from '@/utils/route-listener';
const copyRouters = cloneDeep(appClientMenus) as RouteRecordRaw[];
const permission = usePermission();

View File

@ -31,13 +31,16 @@
</template>
<script lang="ts" setup>
import { useI18n } from '@/hooks/useI18n';
import { reactive, ref, watchEffect, computed, inject } from 'vue';
import { useAppStore } from '@/store';
import { addOrgUserToUserGroup, addUserToUserGroup } from '@/api/modules/setting/usergroup';
import { Message, type FormInstance, type ValidatedError } from '@arco-design/web-vue';
import { computed, inject, reactive, ref, watchEffect } from 'vue';
import { type FormInstance, Message, type ValidatedError } from '@arco-design/web-vue';
import MsUserSelector from '@/components/business/ms-user-selector/index.vue';
import { UserRequestTypeEnum } from '@/components/business/ms-user-selector/utils';
import { addOrgUserToUserGroup, addUserToUserGroup } from '@/api/modules/setting/usergroup';
import { useI18n } from '@/hooks/useI18n';
import { useAppStore } from '@/store';
import { AuthScopeEnum } from '@/enums/commonEnum';
const { t } = useI18n();

View File

@ -50,22 +50,24 @@
</template>
<script setup lang="ts">
import { useI18n } from '@/hooks/useI18n';
import { RenderFunction, VNodeChild, ref, watchEffect, computed, inject } from 'vue';
import { computed, inject, ref, RenderFunction, VNodeChild, watchEffect } from 'vue';
import { Message, type TableColumnData, type TableData } from '@arco-design/web-vue';
import { getAuthByUserGroup, saveProjectUGSetting } from '@/api/modules/project-management/usergroup';
import {
getGlobalUSetting,
getOrgUSetting,
saveGlobalUSetting,
saveOrgUSetting,
} from '@/api/modules/setting/usergroup';
import { getAuthByUserGroup, saveProjectUGSetting } from '@/api/modules/project-management/usergroup';
import { useI18n } from '@/hooks/useI18n';
import {
UserGroupAuthSetting,
AuthTableItem,
type AuthScopeType,
SavePermissions,
AuthTableItem,
CurrentUserGroupItem,
SavePermissions,
UserGroupAuthSetting,
} from '@/models/setting/usergroup';
import { AuthScopeEnum } from '@/enums/commonEnum';

View File

@ -52,15 +52,18 @@
</template>
<script lang="ts" setup>
import { useI18n } from '@/hooks/useI18n';
import { reactive, ref, watchEffect, inject } from 'vue';
import { inject, reactive, ref, watchEffect } from 'vue';
import { Message } from '@arco-design/web-vue';
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
import { updateOrAddOrgUserGroup, updateOrAddUserGroup } from '@/api/modules/setting/usergroup';
import { updateOrAddProjectUserGroup } from '@/api/modules/project-management/usergroup';
import { updateOrAddOrgUserGroup, updateOrAddUserGroup } from '@/api/modules/setting/usergroup';
import { useI18n } from '@/hooks/useI18n';
import { useAppStore } from '@/store';
import { UserGroupItem } from '@/models/setting/usergroup';
import { AuthScopeEnum } from '@/enums/commonEnum';
import { useAppStore } from '@/store';
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
const { t } = useI18n();
const systemType = inject<AuthScopeEnum>('systemType');

View File

@ -258,26 +258,29 @@
</template>
<script setup lang="ts">
import { computed, inject, ref } from 'vue';
import { Message } from '@arco-design/web-vue';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import { useI18n } from '@/hooks/useI18n';
import MsMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import { UserGroupItem, PopVisible, PopVisibleItem, CurrentUserGroupItem } from '@/models/setting/usergroup';
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import AddUserModal from './addUserModal.vue';
import CreateUserGroupPopup from './createOrUpdateUserGroup.vue';
import {
getUserGroupList,
deleteOrgUserGroup,
deleteUserGroup,
getOrgUserGroupList,
getProjectUserGroupList,
deleteOrgUserGroup,
getUserGroupList,
} from '@/api/modules/setting/usergroup';
import { computed, ref, inject } from 'vue';
import CreateUserGroupPopup from './createOrUpdateUserGroup.vue';
import AddUserModal from './addUserModal.vue';
import { Message } from '@arco-design/web-vue';
import { useI18n } from '@/hooks/useI18n';
import useModal from '@/hooks/useModal';
import { characterLimit } from '@/utils';
import { AuthScopeEnum } from '@/enums/commonEnum';
import { useAppStore } from '@/store';
import { characterLimit } from '@/utils';
import { CurrentUserGroupItem, PopVisible, PopVisibleItem, UserGroupItem } from '@/models/setting/usergroup';
import { AuthScopeEnum } from '@/enums/commonEnum';
const { t } = useI18n();

View File

@ -13,21 +13,24 @@
</template>
<script lang="ts" setup>
import { useI18n } from '@/hooks/useI18n';
import useTable from '@/components/pure/ms-table/useTable';
import { computed, inject, ref, watchEffect } from 'vue';
import MsBaseTable from '@/components/pure/ms-table/base-table.vue';
import { useAppStore } from '@/store';
import { watchEffect, ref, computed, inject } from 'vue';
import {
postOrgUserByUserGroup,
deleteOrgUserFromUserGroup,
postUserByUserGroup,
deleteUserFromUserGroup,
} from '@/api/modules/setting/usergroup';
import { CurrentUserGroupItem, UserTableItem } from '@/models/setting/usergroup';
import { MsTableColumn } from '@/components/pure/ms-table/type';
import AddUserModal from './addUserModal.vue';
import useTable from '@/components/pure/ms-table/useTable';
import MsRemoveButton from '@/components/business/ms-remove-button/MsRemoveButton.vue';
import AddUserModal from './addUserModal.vue';
import {
deleteOrgUserFromUserGroup,
deleteUserFromUserGroup,
postOrgUserByUserGroup,
postUserByUserGroup,
} from '@/api/modules/setting/usergroup';
import { useI18n } from '@/hooks/useI18n';
import { useAppStore } from '@/store';
import { CurrentUserGroupItem, UserTableItem } from '@/models/setting/usergroup';
import { AuthScopeEnum } from '@/enums/commonEnum';
const systemType = inject<AuthScopeEnum>('systemType');

View File

@ -23,11 +23,13 @@
</template>
<script setup lang="ts">
import { useI18n } from '@/hooks/useI18n';
import { ref, onMounted, computed } from 'vue';
import initOptionsFunc, { UserRequestTypeEnum } from './utils';
import { computed, onMounted, ref } from 'vue';
import { debounce } from 'lodash-es';
import { useI18n } from '@/hooks/useI18n';
import initOptionsFunc, { UserRequestTypeEnum } from './utils';
export interface MsUserSelectorOption {
id: string;
name: string;

View File

@ -1,3 +1,6 @@
import { getProjectMemberOptions } from '@/api/modules/project-management/projectMember';
import { getProjectUserGroupOptions } from '@/api/modules/project-management/usergroup';
import { getProjectList, getUser } from '@/api/modules/setting/member';
import {
getAdminByOrganizationOrProject,
getAdminByProjectByOrg,
@ -5,9 +8,6 @@ import {
getUserByProjectByOrg,
} from '@/api/modules/setting/organizationAndProject';
import { getOrgUserGroupOption, getSystemUserGroupOption } from '@/api/modules/setting/usergroup';
import { getUser, getProjectList } from '@/api/modules/setting/member';
import { getProjectMemberOptions } from '@/api/modules/project-management/projectMember';
import { getProjectUserGroupOptions } from '@/api/modules/project-management/usergroup';
// eslint-disable-next-line no-shadow
export enum UserRequestTypeEnum {

View File

@ -9,13 +9,8 @@
</template>
<script lang="ts" setup>
import { computed, PropType, ref, onUnmounted, watch } from 'vue';
import { VAceEditor } from 'vue3-ace-editor';
import ace from 'ace-builds';
import workerJavascriptUrl from 'ace-builds/src-min-noconflict/worker-javascript?url';
import workerJsonUrl from 'ace-builds/src-min-noconflict/worker-json?url';
import workerHtmlUrl from 'ace-builds/src-min-noconflict/worker-html?url';
import workerXmlUrl from 'ace-builds/src-min-noconflict/worker-xml?url';
import { computed, onUnmounted, PropType, ref, watch } from 'vue';
import 'ace-builds/src-min-noconflict/ext-language_tools';
import 'ace-builds/src-min-noconflict/ext-beautify';
import 'ace-builds/src-min-noconflict/theme-github_dark';
@ -26,6 +21,12 @@
import 'ace-builds/src-min-noconflict/mode-xml';
import 'ace-builds/src-min-noconflict/mode-json';
import 'ace-builds/src-min-noconflict/mode-java';
import ace from 'ace-builds';
import workerHtmlUrl from 'ace-builds/src-min-noconflict/worker-html?url';
import workerJavascriptUrl from 'ace-builds/src-min-noconflict/worker-javascript?url';
import workerJsonUrl from 'ace-builds/src-min-noconflict/worker-json?url';
import workerXmlUrl from 'ace-builds/src-min-noconflict/worker-xml?url';
import { VAceEditor } from 'vue3-ace-editor';
export type LangType = 'javascript' | 'html' | 'xml' | 'json' | 'java' | 'text';
export type ThemeType = 'github_dark' | 'github' | 'chrome';

View File

@ -3,18 +3,19 @@
</template>
<script lang="ts" setup>
import { ref, nextTick } from 'vue';
import VCharts from 'vue-echarts';
import { use } from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers';
import { nextTick, ref } from 'vue';
import { BarChart, LineChart, PieChart, RadarChart } from 'echarts/charts';
import {
GridComponent,
TooltipComponent,
LegendComponent,
DataZoomComponent,
GraphicComponent,
GridComponent,
LegendComponent,
TooltipComponent,
} from 'echarts/components';
import { use } from 'echarts/core';
import { CanvasRenderer } from 'echarts/renderers';
import VCharts from 'vue-echarts';
use([
CanvasRenderer,

View File

@ -5,7 +5,7 @@
</template>
<script lang="ts" setup>
import { ref, reactive } from 'vue';
import { reactive, ref } from 'vue';
const value = ref({});
const fApi = ref({});

View File

@ -15,9 +15,11 @@
<script lang="ts" setup>
import { PropType } from 'vue';
import { useAppStore } from '@/store';
import FormWrapper from './form-wrapper.vue';
import { useAppStore } from '@/store';
interface OptionsProps {
name: string;
key: string;

View File

@ -25,12 +25,14 @@
<script lang="ts" setup>
import { computed } from 'vue';
import { Message } from '@arco-design/web-vue';
import { useI18n } from '@/hooks/useI18n';
import { useClipboard } from '@vueuse/core';
import { useAppStore } from '@/store';
import { Message } from '@arco-design/web-vue';
import Block from './block.vue';
import { useI18n } from '@/hooks/useI18n';
import { useAppStore } from '@/store';
const emit = defineEmits(['cancel']);
const appStore = useAppStore();

View File

@ -4,9 +4,10 @@
</template>
<script setup lang="ts">
import { onMounted, ref, onUnmounted, Ref } from 'vue';
import JPPicker from 'jsonpath-picker-vanilla';
import { onMounted, onUnmounted, Ref, ref } from 'vue';
import { Recordable } from '#/global';
import JPPicker from 'jsonpath-picker-vanilla';
const jr: Ref<HTMLElement | null> = ref(null);
const ip: Ref<HTMLInputElement | null> = ref(null);

View File

@ -1,16 +1,19 @@
<script lang="tsx">
import { defineComponent, ref, h, compile, computed } from 'vue';
import { useRoute, useRouter, RouteRecordRaw } from 'vue-router';
import { compile, computed, defineComponent, h, ref } from 'vue';
import { RouteRecordRaw, useRoute, useRouter } from 'vue-router';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import { useI18n } from '@/hooks/useI18n';
import useUser from '@/hooks/useUser';
import type { RouteMeta } from 'vue-router';
import { useAppStore, useUserStore } from '@/store';
import { listenerRouteChange } from '@/utils/route-listener';
import { openWindow, regexUrl } from '@/utils';
import useMenuTree from './use-menu-tree';
import { PERSONAL_ROUTE } from '@/router/routes/base';
import { BOTTOM_MENU_LIST } from '@/router/constants';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import { PERSONAL_ROUTE } from '@/router/routes/base';
import { useAppStore, useUserStore } from '@/store';
import { openWindow, regexUrl } from '@/utils';
import { listenerRouteChange } from '@/utils/route-listener';
import useMenuTree from './use-menu-tree';
import type { RouteMeta } from 'vue-router';
export default defineComponent({
emit: ['collapse'],

View File

@ -1,8 +1,9 @@
import { computed } from 'vue';
import { RouteRecordRaw, RouteRecordNormalized } from 'vue-router';
import { RouteRecordNormalized, RouteRecordRaw } from 'vue-router';
import { cloneDeep } from 'lodash-es';
import usePermission from '@/hooks/usePermission';
import appClientMenus from '@/router/app-menus';
import { cloneDeep } from 'lodash-es';
/**
*

View File

@ -20,12 +20,14 @@
</template>
<script lang="ts" setup>
import { ref, reactive, toRefs, computed } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import { queryMessageList, setMessageStatus, MessageRecord, MessageListType } from '@/api/modules/message';
import useLoading from '@/hooks/useLoading';
import { computed, reactive, ref, toRefs } from 'vue';
import List from './list.vue';
import { MessageListType, MessageRecord, queryMessageList, setMessageStatus } from '@/api/modules/message';
import { useI18n } from '@/hooks/useI18n';
import useLoading from '@/hooks/useLoading';
interface TabItem {
key: string;
title: string;

View File

@ -65,7 +65,8 @@
<script lang="ts" setup>
import { PropType } from 'vue';
import { MessageRecord, MessageListType } from '@/api/modules/message';
import { MessageListType, MessageRecord } from '@/api/modules/message';
const props = defineProps({
renderList: {

View File

@ -41,10 +41,13 @@
<script lang="ts" name="headerVue" setup>
import { ref } from 'vue';
import editMenu from '../menu/edit/editMenu.vue';
import viewMenu from '../menu/view/viewMenu.vue';
import { useI18n } from '@/hooks/useI18n';
import { editMenuProps, moleProps, priorityProps, tagProps, delProps, viewMenuProps } from '../props';
import { delProps, editMenuProps, moleProps, priorityProps, tagProps, viewMenuProps } from '../props';
const { t } = useI18n();

View File

@ -9,12 +9,15 @@
<script lang="ts" name="minderContainer" setup>
import { onMounted, ref } from 'vue';
import type { Ref } from 'vue';
import Navigator from './navigator.vue';
import { markChangeNode, markDeleteNode } from '../script/tool/utils';
import { useI18n } from '@/hooks/useI18n';
import { editMenuProps, mainEditorProps, priorityProps, tagProps } from '../props';
import Editor from '../script/editor';
import { markChangeNode, markDeleteNode } from '../script/tool/utils';
import type { Ref } from 'vue';
const { t } = useI18n();
const props = defineProps({ ...editMenuProps, ...mainEditorProps, ...tagProps, ...priorityProps });

View File

@ -48,10 +48,12 @@
<script lang="ts" name="navigator" setup>
import { computed, nextTick, onMounted, reactive, ref } from 'vue';
import type { Ref } from 'vue';
import { getLocalStorage, setLocalStorage } from '../script/store';
import { useI18n } from '@/hooks/useI18n';
import { getLocalStorage, setLocalStorage } from '../script/store';
import type { Ref } from 'vue';
const { t } = useI18n();
const zoomPan: Ref<HTMLDivElement | null> = ref(null);

View File

@ -16,10 +16,12 @@
</template>
<script lang="ts" name="edit_del" setup>
import { onMounted, reactive, nextTick, ref } from 'vue';
import { isDeleteDisableNode, isDisableNode } from '../../script/tool/utils';
import { nextTick, onMounted, reactive, ref } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import { delProps } from '../../props';
import { isDeleteDisableNode, isDisableNode } from '../../script/tool/utils';
const { t } = useI18n();

View File

@ -24,15 +24,16 @@
</template>
<script lang="ts" name="editMenu" setup>
import editDel from './editDel.vue';
import expand from './expand.vue';
import insertBox from './insertBox.vue';
import moveBox from './moveBox.vue';
import editDel from './editDel.vue';
import sequenceBox from './sequenceBox.vue';
import progressBox from './progressBox.vue';
import expand from './expand.vue';
import selection from './selection.vue';
import sequenceBox from './sequenceBox.vue';
import TagBox from './tagBox.vue';
import { editMenuProps, priorityProps, tagProps, delProps } from '../../props';
import { delProps, editMenuProps, priorityProps, tagProps } from '../../props';
const props = defineProps({ ...editMenuProps, ...priorityProps, ...tagProps, ...delProps });
</script>

View File

@ -25,9 +25,11 @@
<script lang="ts" name="insertBox" setup>
import { nextTick, onMounted, ref } from 'vue';
import { isDisableNode } from '../../script/tool/utils';
import { useI18n } from '@/hooks/useI18n';
import { isDisableNode } from '../../script/tool/utils';
const { t } = useI18n();
const minder = ref<any>({});

View File

@ -13,9 +13,11 @@
<script lang="ts" name="moveBox" setup>
import { nextTick, onMounted, reactive, ref } from 'vue';
import { isDisableNode } from '../../script/tool/utils';
import { useI18n } from '@/hooks/useI18n';
import { isDisableNode } from '../../script/tool/utils';
const { t } = useI18n();
const props = defineProps<{

View File

@ -17,9 +17,11 @@
<script lang="ts" name="progressBox" setup>
import { computed, nextTick, onMounted, reactive, ref } from 'vue';
import { isDisableNode } from '../../script/tool/utils';
import { useI18n } from '@/hooks/useI18n';
import { isDisableNode } from '../../script/tool/utils';
const { t } = useI18n();
let minder = reactive<any>({});

View File

@ -21,9 +21,10 @@
</template>
<script lang="ts" name="sequenceBox" setup>
import { onMounted, reactive, nextTick, ref } from 'vue';
import { isDisableNode, setPriorityView } from '../../script/tool/utils';
import { nextTick, onMounted, reactive, ref } from 'vue';
import { priorityProps } from '../../props';
import { isDisableNode, setPriorityView } from '../../script/tool/utils';
const props = defineProps(priorityProps);

View File

@ -13,8 +13,9 @@
<script lang="ts" name="TagBox" setup>
import { nextTick, onMounted, reactive, ref } from 'vue';
import { isDisableNode, isTagEnable } from '../../script/tool/utils';
import { tagProps } from '../../props';
import { isDisableNode, isTagEnable } from '../../script/tool/utils';
const props = defineProps(tagProps);

View File

@ -11,6 +11,7 @@
<script lang="ts" name="Arrange" setup>
import { computed } from 'vue';
import { useI18n } from '@/hooks/useI18n';
const { t } = useI18n();

View File

@ -55,7 +55,8 @@
</template>
<script lang="ts" name="StyleOperation" setup>
import { ref, computed } from 'vue';
import { computed, ref } from 'vue';
import { useI18n } from '@/hooks/useI18n';
const { t } = useI18n();

View File

@ -21,6 +21,7 @@
<script lang="ts" name="Mold" setup>
import { computed, nextTick, onMounted, ref } from 'vue';
import { moleProps } from '../../props';
const props = defineProps(moleProps);

View File

@ -25,6 +25,7 @@
<script lang="ts" name="StyleOperation" setup>
import { nextTick, onMounted, reactive, ref } from 'vue';
import { useI18n } from '@/hooks/useI18n';
const { t } = useI18n();

View File

@ -8,10 +8,11 @@
</template>
<script lang="ts" name="viewMenu" setup>
import mold from './mold.vue';
import arrange from './arrange.vue';
import styleOperation from './styleOperation.vue';
import fontOperation from './fontOperation.vue';
import mold from './mold.vue';
import styleOperation from './styleOperation.vue';
import { moleProps, viewMenuProps } from '../../props';
const props = defineProps({ ...moleProps, ...viewMenuProps });

View File

@ -44,9 +44,11 @@
<script lang="ts" name="minderEditor" setup>
import { onMounted } from 'vue';
import headerMenu from './main/header.vue';
import mainEditor from './main/mainEditor.vue';
import { editMenuProps, mainEditorProps, moleProps, priorityProps, tagProps, delProps, viewMenuProps } from './props';
import { delProps, editMenuProps, mainEditorProps, moleProps, priorityProps, tagProps, viewMenuProps } from './props';
const emit = defineEmits<{
(e: 'moldChange', data: number): void;

View File

@ -1,21 +1,21 @@
import '@7polo/kity/dist/kity';
import 'hotbox-minder/hotbox';
import '@7polo/kityminder-core';
import clipboard from './runtime/clipboard';
import clipboardMimetype from './runtime/clipboard-mimetype';
import container from './runtime/container';
import drag from './runtime/drag';
import exportsRuntime from './runtime/exports';
import fsm from './runtime/fsm';
import minder from './runtime/minder';
import receiver from './runtime/receiver';
import history from './runtime/history';
import hotbox from './runtime/hotbox';
import input from './runtime/input';
import clipboardMimetype from './runtime/clipboard-mimetype';
import clipboard from './runtime/clipboard';
import drag from './runtime/drag';
import node from './runtime/node';
import history from './runtime/history';
import jumping from './runtime/jumping';
import minder from './runtime/minder';
import node from './runtime/node';
import priority from './runtime/priority';
import progress from './runtime/progress';
import exportsRuntime from './runtime/exports';
import receiver from './runtime/receiver';
import tag from './runtime/tag';
type EditMenuProps = {

View File

@ -1,9 +1,9 @@
import mm from '../protocol/freemind';
import json from '../protocol/json';
import md from '../protocol/markdown';
import plain from '../protocol/plain';
import png from '../protocol/png';
import svg from '../protocol/svg';
import json from '../protocol/json';
import plain from '../protocol/plain';
import md from '../protocol/markdown';
import mm from '../protocol/freemind';
import useLocaleNotVue from '../tool/useLocaleNotVue';
const tran = useLocaleNotVue;

View File

@ -1,6 +1,6 @@
/* eslint-disable no-underscore-dangle */
import { isDisableNode } from '../tool/utils';
import useLocaleNotVue from '../tool/useLocaleNotVue';
import { isDisableNode } from '../tool/utils';
const tran = useLocaleNotVue;

View File

@ -8,9 +8,9 @@
* @author: techird
* @copyright: Baidu FEX, 2014
*/
import { isDisableNode, markChangeNode } from '../tool/utils';
import Debug from '../tool/debug';
import useLocaleNotVue from '../tool/useLocaleNotVue';
import { isDisableNode, markChangeNode } from '../tool/utils';
if (!('innerText' in document.createElement('a')) && 'getSelection' in window) {
Object.defineProperty(HTMLElement.prototype, 'innerText', {

View File

@ -1,5 +1,5 @@
import { isDisableNode, markDeleteNode, isDeleteDisableNode } from '../tool/utils';
import useLocaleNotVue from '../tool/useLocaleNotVue';
import { isDeleteDisableNode, isDisableNode, markDeleteNode } from '../tool/utils';
const tran = useLocaleNotVue;

View File

@ -1,5 +1,5 @@
import { isDisableNode } from '../tool/utils';
import useLocaleNotVue from '../tool/useLocaleNotVue';
import { isDisableNode } from '../tool/utils';
const tran = useLocaleNotVue;

View File

@ -1,6 +1,7 @@
import { isDisableNode } from '../tool/utils';
import { useI18n } from '@/hooks/useI18n';
import { isDisableNode } from '../tool/utils';
const { t } = useI18n();
export default function ProgressRuntime(this: any) {

View File

@ -1,5 +1,5 @@
import { isDisableNode, isTagEnable } from '../tool/utils';
import useLocaleNotVue from '../tool/useLocaleNotVue';
import { isDisableNode, isTagEnable } from '../tool/utils';
const tran = useLocaleNotVue;

View File

@ -1,6 +1,6 @@
import type { Recordable } from '#/global';
import zhCN from '../../locale/zh-CN';
import enUS from '../../locale/en-US';
import zhCN from '../../locale/zh-CN';
import type { Recordable } from '#/global';
const findCode = (arr: string[], tree: Recordable<Recordable>) => {
let curCode = arr.shift();

View File

@ -16,13 +16,15 @@
<script lang="ts">
import { defineComponent, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { editorProps, CustomTheme } from './types';
import './userWorker';
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
import { useFullscreen } from '@vueuse/core';
import MsCodeEditorTheme from './themes';
import { useI18n } from '@/hooks/useI18n';
import './userWorker';
import MsCodeEditorTheme from './themes';
import { CustomTheme, editorProps } from './types';
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
export default defineComponent({
name: 'MonacoEditor',
props: editorProps,

View File

@ -1,5 +1,5 @@
import { rgbToHex } from '@/utils';
import { primaryVars } from '@/hooks/useThemeVars';
import { rgbToHex } from '@/utils';
export default {
base: 'vs',

View File

@ -1,6 +1,5 @@
import MSText from './MS-text';
import type { CustomTheme } from '../types';
import MSText from './MS-text';
const MsCodeEditorThemes: Record<CustomTheme, any> = {
'MS-text': MSText,

View File

@ -4,8 +4,9 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { ColorPicker } from 'vue3-colorpicker';
import 'vue3-colorpicker/style.css';
import { ColorPicker } from 'vue3-colorpicker';
const props = defineProps<{
pureColor: string;

View File

@ -91,12 +91,14 @@
</template>
<script setup lang="ts">
import { ref, nextTick } from 'vue';
import { Message } from '@arco-design/web-vue';
import { nextTick, ref } from 'vue';
import { useClipboard } from '@vueuse/core';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import { Message } from '@arco-design/web-vue';
import MsButton from '@/components/pure/ms-button/index.vue';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import MsTag from '@/components/pure/ms-tag/ms-tag.vue';
import { useI18n } from '@/hooks/useI18n';
export interface Description {

View File

@ -52,6 +52,7 @@
<script setup lang="ts">
import { ref, useAttrs, watch, watchEffect } from 'vue';
import { useI18n } from '@/hooks/useI18n';
const { t } = useI18n();

View File

@ -64,11 +64,12 @@
</template>
<script setup lang="ts">
import { ref, watch, defineAsyncComponent, computed } from 'vue';
import { useI18n } from '@/hooks/useI18n';
import { computed, defineAsyncComponent, ref, watch } from 'vue';
import type { Description } from '@/components/pure/ms-description/index.vue';
import { useI18n } from '@/hooks/useI18n';
//
const MsDescription = defineAsyncComponent(() => import('@/components/pure/ms-description/index.vue'));

View File

@ -3,8 +3,10 @@
</template>
<script setup lang="ts">
import { ref, watchEffect, watch } from 'vue';
import { ref, watch, watchEffect } from 'vue';
import PassWord from './formcreate-password.vue';
import formCreate, { FormRule } from '@form-create/arco-design';
formCreate.component('PassWord', PassWord);

View File

@ -4,6 +4,7 @@
<script lang="ts" setup>
import { Icon } from '@arco-design/web-vue';
import '@/assets/icon-font/iconfont';
const props = defineProps<{

View File

@ -60,14 +60,15 @@
<script setup lang="ts">
import { nextTick, Ref, ref, watch } from 'vue';
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import MsButton from '@/components/pure/ms-button/index.vue';
import MsIcon from '@/components/pure/ms-icon-font/index.vue';
import { useI18n } from '@/hooks/useI18n';
import useContainerShadow from '@/hooks/useContainerShadow';
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import useContainerShadow from '@/hooks/useContainerShadow';
import { useI18n } from '@/hooks/useI18n';
const props = withDefaults(
defineProps<{
mode?: 'static' | 'remote'; //

Some files were not shown because too many files have changed in this diff Show More