Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
b84de1a5
Commit
b84de1a5
authored
Oct 16, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix npm script
parent
8a1bfdf1
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
14 deletions
+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
No files found.
build/plugin/gzip/compress.ts
View file @
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
View file @
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
View file @
b84de1a5
...
@@ -69,3 +69,5 @@ export async function runPreserve() {
...
@@ -69,3 +69,5 @@ export async function runPreserve() {
}
catch
(
error
)
{}
}
catch
(
error
)
{}
}
}
}
}
runPreserve
();
package.json
View file @
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
View file @
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
;
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment