mirror of
https://github.com/vbenjs/vben-admin-thin-next.git
synced 2025-01-23 09:40:22 +08:00
style: perf code style
This commit is contained in:
parent
7c7f35a3d7
commit
77db3d5f80
@ -1,3 +1,4 @@
|
||||
// 修改自
|
||||
// https://github.com/luxueyan/vite-transform-globby-import/blob/master/src/index.ts
|
||||
|
||||
// TODO 目前还不能监听文件新增及删除 内容已经改变,缓存问题?
|
@ -1,6 +1,7 @@
|
||||
// #!/usr/bin/env node
|
||||
|
||||
import { sh } from 'tasksfile';
|
||||
|
||||
import { argv } from 'yargs';
|
||||
import { runBuildConfig } from './buildConf';
|
||||
import { runUpdateHtml } from './updateHtml';
|
||||
@ -9,7 +10,7 @@ import { errorConsole, successConsole } from '../utils';
|
||||
export const runBuild = async () => {
|
||||
try {
|
||||
const argvList = argv._;
|
||||
let cmd = `cross-env NODE_ENV=production vite build`;
|
||||
let cmd = `npx cross-env NODE_ENV=production vite build`;
|
||||
await sh(cmd, {
|
||||
async: true,
|
||||
nopipe: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vben-admin-2.0",
|
||||
"version": "2.0.0-beta.7",
|
||||
"version": "2.0.0-beta.8",
|
||||
"scripts": {
|
||||
"bootstrap": "yarn install",
|
||||
"serve": "node ./build/jsc.js preserve && cross-env NODE_ENV=development vite",
|
||||
|
@ -1,4 +1,3 @@
|
||||
const path = require('path');
|
||||
module.exports = {
|
||||
plugins: [require('autoprefixer'), require('postcss-import')],
|
||||
};
|
||||
|
@ -91,7 +91,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
watch(
|
||||
() => currentRoute.value.name,
|
||||
() => currentRoute.value.path,
|
||||
(name: string) => {
|
||||
name !== 'Redirect' && handleMenuChange();
|
||||
getParentPath();
|
||||
@ -210,7 +210,7 @@ export default defineComponent({
|
||||
: {};
|
||||
return (
|
||||
<Menu
|
||||
// forceSubMenuRender={props.isAppMenu}
|
||||
forceSubMenuRender={props.isAppMenu}
|
||||
selectedKeys={selectedKeys}
|
||||
defaultSelectedKeys={defaultSelectedKeys}
|
||||
mode={mode}
|
||||
|
@ -1,6 +1,6 @@
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: opacity 0.2s ease-in-out;
|
||||
transition: opacity 0.1s ease-in-out;
|
||||
}
|
||||
|
||||
.fade-enter-from,
|
||||
|
@ -1,7 +1,7 @@
|
||||
// zoom-out
|
||||
.zoom-out-enter-active,
|
||||
.zoom-out-leave-active {
|
||||
transition: opacity 0.2 ease-in-out, transform 0.2s ease-out;
|
||||
transition: opacity 0.1 ease-in-out, transform 0.15s ease-out;
|
||||
}
|
||||
|
||||
.zoom-out-enter-from,
|
||||
@ -13,7 +13,7 @@
|
||||
// zoom-fade
|
||||
.zoom-fade-enter-active,
|
||||
.zoom-fade-leave-active {
|
||||
transition: transform 0.2s, opacity 0.2s ease-out;
|
||||
transition: transform 0.1s, opacity 0.15s ease-out;
|
||||
}
|
||||
|
||||
.zoom-fade-enter-from {
|
||||
|
@ -54,14 +54,12 @@ export default defineComponent({
|
||||
<Dropdown placement="bottomLeft">
|
||||
{{
|
||||
default: () => (
|
||||
<>
|
||||
<section class={prefixCls}>
|
||||
<img class={`${prefixCls}__header`} src={headerImg} />
|
||||
<section class={`${prefixCls}__info`}>
|
||||
<section class={`${prefixCls}__name`}>{realName}</section>
|
||||
</section>
|
||||
<section class={prefixCls}>
|
||||
<img class={`${prefixCls}__header`} src={headerImg} />
|
||||
<section class={`${prefixCls}__info`}>
|
||||
<section class={`${prefixCls}__name`}>{realName}</section>
|
||||
</section>
|
||||
</>
|
||||
</section>
|
||||
),
|
||||
overlay: () => (
|
||||
<Menu slot="overlay" onClick={handleMenuClick}>
|
||||
@ -70,12 +68,10 @@ export default defineComponent({
|
||||
{showDoc && (
|
||||
<Menu.Item key="doc">
|
||||
{() => (
|
||||
<>
|
||||
<span class="flex items-center">
|
||||
<Icon icon="gg:loadbar-doc" class="mr-1" />
|
||||
<span>文档</span>
|
||||
</span>
|
||||
</>
|
||||
<span class="flex items-center">
|
||||
<Icon icon="gg:loadbar-doc" class="mr-1" />
|
||||
<span>文档</span>
|
||||
</span>
|
||||
)}
|
||||
</Menu.Item>
|
||||
)}
|
||||
|
@ -406,6 +406,7 @@ export default defineComponent({
|
||||
menuSetting: {
|
||||
mode,
|
||||
type,
|
||||
collapsed: false,
|
||||
...splitOpt,
|
||||
},
|
||||
};
|
||||
|
@ -10,7 +10,7 @@ export default {
|
||||
redirect: '/feat/icon',
|
||||
meta: {
|
||||
icon: 'ic:outline-featured-play-list',
|
||||
title: 'Feat',
|
||||
title: '页面功能',
|
||||
},
|
||||
},
|
||||
|
||||
|
@ -11,7 +11,7 @@ export default defineComponent({
|
||||
return (
|
||||
<Row>
|
||||
{() => (
|
||||
<>
|
||||
<div>
|
||||
<Col md={24} lg={8}>
|
||||
{() => (
|
||||
<CollapseContainer
|
||||
@ -20,7 +20,7 @@ export default defineComponent({
|
||||
class={`${prefixCls}__left`}
|
||||
>
|
||||
{() => (
|
||||
<>
|
||||
<div>
|
||||
<div class={`${prefixCls}__score`}>
|
||||
86.2<span>分</span>
|
||||
</div>
|
||||
@ -44,7 +44,7 @@ export default defineComponent({
|
||||
<span>56.5</span>
|
||||
</li>
|
||||
</ul>
|
||||
</>
|
||||
</div>
|
||||
)}
|
||||
</CollapseContainer>
|
||||
)}
|
||||
@ -56,26 +56,24 @@ export default defineComponent({
|
||||
</CollapseContainer>
|
||||
)}
|
||||
</Col>
|
||||
</>
|
||||
</div>
|
||||
)}
|
||||
</Row>
|
||||
);
|
||||
};
|
||||
return () => (
|
||||
<Tabs class={prefixCls} default-active-key="1">
|
||||
{() => (
|
||||
<>
|
||||
<Tabs.TabPane key="1" tab="产品一">
|
||||
{() => renderContent()}
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="2" tab="产品二">
|
||||
{() => renderContent()}
|
||||
</Tabs.TabPane>
|
||||
<Tabs.TabPane key="3" tab="产品三">
|
||||
{() => renderContent()}
|
||||
</Tabs.TabPane>
|
||||
</>
|
||||
)}
|
||||
{() => [
|
||||
<Tabs.TabPane key="1" tab="产品一">
|
||||
{() => renderContent()}
|
||||
</Tabs.TabPane>,
|
||||
<Tabs.TabPane key="2" tab="产品二">
|
||||
{() => renderContent()}
|
||||
</Tabs.TabPane>,
|
||||
<Tabs.TabPane key="3" tab="产品三">
|
||||
{() => renderContent()}
|
||||
</Tabs.TabPane>,
|
||||
]}
|
||||
</Tabs>
|
||||
);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user