+
diff --git a/packages/fighting-design/tag/__test__/tag.spec.ts b/packages/fighting-design/tag/__test__/tag.spec.ts
index 06210ae734..973f3bf4cd 100644
--- a/packages/fighting-design/tag/__test__/tag.spec.ts
+++ b/packages/fighting-design/tag/__test__/tag.spec.ts
@@ -96,7 +96,7 @@ describe('FTag', () => {
test('close', async () => {
const App = defineComponent({
components: { FTag },
- setup() {
+ setup () {
const isShow = ref(true)
const onClose = () => {
isShow.value = false
diff --git a/packages/fighting-design/toolbar-item/src/toolbar-item.vue b/packages/fighting-design/toolbar-item/src/toolbar-item.vue
index 118fbbae12..6f0eb8d37a 100644
--- a/packages/fighting-design/toolbar-item/src/toolbar-item.vue
+++ b/packages/fighting-design/toolbar-item/src/toolbar-item.vue
@@ -28,7 +28,12 @@
-
+
diff --git a/packages/fighting-design/tree/__test__/tree.spec.ts b/packages/fighting-design/tree/__test__/tree.spec.ts
index 3593c93d30..9856df59bd 100644
--- a/packages/fighting-design/tree/__test__/tree.spec.ts
+++ b/packages/fighting-design/tree/__test__/tree.spec.ts
@@ -33,7 +33,7 @@ const data: TreeData = [
}
]
-describe('Tree', () => {
+describe('Tree', () => {
test('create', async () => {
const wrapper = mount(FTree, {
props: {
@@ -66,7 +66,9 @@ describe('Tree', () => {
const wrapperList = wrapper.findAllComponents(FTreeItem)
const labelList = wrapperList.map(wrapperItem => wrapperItem.vm.model.label)
- await Promise.all([wrapperList.map(wrapperItem => wrapperItem.find('.f-checkbox').trigger('click'))])
+ await Promise.all([
+ wrapperList.map(wrapperItem => wrapperItem.find('.f-checkbox').trigger('click'))
+ ])
expect(checkLabels).toEqual(labelList)
})
@@ -81,13 +83,20 @@ describe('Tree', () => {
wrapper.findAllComponents(FTreeItem).forEach(wrapperItem => {
const level = wrapperItem.vm.model.__level
if (level > 0) {
- expect(wrapperItem.find('.f-tree-item__label').attributes('style')).toContain(`--tree-item-level-padding: ${level * offset}px`)
+ expect(wrapperItem.find('.f-tree-item__label').attributes('style')).toContain(
+ `--tree-item-level-padding: ${level * offset}px`
+ )
}
})
})
test('onClickLabel', async () => {
- const onClickLabel = vi.fn((evt, model, isOpen, tree) => ({ evt, model, isOpen, tree }))
+ const onClickLabel = vi.fn((evt, model, isOpen, tree) => ({
+ evt,
+ model,
+ isOpen,
+ tree
+ }))
const wrapper = mount(FTree, {
props: {
data,
diff --git a/start/src/main.ts b/start/src/main.ts
index 19bfc56b21..9e107cc280 100644
--- a/start/src/main.ts
+++ b/start/src/main.ts
@@ -1,9 +1,6 @@
import { createApp } from 'vue'
import App from './App.vue'
-// 配置路由
-// import router from './router'
-
// 开发阶段引入
import FightingDesign from 'fighting-design'
import '@fighting-design/fighting-theme'
@@ -12,7 +9,4 @@ import '@fighting-design/fighting-theme'
// import FightingDesign from '../../dist'
// import '../dist/dist/index.css'
-createApp(App)
- .use(FightingDesign)
- // .use(router)
- .mount('#start')
+createApp(App).use(FightingDesign).mount('#start')
diff --git a/start/src/router/index.ts b/start/src/router/index.ts
deleted file mode 100644
index 19f39561e4..0000000000
--- a/start/src/router/index.ts
+++ /dev/null
@@ -1,405 +0,0 @@
-// import type { RouteRecordRaw } from 'vue-router'
-// import { createRouter, createWebHashHistory } from 'vue-router'
-
-// const router = createRouter({
-// history: createWebHashHistory(),
-// routes
-// })
-
-// export default router
-
-export const accessRoutes = [
- {
- path: '/app/chainBrowser',
- redirect: '/app/chainBrowser/index',
- name: 'explorer',
- meta: { title: '浏览器', icon: 'left_laq', prefix: 'icon-', auth: ['explorer'] },
- props: { default: false },
- instances: {},
- leaveGuards: {},
- updateGuards: {},
- enterCallbacks: {},
- components: { default: {} }
- },
- {
- path: '/app/node',
- redirect: '/app/node/nodeManage',
- name: 'node',
- meta: { title: '节点管理', keepAlive: true, icon: 'left_jd', prefix: 'icon-' },
- props: { default: false },
- children: [
- {
- path: '/app/node/nodeManage',
- name: 'node_nodeManage',
- meta: { title: '节点列表', auth: ['node-list'] }
- },
- {
- path: '/app/node/votingManage',
- name: 'node_votingManage',
- meta: { title: '节点入网投票', auth: ['node-vote'] }
- },
- {
- path: '/app/node/consensusManage',
- name: 'node_consensusManage',
- meta: { title: '节点共识投票', auth: ['node-consensus'] }
- }
- ],
- instances: {},
- leaveGuards: {},
- updateGuards: {},
- enterCallbacks: {},
- components: { default: {} }
- },
- {
- path: '/app/contract',
- redirect: '/app/contract/index',
- name: 'contract',
- meta: { title: '合约管理', keepAlive: true, icon: 'left_jd', prefix: 'icon-' },
- props: { default: false },
- children: [
- { path: '/app/contract/index', name: 'contract_index', meta: { title: '合约列表' } }
- ],
- instances: {},
- leaveGuards: {},
- updateGuards: {},
- enterCallbacks: {},
- components: { default: {} }
- },
- {
- path: '/app/cross-chain-routing',
- redirect: '/app/cross-chain-routing/index',
- name: 'cross-chain-routing',
- meta: { title: '跨链路由', keepAlive: true, icon: 'left_jd', prefix: 'icon-' },
- props: { default: false },
- children: [
- {
- path: '/app/cross-chain-routing/index',
- name: 'cross-chain-routing_index',
- meta: { title: '路由信息' }
- }
- ],
- instances: {},
- leaveGuards: {},
- updateGuards: {},
- enterCallbacks: {},
- components: { default: {} }
- },
- {
- path: '/app/among/data',
- redirect: '/app/among/data/index',
- name: 'monitor',
- meta: { title: '数链管理', keepAlive: true, icon: 'left_jd', prefix: 'icon-' },
- props: { default: false },
- children: [
- {
- path: '/app/among/data/index',
- name: 'monitor_index',
- meta: { title: '上链数据查询' }
- }
- ],
- instances: {},
- leaveGuards: {},
- updateGuards: {},
- enterCallbacks: {},
- components: { default: {} }
- }
-]
-
-// [
-// {
-// path: '/app',
-// name: 'app',
-// redirect: '/app/chainBrowser', // 在 BasicLayout 中动态处理
-// meta: { title: '管理平台' },
-// children: [
-// // 浏览器 ok
-// {
-// path: '/app/chainBrowser',
-// name: 'explorer',
-// redirect: '/app/chainBrowser/index',
-// meta: {
-// title: '浏览器',
-// icon: 'left_laq',
-// prefix: 'icon-',
-// auth: ['explorer']
-// },
-// children: [
-// {
-// path: '/app/chainBrowser/index',
-// name: 'chainBrowser_index',
-// meta: {
-// keepAlive: true,
-// hideInMenu: true,
-// hiddenWrap: true
-// }
-// },
-// {
-// path: '/app/chainBrowser/blockMore',
-// name: 'chainBrowser_blockMore',
-// meta: {
-// title: '区块信息',
-// breadcrumb: true,
-// hideInMenu: true
-// }
-// },
-// {
-// path: '/app/chainBrowser/tradingMore',
-// name: 'chainBrowser_tradingMore',
-// meta: {
-// title: '交易信息',
-// breadcrumb: true,
-// hideInMenu: true
-// }
-// },
-// {
-// path: '/app/chainBrowser/nodeInfo',
-// name: 'chainBrowser_nodeInfo',
-// meta: {
-// title: '节点信息',
-// breadcrumb: true,
-// hideInMenu: true
-// }
-// },
-// {
-// path: '/app/chainBrowser/blockDetail/:hash',
-// name: 'blockDetail',
-// meta: {
-// title: '区块信息',
-// breadcrumb: true,
-// hideInMenu: true,
-// hiddenWrap: true
-// }
-// },
-// {
-// path: '/app/chainBrowser/tradingDetail/:hash',
-// name: 'tradingDetail',
-// meta: {
-// title: '交易信息',
-// breadcrumb: true,
-// hideInMenu: true,
-// hiddenWrap: true
-// }
-// },
-// {
-// path: '/app/chainBrowser/accountDetail/:hash',
-// name: 'accountDetail',
-// meta: {
-// title: '账户详情',
-// breadcrumb: true,
-// hideInMenu: true,
-// hiddenWrap: true
-// }
-// }
-// ]
-// },
-// // 节点管理 ok
-// {
-// path: '/app/node',
-// name: 'node',
-// redirect: '/app/node/nodeManage',
-// meta: {
-// title: '节点管理',
-// keepAlive: true,
-// icon: 'left_jd',
-// prefix: 'icon-'
-// },
-// children: [
-// // 节点列表
-// {
-// path: '/app/node/nodeManage',
-// name: 'node_nodeManage',
-// meta: {
-// title: '节点列表',
-// auth: ['node-list']
-// }
-// },
-// // 节点入网投票
-// {
-// path: '/app/node/votingManage',
-// name: 'node_votingManage',
-// meta: {
-// title: '节点入网投票',
-// auth: ['node-vote']
-// }
-// },
-// // 节点共识投票
-// {
-// path: '/app/node/consensusManage',
-// name: 'node_consensusManage',
-// meta: {
-// title: '节点共识投票',
-// auth: ['node-consensus']
-// }
-// },
-// // 新增节点
-// {
-// path: '/app/node/add',
-// name: 'node_add',
-// meta: { title: '新增节点', hideInMenu: true, hiddenWrap: true }
-// }
-// ]
-// },
-// // 合约管理 ok
-// {
-// path: '/app/contract',
-// name: 'contract',
-// redirect: '/app/contract/index',
-// meta: {
-// title: '合约管理',
-// keepAlive: true,
-// icon: 'left_jd',
-// prefix: 'icon-'
-// },
-// children: [
-// {
-// path: '/app/contract/index',
-// name: 'contract_index',
-// meta: {
-// title: '合约列表'
-// // auth: ['node-vote'],
-// }
-// }
-// ]
-// },
-// // 跨链路由 ok
-// {
-// path: '/app/cross-chain-routing',
-// name: 'cross-chain-routing',
-// redirect: '/app/cross-chain-routing/index',
-// meta: {
-// title: '跨链路由',
-// keepAlive: true,
-// icon: 'left_jd',
-// prefix: 'icon-'
-// },
-// children: [
-// {
-// path: '/app/cross-chain-routing/index',
-// name: 'cross-chain-routing_index',
-// meta: {
-// title: '路由信息'
-// // auth: ['node-vote'],
-// }
-// }
-// ]
-// },
-// // 运维监控 ok
-// {
-// path: '/app/monitor',
-// name: 'monitor',
-// redirect: '/app/monitor/index',
-// meta: {
-// title: '运维监控',
-// keepAlive: true,
-// icon: 'left_jd',
-// prefix: 'icon-'
-// },
-// children: [
-// {
-// path: '/app/monitor/index',
-// name: 'monitor_index',
-// meta: {
-// title: '区块链监测'
-// // auth: ['node-vote'],
-// }
-// },
-// {
-// path: '/app/monitor/system-resource',
-// name: 'system-resource_index',
-// meta: {
-// title: '系统资源监测'
-// // auth: ['node-vote'],
-// }
-// },
-// {
-// path: '/app/monitor/warning',
-// name: 'warning_index',
-// meta: {
-// title: '告警配置'
-// // auth: ['node-vote'],
-// }
-// }
-// ]
-// },
-// // 系统设置
-// {
-// path: '/sys',
-// name: 'sys',
-// redirect: '/sys',
-// meta: { title: '系统设置' },
-// children: [
-// {
-// path: '/sys/institutions',
-// name: 'institutions',
-// meta: {
-// title: '机构管理',
-// keepAlive: true,
-// breadcrumb: true,
-// role: 1,
-// auth: ['organization']
-// }
-// },
-// {
-// path: '/sys/user',
-// name: 'user',
-// meta: { title: '用户管理', keepAlive: true, breadcrumb: true, auth: ['user'] }
-// },
-// {
-// path: '/sys/role',
-// name: 'role',
-// meta: { title: '角色管理', auth: ['role'] },
-// children: [
-// {
-// path: '/sys/role',
-// name: 'role',
-// meta: { breadcrumb: true }
-// },
-// {
-// path: '/sys/role/setting',
-// name: 'roleSetting',
-// meta: { title: '新增角色', breadcrumb: true, hiddenWrap: true }
-// }
-// ]
-// },
-// {
-// path: '/sys/logs',
-// name: 'logs',
-// meta: { title: '系统日志', keepAlive: true, breadcrumb: true, auth: ['log'] }
-// },
-// {
-// path: '/sys/account',
-// name: 'account',
-// meta: { title: '账号中心', keepAlive: true, breadcrumb: true }
-// },
-// {
-// path: '/sys/mechanism',
-// name: 'mechanism',
-// meta: { title: '机构设置', keepAlive: true, breadcrumb: true }
-// }
-// ]
-// },
-// // 数链中间件
-// {
-// path: '/app/among/data',
-// name: 'monitor',
-// redirect: '/app/among/data/index',
-// meta: {
-// title: '数链管理',
-// keepAlive: true,
-// icon: 'left_jd',
-// prefix: 'icon-'
-// },
-// children: [
-// {
-// path: '/app/among/data/index',
-// name: 'monitor_index',
-// meta: {
-// title: '上链数据查询'
-// // auth: ['node-vote'],
-// }
-// }
-// ]
-// }
-// ]
-// }
-// ];
diff --git a/vitest.config.mts b/vitest.config.mts
index 279e32f9ee..7b22e15fc6 100644
--- a/vitest.config.mts
+++ b/vitest.config.mts
@@ -7,9 +7,9 @@ import vue from '@vitejs/plugin-vue'
* vitest 配置文件
*
* @see vitest https://cn.vitest.dev
- *
+ *
* 文件名需要使用 mts 后缀,否则会有警告信息
- *
+ *
* @see CJS https://cn.vitejs.dev/guide/troubleshooting#vite-cjs-node-api-deprecated
*/
export default defineConfig({
@@ -48,6 +48,6 @@ export default defineConfig({
*
* @see include https://cn.vitest.dev/config/#include
*/
- include: ['**/packages/fighting-design/**/__test__/*.{test,spec}.{ts,tsx}'],
- },
+ include: ['**/packages/fighting-design/**/__test__/*.{test,spec}.{ts,tsx}']
+ }
})