Commit a0b09e74baf1f4e514da85ed9b1859ca2820fb37

Authored by vben
1 parent b84de1a5

fix: fix window npm script

.eslintrc.js
... ... @@ -6,7 +6,6 @@ module.exports = {
6 6 sourceType: 'module',
7 7 ecmaFeatures: {
8 8 jsx: true,
9   - jsx: true,
10 9 },
11 10 },
12 11  
... ...
build/script/preview.ts
... ... @@ -53,7 +53,7 @@ export const runPreview = async () => {
53 53 });
54 54 const { type } = await prompt;
55 55 if (type === BUILD) {
56   - runBuild();
  56 + await runBuild();
57 57 }
58 58 startApp();
59 59 };
... ...
package.json
... ... @@ -6,11 +6,10 @@
6 6 "serve": "cross-env ts-node --files -P ./build/tsconfig.json ./build/script/preserve && cross-env NODE_ENV=development vite",
7 7 "build": "node ./build/jsc.ts build",
8 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 10 "report": "cross-env REPORT=true npm run build ",
11 11 "preview": "node ./build/jsc.ts preview",
12 12 "log": "node ./build/jsc.ts log",
13   - "gen:gz": "node ./build/jsc.ts gzip",
14 13 "clean:cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite_opt_cache",
15 14 "clean:lib": "npx rimraf node_modules",
16 15 "ls-lint": "npx ls-lint",
... ...
src/components/Container/src/collapse/CollapseContainer.vue
... ... @@ -4,12 +4,12 @@
4 4 <CollapseTransition :enable="canExpan">
5 5 <Skeleton v-if="loading" />
6 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 8 <slot />
9 9 <template #skeleton>
10 10 <slot name="lazySkeleton" />
11 11 </template>
12   - </LazyContainer>
  12 + </LazyContainer> -->
13 13 <slot />
14 14 </div>
15 15 </CollapseTransition>
... ... @@ -24,13 +24,18 @@
24 24 import CollapseHeader from './CollapseHeader.vue';
25 25 import { Skeleton } from 'ant-design-vue';
26 26  
27   - import LazyContainer from '../LazyContainer';
  27 + // import LazyContainer from '../LazyContainer';
28 28  
29 29 import { triggerWindowResize } from '/@/utils/event/triggerWindowResizeEvent';
30 30 // hook
31 31 import { useTimeout } from '/@/hooks/core/useTimeout';
32 32 export default defineComponent({
33   - components: { Skeleton, LazyContainer, CollapseHeader, CollapseTransition },
  33 + components: {
  34 + Skeleton,
  35 + // LazyContainer,
  36 + CollapseHeader,
  37 + CollapseTransition,
  38 + },
34 39 name: 'CollapseContainer',
35 40 props: {
36 41 // 标题
... ...
src/components/Transition/src/ExpandTransition.ts
... ... @@ -9,7 +9,6 @@ interface HTMLExpandElement extends HTMLElement {
9 9 _parent?: (Node & ParentNode & HTMLElement) | null;
10 10 _initialStyle: {
11 11 transition: string;
12   - visibility: string | null;
13 12 overflow: string | null;
14 13 height?: string | null;
15 14 width?: string | null;
... ... @@ -25,7 +24,6 @@ export default function (expandedParentClass = &#39;&#39;, x = false) {
25 24 el._parent = el.parentNode as (Node & ParentNode & HTMLElement) | null;
26 25 el._initialStyle = {
27 26 transition: el.style.transition,
28   - visibility: el.style.visibility,
29 27 overflow: el.style.overflow,
30 28 [sizeProperty]: el.style[sizeProperty],
31 29 };
... ... @@ -35,7 +33,6 @@ export default function (expandedParentClass = &#39;&#39;, x = false) {
35 33 const initialStyle = el._initialStyle;
36 34  
37 35 el.style.setProperty('transition', 'none', 'important');
38   - // Hide overflow to account for collapsed margins in the calculated height
39 36 el.style.overflow = 'hidden';
40 37 const offset = `${el[offsetProperty]}px`;
41 38  
... ... @@ -60,7 +57,6 @@ export default function (expandedParentClass = &#39;&#39;, x = false) {
60 57 leave(el: HTMLExpandElement) {
61 58 el._initialStyle = {
62 59 transition: '',
63   - visibility: '',
64 60 overflow: el.style.overflow,
65 61 [sizeProperty]: el.style[sizeProperty],
66 62 };
... ... @@ -88,6 +84,6 @@ export default function (expandedParentClass = &#39;&#39;, x = false) {
88 84 const size = el._initialStyle[sizeProperty];
89 85 el.style.overflow = el._initialStyle.overflow!;
90 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
1 1 <template>
2 2 <div class="m-4">
3   - <div class="mb-4"> </div>
4 3 <CollapseContainer title="基础收缩示例">
5 4 <BasicForm @register="register" />
6 5 </CollapseContainer>
... ...
vite.config.ts
... ... @@ -40,7 +40,7 @@ const vitePlugins: VitePlugin[] = [];
40 40 if (isReportMode()) {
41 41 // report
42 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 46 if (isBuildGzip() || isSiteMode()) {
... ...