Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
b84de1a5
提交
b84de1a5
authored
10月 16, 2020
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: fix npm script
上级
8a1bfdf1
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
14 行增加
和
14 行删除
+14
-14
compress.ts
build/plugin/gzip/compress.ts
+2
-2
cli.ts
build/script/cli.ts
+4
-4
preserve.ts
build/script/preserve.ts
+2
-0
package.json
package.json
+1
-1
ExpandTransition.ts
src/components/Transition/src/ExpandTransition.ts
+5
-7
没有找到文件。
build/plugin/gzip/compress.ts
浏览文件 @
b84de1a5
import
{
gzip
}
from
'zlib'
;
import
{
gzip
}
from
'zlib'
;
import
{
readFileSync
,
writeFileSync
}
from
'fs'
;
import
{
readFileSync
,
writeFileSync
}
from
'fs'
;
import
{
GzipPluginOptions
}
from
'./types'
;
import
{
GzipPluginOptions
}
from
'./types'
;
import
viteConfig
from
'../../vite.config'
;
import
viteConfig
from
'../../
../
vite.config'
;
import
{
readAllFile
,
getCwdPath
,
isBuildGzip
,
isSiteMode
}
from
'../utils'
;
import
{
readAllFile
,
getCwdPath
,
isBuildGzip
,
isSiteMode
}
from
'../
../
utils'
;
export
function
startGzip
(
export
function
startGzip
(
fileContent
:
string
|
Buffer
,
fileContent
:
string
|
Buffer
,
...
...
build/script/cli.ts
浏览文件 @
b84de1a5
...
@@ -6,7 +6,7 @@ import { argv } from 'yargs';
...
@@ -6,7 +6,7 @@ import { argv } from 'yargs';
import
{
runChangeLog
}
from
'./changelog'
;
import
{
runChangeLog
}
from
'./changelog'
;
import
{
runPostInstall
}
from
'./postinstall'
;
import
{
runPostInstall
}
from
'./postinstall'
;
import
{
runPreview
}
from
'./preview'
;
import
{
runPreview
}
from
'./preview'
;
import
{
runPreserve
}
from
'./preserve'
;
//
import { runPreserve } from './preserve';
import
{
runBuild
}
from
'./build'
;
import
{
runBuild
}
from
'./build'
;
const
task
=
(
argv
.
_
||
[])[
0
];
const
task
=
(
argv
.
_
||
[])[
0
];
...
@@ -23,9 +23,9 @@ switch (task) {
...
@@ -23,9 +23,9 @@ switch (task) {
runBuild
();
runBuild
();
break
;
break
;
case
'preserve'
:
//
case 'preserve':
runPreserve
();
//
runPreserve();
break
;
//
break;
case
'postinstall'
:
case
'postinstall'
:
runPostInstall
();
runPostInstall
();
...
...
build/script/preserve.ts
浏览文件 @
b84de1a5
...
@@ -69,3 +69,5 @@ export async function runPreserve() {
...
@@ -69,3 +69,5 @@ export async function runPreserve() {
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
}
}
runPreserve
();
package.json
浏览文件 @
b84de1a5
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
"version"
:
"2.0.0-rc.1"
,
"version"
:
"2.0.0-rc.1"
,
"scripts"
:
{
"scripts"
:
{
"bootstrap"
:
"yarn install"
,
"bootstrap"
:
"yarn install"
,
"serve"
:
"
node ./build/jsc.ts
preserve && cross-env NODE_ENV=development vite"
,
"serve"
:
"
cross-env ts-node --files -P ./build/tsconfig.json ./build/script/
preserve && cross-env NODE_ENV=development vite"
,
"build"
:
"node ./build/jsc.ts build"
,
"build"
:
"node ./build/jsc.ts build"
,
"build:site"
:
"cross-env SITE=true npm run build "
,
"build:site"
:
"cross-env SITE=true npm run build "
,
"build:no-cache"
:
"yarn clean:cache && npm run build"
,
"build:no-cache"
:
"yarn clean:cache && npm run build"
,
...
...
src/components/Transition/src/ExpandTransition.ts
浏览文件 @
b84de1a5
...
@@ -33,14 +33,14 @@ export default function (expandedParentClass = '', x = false) {
...
@@ -33,14 +33,14 @@ export default function (expandedParentClass = '', x = false) {
enter
(
el
:
HTMLExpandElement
)
{
enter
(
el
:
HTMLExpandElement
)
{
const
initialStyle
=
el
.
_initialStyle
;
const
initialStyle
=
el
.
_initialStyle
;
const
offset
=
`
${
el
[
offsetProperty
]}
px`
;
el
.
style
.
setProperty
(
'transition'
,
'none'
,
'important'
);
el
.
style
.
setProperty
(
'transition'
,
'none'
,
'important'
);
el
.
style
.
visibility
=
'hidden'
;
// Hide overflow to account for collapsed margins in the calculated height
el
.
style
.
visibility
=
initialStyle
.
visibility
!
;
el
.
style
.
overflow
=
'hidden'
;
el
.
style
.
overflow
=
'hidden'
;
const
offset
=
`
${
el
[
offsetProperty
]}
px`
;
el
.
style
[
sizeProperty
]
=
'0'
;
el
.
style
[
sizeProperty
]
=
'0'
;
/* eslint-disable-next-line */
void
el
.
offsetHeight
;
// force reflow
void
el
.
offsetHeight
;
// force reflow
el
.
style
.
transition
=
initialStyle
.
transition
;
el
.
style
.
transition
=
initialStyle
.
transition
;
...
@@ -48,9 +48,7 @@ export default function (expandedParentClass = '', x = false) {
...
@@ -48,9 +48,7 @@ export default function (expandedParentClass = '', x = false) {
if
(
expandedParentClass
&&
el
.
_parent
)
{
if
(
expandedParentClass
&&
el
.
_parent
)
{
el
.
_parent
.
classList
.
add
(
expandedParentClass
);
el
.
_parent
.
classList
.
add
(
expandedParentClass
);
}
}
console
.
log
(
'======================'
);
console
.
log
(
sizeProperty
,
offset
);
console
.
log
(
'======================'
);
requestAnimationFrame
(()
=>
{
requestAnimationFrame
(()
=>
{
el
.
style
[
sizeProperty
]
=
offset
;
el
.
style
[
sizeProperty
]
=
offset
;
});
});
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论