Commit a0b09e74baf1f4e514da85ed9b1859ca2820fb37
1 parent
b84de1a5
fix: fix window npm script
Showing
7 changed files
with
13 additions
and
15 deletions
.eslintrc.js
build/script/preview.ts
@@ -53,7 +53,7 @@ export const runPreview = async () => { | @@ -53,7 +53,7 @@ export const runPreview = async () => { | ||
53 | }); | 53 | }); |
54 | const { type } = await prompt; | 54 | const { type } = await prompt; |
55 | if (type === BUILD) { | 55 | if (type === BUILD) { |
56 | - runBuild(); | 56 | + await runBuild(); |
57 | } | 57 | } |
58 | startApp(); | 58 | startApp(); |
59 | }; | 59 | }; |
package.json
@@ -6,11 +6,10 @@ | @@ -6,11 +6,10 @@ | ||
6 | "serve": "cross-env ts-node --files -P ./build/tsconfig.json ./build/script/preserve && cross-env NODE_ENV=development vite", | 6 | "serve": "cross-env ts-node --files -P ./build/tsconfig.json ./build/script/preserve && cross-env NODE_ENV=development vite", |
7 | "build": "node ./build/jsc.ts build", | 7 | "build": "node ./build/jsc.ts build", |
8 | "build:site": "cross-env SITE=true npm run build ", | 8 | "build:site": "cross-env SITE=true npm run build ", |
9 | - "build:no-cache": "yarn clean:cache && npm run build", | 9 | + "build:no-cache": "yarn clean:cache && node ./build/jsc.ts build", |
10 | "report": "cross-env REPORT=true npm run build ", | 10 | "report": "cross-env REPORT=true npm run build ", |
11 | "preview": "node ./build/jsc.ts preview", | 11 | "preview": "node ./build/jsc.ts preview", |
12 | "log": "node ./build/jsc.ts log", | 12 | "log": "node ./build/jsc.ts log", |
13 | - "gen:gz": "node ./build/jsc.ts gzip", | ||
14 | "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite_opt_cache", | 13 | "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite_opt_cache", |
15 | "clean:lib": "npx rimraf node_modules", | 14 | "clean:lib": "npx rimraf node_modules", |
16 | "ls-lint": "npx ls-lint", | 15 | "ls-lint": "npx ls-lint", |
src/components/Container/src/collapse/CollapseContainer.vue
@@ -4,12 +4,12 @@ | @@ -4,12 +4,12 @@ | ||
4 | <CollapseTransition :enable="canExpan"> | 4 | <CollapseTransition :enable="canExpan"> |
5 | <Skeleton v-if="loading" /> | 5 | <Skeleton v-if="loading" /> |
6 | <div class="collapse-container__body" v-else v-show="show"> | 6 | <div class="collapse-container__body" v-else v-show="show"> |
7 | - <LazyContainer :timeout="lazyTime" v-if="lazy"> | 7 | + <!-- <LazyContainer :timeout="lazyTime" v-if="lazy"> |
8 | <slot /> | 8 | <slot /> |
9 | <template #skeleton> | 9 | <template #skeleton> |
10 | <slot name="lazySkeleton" /> | 10 | <slot name="lazySkeleton" /> |
11 | </template> | 11 | </template> |
12 | - </LazyContainer> | 12 | + </LazyContainer> --> |
13 | <slot /> | 13 | <slot /> |
14 | </div> | 14 | </div> |
15 | </CollapseTransition> | 15 | </CollapseTransition> |
@@ -24,13 +24,18 @@ | @@ -24,13 +24,18 @@ | ||
24 | import CollapseHeader from './CollapseHeader.vue'; | 24 | import CollapseHeader from './CollapseHeader.vue'; |
25 | import { Skeleton } from 'ant-design-vue'; | 25 | import { Skeleton } from 'ant-design-vue'; |
26 | 26 | ||
27 | - import LazyContainer from '../LazyContainer'; | 27 | + // import LazyContainer from '../LazyContainer'; |
28 | 28 | ||
29 | import { triggerWindowResize } from '/@/utils/event/triggerWindowResizeEvent'; | 29 | import { triggerWindowResize } from '/@/utils/event/triggerWindowResizeEvent'; |
30 | // hook | 30 | // hook |
31 | import { useTimeout } from '/@/hooks/core/useTimeout'; | 31 | import { useTimeout } from '/@/hooks/core/useTimeout'; |
32 | export default defineComponent({ | 32 | export default defineComponent({ |
33 | - components: { Skeleton, LazyContainer, CollapseHeader, CollapseTransition }, | 33 | + components: { |
34 | + Skeleton, | ||
35 | + // LazyContainer, | ||
36 | + CollapseHeader, | ||
37 | + CollapseTransition, | ||
38 | + }, | ||
34 | name: 'CollapseContainer', | 39 | name: 'CollapseContainer', |
35 | props: { | 40 | props: { |
36 | // 标题 | 41 | // 标题 |
src/components/Transition/src/ExpandTransition.ts
@@ -9,7 +9,6 @@ interface HTMLExpandElement extends HTMLElement { | @@ -9,7 +9,6 @@ interface HTMLExpandElement extends HTMLElement { | ||
9 | _parent?: (Node & ParentNode & HTMLElement) | null; | 9 | _parent?: (Node & ParentNode & HTMLElement) | null; |
10 | _initialStyle: { | 10 | _initialStyle: { |
11 | transition: string; | 11 | transition: string; |
12 | - visibility: string | null; | ||
13 | overflow: string | null; | 12 | overflow: string | null; |
14 | height?: string | null; | 13 | height?: string | null; |
15 | width?: string | null; | 14 | width?: string | null; |
@@ -25,7 +24,6 @@ export default function (expandedParentClass = '', x = false) { | @@ -25,7 +24,6 @@ export default function (expandedParentClass = '', x = false) { | ||
25 | el._parent = el.parentNode as (Node & ParentNode & HTMLElement) | null; | 24 | el._parent = el.parentNode as (Node & ParentNode & HTMLElement) | null; |
26 | el._initialStyle = { | 25 | el._initialStyle = { |
27 | transition: el.style.transition, | 26 | transition: el.style.transition, |
28 | - visibility: el.style.visibility, | ||
29 | overflow: el.style.overflow, | 27 | overflow: el.style.overflow, |
30 | [sizeProperty]: el.style[sizeProperty], | 28 | [sizeProperty]: el.style[sizeProperty], |
31 | }; | 29 | }; |
@@ -35,7 +33,6 @@ export default function (expandedParentClass = '', x = false) { | @@ -35,7 +33,6 @@ export default function (expandedParentClass = '', x = false) { | ||
35 | const initialStyle = el._initialStyle; | 33 | const initialStyle = el._initialStyle; |
36 | 34 | ||
37 | el.style.setProperty('transition', 'none', 'important'); | 35 | el.style.setProperty('transition', 'none', 'important'); |
38 | - // Hide overflow to account for collapsed margins in the calculated height | ||
39 | el.style.overflow = 'hidden'; | 36 | el.style.overflow = 'hidden'; |
40 | const offset = `${el[offsetProperty]}px`; | 37 | const offset = `${el[offsetProperty]}px`; |
41 | 38 | ||
@@ -60,7 +57,6 @@ export default function (expandedParentClass = '', x = false) { | @@ -60,7 +57,6 @@ export default function (expandedParentClass = '', x = false) { | ||
60 | leave(el: HTMLExpandElement) { | 57 | leave(el: HTMLExpandElement) { |
61 | el._initialStyle = { | 58 | el._initialStyle = { |
62 | transition: '', | 59 | transition: '', |
63 | - visibility: '', | ||
64 | overflow: el.style.overflow, | 60 | overflow: el.style.overflow, |
65 | [sizeProperty]: el.style[sizeProperty], | 61 | [sizeProperty]: el.style[sizeProperty], |
66 | }; | 62 | }; |
@@ -88,6 +84,6 @@ export default function (expandedParentClass = '', x = false) { | @@ -88,6 +84,6 @@ export default function (expandedParentClass = '', x = false) { | ||
88 | const size = el._initialStyle[sizeProperty]; | 84 | const size = el._initialStyle[sizeProperty]; |
89 | el.style.overflow = el._initialStyle.overflow!; | 85 | el.style.overflow = el._initialStyle.overflow!; |
90 | if (size != null) el.style[sizeProperty] = size; | 86 | if (size != null) el.style[sizeProperty] = size; |
91 | - Reflect.deleteProperty(el, '_initialStyle'); | 87 | + delete (el as any)._initialStyle; |
92 | } | 88 | } |
93 | } | 89 | } |
src/views/demo/form/AdvancedForm.vue
vite.config.ts
@@ -40,7 +40,7 @@ const vitePlugins: VitePlugin[] = []; | @@ -40,7 +40,7 @@ const vitePlugins: VitePlugin[] = []; | ||
40 | if (isReportMode()) { | 40 | if (isReportMode()) { |
41 | // report | 41 | // report |
42 | rollupPlugins.push( | 42 | rollupPlugins.push( |
43 | - visualizer({ filename: './node_modules/.cache/stats.html', open: true }) as Plugin | 43 | + visualizer({ filename: './build/.cache/stats.html', open: true }) as Plugin |
44 | ); | 44 | ); |
45 | } | 45 | } |
46 | if (isBuildGzip() || isSiteMode()) { | 46 | if (isBuildGzip() || isSiteMode()) { |