Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks-h5
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
ui
quantum-blocks-h5
Commits
b4c4615a
Commit
b4c4615a
authored
Mar 01, 2021
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feature: 项目拆分
parent
f9e8c662
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
66 additions
and
268 deletions
+66
-268
README.md
README.md
+2
-2
helper.ts
app/extend/helper.ts
+0
-23
editor.api.ts
app/web/api/editor.api.ts
+0
-26
operation.api.ts
app/web/api/operation.api.ts
+0
-18
user.api.ts
app/web/api/user.api.ts
+0
-21
favicon.ico
app/web/asset/images/favicon.ico
+0
-0
logo.png
app/web/asset/images/logo.png
+0
-0
dev.config.ts
app/web/config/dev.config.ts
+1
-1
index.vue
app/web/lib/GuideCube/index.vue
+4
-1
index.vue
app/web/lib/Marquee/index.vue
+4
-1
index.ts
app/web/page/activity/component/FreedomContainer/index.ts
+1
-1
index.ts
app/web/page/activity/view/activity/index.ts
+3
-3
index.ts
app/web/page/store/index.ts
+4
-4
index.ts
app/web/page/store/modules/activity/index.ts
+43
-0
state.ts
app/web/page/store/modules/activity/state.ts
+0
-0
type.ts
app/web/page/store/modules/activity/type.ts
+0
-0
index.ts
app/web/page/store/modules/editor/index.ts
+0
-154
plugin.local.ts
config/plugin.local.ts
+0
-3
plugin.ts
config/plugin.ts
+4
-1
helper.d.ts
typings/app/extend/helper.d.ts
+0
-9
No files found.
README.md
View file @
b4c4615a
#
egg-vue-typescript-boilerplate
#
quantum-blocks-h5
基于 Egg + Vue + Webpack SSR 服务端渲染和 CSR 前端渲染工程
骨架
项目。
基于 Egg + Vue + Webpack SSR 服务端渲染和 CSR 前端渲染工程项目。
Single Page Application Isomorphic Example for Egg + Vue, Front-End and Node of The Application are Written in TypeScript.
Single Page Application Isomorphic Example for Egg + Vue, Front-End and Node of The Application are Written in TypeScript.
...
...
app/extend/helper.ts
deleted
100644 → 0
View file @
f9e8c662
export
function
ok
(
data
)
{
if
(
typeof
data
===
'
string
'
)
{
return
{
code
:
'
0001
'
,
businessCode
:
'
0000
'
,
message
:
data
,
};
}
return
{
code
:
'
0000
'
,
businessCode
:
'
0000
'
,
data
,
};
}
export
function
fail
({
message
=
'
服务异常
'
,
code
=
'
0001
'
,
businessCode
=
'
0001
'
})
{
return
{
code
,
businessCode
,
message
,
};
}
app/web/api/editor.api.ts
View file @
b4c4615a
...
@@ -3,33 +3,7 @@ import config from '../config';
...
@@ -3,33 +3,7 @@ import config from '../config';
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
export
default
{
export
default
{
getPageList
(
params
)
{
return
http
.
get
(
'
editor/get/list
'
,
{
params
});
},
getPageById
(
params
)
{
getPageById
(
params
)
{
return
http
.
get
(
`editor/get/
${
params
.
pageId
}
`
);
return
http
.
get
(
`editor/get/
${
params
.
pageId
}
`
);
},
delPageById
(
pageId
)
{
return
http
.
delete
(
`editor/
${
pageId
}
`
);
},
updatePage
(
params
)
{
return
http
.
post
(
`editor/update`
,
params
);
},
savePage
(
params
)
{
return
http
.
post
(
`editor/save`
,
params
);
},
getTemplateList
()
{
return
http
.
get
(
'
editor/get/template
'
);
},
getUpToken
()
{
return
axios
.
get
(
`
${
config
.
opapiHost
}
/upload/getToken`
);
},
uploadBase64
(
base64Str
,
name
,
token
)
{
return
axios
.
post
(
`
${
config
.
qiniuUpHost
}
/putb64/-1/key/
${
name
}
`
,
base64Str
,
{
headers
:
{
'
content-type
'
:
'
application/octet-stream
'
,
'
Authorization
'
:
token
,
}
});
}
}
};
};
\ No newline at end of file
app/web/api/operation.api.ts
View file @
b4c4615a
...
@@ -2,24 +2,6 @@ import http from '../service/http.service';
...
@@ -2,24 +2,6 @@ import http from '../service/http.service';
import
config
from
'
../config
'
;
import
config
from
'
../config
'
;
export
default
{
export
default
{
getPageList
(
params
)
{
return
http
.
get
(
'
editor/get/list
'
,
{
params
});
},
getPageById
(
params
)
{
return
http
.
get
(
`editor/get/
${
params
.
pageId
}
`
);
},
delPageById
(
pageId
)
{
return
http
.
delete
(
`editor/
${
pageId
}
`
);
},
updatePage
(
params
)
{
return
http
.
post
(
`editor/update`
,
params
);
},
savePage
(
params
)
{
return
http
.
post
(
`editor/save`
,
params
);
},
getTemplateList
()
{
return
http
.
get
(
'
editor/get/template
'
);
},
// 商品列表-查询
// 商品列表-查询
skuInfo
(
params
)
{
skuInfo
(
params
)
{
return
http
.
post
(
`
${
config
.
opapiHost
}
/kdspOp/api/kdsp/activity/activity-goods/sku-info/list`
,
params
,
{
return
http
.
post
(
`
${
config
.
opapiHost
}
/kdspOp/api/kdsp/activity/activity-goods/sku-info/list`
,
params
,
{
...
...
app/web/api/user.api.ts
deleted
100644 → 0
View file @
f9e8c662
import
qs
from
'
qs
'
;
import
http
from
'
../service/http.service
'
;
import
config
from
'
../config
'
;
const
{
opapiHost
}
=
config
;
export
function
getCaptcha
()
{
return
`
${
opapiHost
}
/user/captcha`
;
}
export
function
login
(
params
)
{
return
http
.
post
(
`
${
opapiHost
}
/backStms/prologue/login`
,
qs
.
stringify
(
params
),
{
accessToken
:
true
});
}
export
function
getUserInfo
()
{
return
http
.
get
(
`
${
opapiHost
}
/backStms/oauth/currentuserinfo`
,
{
accessToken
:
true
});
}
\ No newline at end of file
app/web/asset/images/favicon.ico
View replaced file @
f9e8c662
View file @
b4c4615a
4.19 KB
|
W:
|
H:
2.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
app/web/asset/images/logo.png
deleted
100644 → 0
View file @
f9e8c662
35.2 KB
app/web/config/dev.config.ts
View file @
b4c4615a
const
protocol
=
EASY_ENV_IS_BROWSER
?
window
.
location
.
protocol
:
'
http
'
;
const
protocol
=
EASY_ENV_IS_BROWSER
?
window
.
location
.
protocol
:
'
http
'
;
export
default
{
export
default
{
apiHost
:
`http://localhost:700
1
/`
,
apiHost
:
`http://localhost:700
2
/`
,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: `http://192.168.28.199:7001/`,
// apiHost: 'https://quantum-vcc2.liangkebang.net/',
// apiHost: 'https://quantum-vcc2.liangkebang.net/',
qiniuHost
:
`https://appsync.lkbang.net/`
,
qiniuHost
:
`https://appsync.lkbang.net/`
,
...
...
app/web/lib/GuideCube/index.vue
View file @
b4c4615a
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
let
lastEvenProgress
=
0
;
let
lastEvenProgress
=
0
;
let
lastProgress
=
0
;
let
lastProgress
=
0
;
return
{
return
{
showSwiper
:
tru
e
,
showSwiper
:
fals
e
,
// style: {},
// style: {},
swiperOptions
:
{
swiperOptions
:
{
loop
:
this
.
loop
,
loop
:
this
.
loop
,
...
@@ -133,6 +133,9 @@
...
@@ -133,6 +133,9 @@
this
.
refreshSwiper
(
'
loop
'
,
newVal
);
this
.
refreshSwiper
(
'
loop
'
,
newVal
);
},
},
},
},
mounted
()
{
this
.
showSwiper
=
true
;
},
methods
:
{
methods
:
{
go
(
url
)
{
go
(
url
)
{
window
.
location
.
href
=
url
;
window
.
location
.
href
=
url
;
...
...
app/web/lib/Marquee/index.vue
View file @
b4c4615a
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
},
},
data
()
{
data
()
{
return
{
return
{
showSwiper
:
tru
e
,
showSwiper
:
fals
e
,
swiperOptions
:
{
swiperOptions
:
{
loop
:
true
,
loop
:
true
,
observer
:
true
,
observer
:
true
,
...
@@ -63,6 +63,9 @@
...
@@ -63,6 +63,9 @@
}
}
}
}
},
},
mounted
()
{
this
.
showSwiper
=
true
;
},
methods
:
{
methods
:
{
go
(
link
)
{
go
(
link
)
{
window
.
location
.
href
=
link
;
window
.
location
.
href
=
link
;
...
...
app/web/page/activity/component/FreedomContainer/index.ts
View file @
b4c4615a
...
@@ -7,7 +7,7 @@ import { resizeDiv } from '@/service/utils.service';
...
@@ -7,7 +7,7 @@ import { resizeDiv } from '@/service/utils.service';
@
Component
({
components
:
{
CustomMarquee
},
name
:
'
FreedomContainer
'
})
@
Component
({
components
:
{
CustomMarquee
},
name
:
'
FreedomContainer
'
})
export
default
class
FreedomContainer
extends
Mixins
(
TransformStyleMixin
)
{
export
default
class
FreedomContainer
extends
Mixins
(
TransformStyleMixin
)
{
@
Getter
(
'
pageData
'
)
pageData
;
@
Getter
(
'
pageData
'
)
pageData
;
@
State
(
state
=>
state
.
editor
.
curChildIndex
)
curChildIndex
;
@
State
(
state
=>
state
.
activity
.
curChildIndex
)
curChildIndex
;
@
Mutation
(
'
UPDATE_PAGE_INFO
'
)
updatePageInfo
;
@
Mutation
(
'
UPDATE_PAGE_INFO
'
)
updatePageInfo
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({
child
:
[]
})})
childItem
;
@
Prop
({
type
:
Object
,
default
:
()
=>
({
child
:
[]
})})
childItem
;
...
...
app/web/page/activity/view/activity/index.ts
View file @
b4c4615a
...
@@ -15,8 +15,8 @@ import { getStyle } from '@/service/utils.service';
...
@@ -15,8 +15,8 @@ import { getStyle } from '@/service/utils.service';
@
Component
({
components
:
{
FreedomContainer
,
GridLayout
,
GridItem
,
DownloadGuide
,
GoodsTabs
,
GuideCube
,
Advertisement
,
Coupon
},
name
:
'
Activity
'
})
@
Component
({
components
:
{
FreedomContainer
,
GridLayout
,
GridItem
,
DownloadGuide
,
GoodsTabs
,
GuideCube
,
Advertisement
,
Coupon
},
name
:
'
Activity
'
})
export
default
class
Activity
extends
Mixins
(
TransformStyleMixin
)
{
export
default
class
Activity
extends
Mixins
(
TransformStyleMixin
)
{
@
Getter
(
'
pageData
'
)
pageData
;
@
Getter
(
'
pageData
'
)
pageData
;
@
State
(
state
=>
state
.
editor
.
pageInfo
.
pageName
)
pageName
;
@
State
(
state
=>
state
.
activity
.
pageInfo
.
pageName
)
pageName
;
@
State
(
state
=>
state
.
editor
.
gridLayout
.
rowHeight
)
rowHeight
;
@
State
(
state
=>
state
.
activity
.
gridLayout
.
rowHeight
)
rowHeight
;
@
Provide
(
'
editor
'
);
@
Provide
(
'
editor
'
);
...
@@ -50,7 +50,7 @@ export default class Activity extends Mixins(TransformStyleMixin) {
...
@@ -50,7 +50,7 @@ export default class Activity extends Mixins(TransformStyleMixin) {
this
.
showBackTop
=
true
;
this
.
showBackTop
=
true
;
const
timer
=
setTimeout
(()
=>
{
const
timer
=
setTimeout
(()
=>
{
this
.
modfiTabsStyle
();
this
.
modfiTabsStyle
();
},
5
00
);
},
7
00
);
this
.
$once
(
'
hook:beforeDestroy
'
,
()
=>
{
this
.
$once
(
'
hook:beforeDestroy
'
,
()
=>
{
clearTimeout
(
timer
);
clearTimeout
(
timer
);
});
});
...
...
app/web/page/store/index.ts
View file @
b4c4615a
...
@@ -2,18 +2,18 @@
...
@@ -2,18 +2,18 @@
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
Vuex
from
'
vuex
'
;
import
RootState
from
'
./state
'
;
import
RootState
from
'
./state
'
;
import
Editor
from
'
./modules/editor
'
;
import
Activity
from
'
./modules/activity
'
;
Vue
.
use
(
Vuex
);
Vue
.
use
(
Vuex
);
export
default
function
createStore
(
initState
:
any
=
{})
{
export
default
function
createStore
(
initState
:
any
=
{})
{
const
{
title
,
url
,
origin
,
locale
,
csrf
,
editor
}
=
initState
;
const
{
title
,
url
,
origin
,
locale
,
csrf
,
activity
}
=
initState
;
console
.
log
(
'
store
'
,
title
,
url
,
origin
,
locale
,
csrf
,
editor
);
console
.
log
(
'
store
'
,
title
,
url
,
origin
,
locale
,
csrf
,
activity
);
const
state
=
{
title
,
url
,
origin
,
locale
,
csrf
};
const
state
=
{
title
,
url
,
origin
,
locale
,
csrf
};
return
new
Vuex
.
Store
<
RootState
>
({
return
new
Vuex
.
Store
<
RootState
>
({
state
,
state
,
modules
:
{
modules
:
{
editor
:
new
Editor
(
editor
)
activity
:
new
Activity
(
activity
)
}
}
});
});
}
}
\ No newline at end of file
app/web/page/store/modules/activity/index.ts
0 → 100644
View file @
b4c4615a
import
api
from
'
@/api/editor.api
'
;
import
{
Module
,
GetterTree
,
ActionTree
,
MutationTree
}
from
'
vuex
'
;
import
Vue
from
'
vue
'
;
import
{
UPDATE_PAGE_INFO
,
SET_PAGE_INFO
}
from
'
./type
'
;
import
RootState
from
'
../../state
'
;
import
EditorState
,
{
PageInfo
,
defaultState
,
Page
,
PageElement
}
from
'
./state
'
;
export
default
class
EditorModule
implements
Module
<
EditorState
,
RootState
>
{
state
:
EditorState
;
getters
:
GetterTree
<
EditorState
,
RootState
>
=
{
pageData
(
state
)
{
return
state
.
pageInfo
.
page
;
}
};
actions
:
ActionTree
<
EditorState
,
RootState
>
=
{
async
getPageDate
({
commit
},
condition
)
{
const
res
=
await
api
.
getPageById
(
condition
);
const
{
page
,
...
rest
}
=
res
as
PageInfo
;
commit
(
SET_PAGE_INFO
,
{
...
rest
,
page
:
JSON
.
parse
(
page
as
string
)
});
}
};
mutations
:
MutationTree
<
EditorState
>
=
{
[
SET_PAGE_INFO
](
state
,
data
)
{
state
.
pageInfo
=
data
;
},
[
UPDATE_PAGE_INFO
](
state
,
{
containerIndex
,
childIndex
,
data
})
{
const
page
=
(
state
.
pageInfo
.
page
as
Page
).
elements
;
if
(
childIndex
||
childIndex
===
0
)
{
page
[
containerIndex
].
child
.
splice
(
childIndex
,
1
,
data
);
}
else
{
page
.
splice
(
containerIndex
,
1
,
data
);
}
}
};
constructor
(
initState
:
EditorState
=
JSON
.
parse
(
JSON
.
stringify
(
defaultState
)))
{
this
.
state
=
initState
;
}
}
\ No newline at end of file
app/web/page/store/modules/
editor
/state.ts
→
app/web/page/store/modules/
activity
/state.ts
View file @
b4c4615a
File moved
app/web/page/store/modules/
editor
/type.ts
→
app/web/page/store/modules/
activity
/type.ts
View file @
b4c4615a
File moved
app/web/page/store/modules/editor/index.ts
deleted
100644 → 0
View file @
f9e8c662
import
api
from
'
@/api/editor.api
'
;
import
{
Module
,
GetterTree
,
ActionTree
,
MutationTree
}
from
'
vuex
'
;
import
Vue
from
'
vue
'
;
import
{
SET_PAGE_INFO
,
SET_DRAGABLE
,
COPY_OR_DELETE_PAGE_INFO
,
UPDATE_PAGE_INFO
,
ADD_ELEMENTS
,
SET_CUR_ELE_INDEX
,
SET_CUR_CHILD_INDEX
,
RESET_PAGE_DATA
,
SET_TEMPLATE_LIST
,
SET_PAGE_DATA
,
UPDATE_COMMON_STYLE
,
UPDATE_PAGE_STYLE
,
UPDATE_PAGE_PROPS
}
from
'
./type
'
;
import
RootState
from
'
../../state
'
;
import
EditorState
,
{
PageInfo
,
defaultState
,
Page
,
PageElement
}
from
'
./state
'
;
export
default
class
EditorModule
implements
Module
<
EditorState
,
RootState
>
{
state
:
EditorState
;
getters
:
GetterTree
<
EditorState
,
RootState
>
=
{
pageData
(
state
)
{
return
state
.
pageInfo
.
page
;
},
pageId
(
state
)
{
return
state
.
pageInfo
.
id
;
},
pageInfo
(
state
)
{
return
state
.
pageInfo
;
}
};
actions
:
ActionTree
<
EditorState
,
RootState
>
=
{
// pageInfo: 处理过的页面数据 - activity, pageData: 未处理的数据 - editor
async
savePageData
({
commit
},
{
pageInfo
,
pageData
})
{
if
(
pageInfo
.
id
)
{
await
api
.
updatePage
(
pageInfo
);
commit
(
SET_PAGE_INFO
,
{
...
pageInfo
,
page
:
pageData
});
}
else
{
const
res
=
await
api
.
savePage
(
pageInfo
);
const
{
page
,
...
rest
}
=
res
as
PageInfo
;
commit
(
SET_PAGE_INFO
,
{
...
rest
,
page
:
pageData
});
}
},
async
getPageDate
({
commit
},
condition
)
{
const
res
=
await
api
.
getPageById
(
condition
);
const
{
page
,
...
rest
}
=
res
as
PageInfo
;
commit
(
SET_PAGE_INFO
,
{
...
rest
,
page
:
JSON
.
parse
(
page
as
string
)
});
},
async
getTemplateList
({
commit
})
{
const
res
=
await
api
.
getTemplateList
({
type
:
'
template
'
});
const
handledData
=
res
.
map
((
v
,
idx
)
=>
({
eleName
:
`template
${
idx
}
`
,
title
:
v
.
pageName
,
coverImage
:
v
.
coverImage
,
page
:
v
.
page
}));
// todo 解析数据
commit
(
SET_TEMPLATE_LIST
,
handledData
);
},
async
setTemplateInfo
({
commit
},
condition
)
{
const
res
=
await
api
.
getPageById
(
condition
);
const
{
page
}
=
res
as
PageInfo
;
const
{
pageInfo
}
=
JSON
.
parse
(
JSON
.
stringify
(
defaultState
));
commit
(
SET_PAGE_INFO
,
{
...
pageInfo
,
page
:
JSON
.
parse
(
page
as
string
)
});
},
setDragable
({
commit
},
condition
)
{
commit
(
SET_DRAGABLE
,
condition
);
},
resetPageData
({
commit
},
condition
)
{
const
{
pageInfo
,
curEleIndex
,
curChildIndex
}
=
JSON
.
parse
(
JSON
.
stringify
(
defaultState
));
commit
(
SET_PAGE_INFO
,
pageInfo
);
commit
(
SET_CUR_ELE_INDEX
,
curEleIndex
);
commit
(
SET_CUR_CHILD_INDEX
,
curChildIndex
);
}
};
mutations
:
MutationTree
<
EditorState
>
=
{
[
SET_PAGE_INFO
](
state
,
data
)
{
state
.
pageInfo
=
data
;
},
[
SET_DRAGABLE
](
state
,
data
)
{
state
.
gridLayout
.
draggable
=
data
;
},
[
SET_CUR_ELE_INDEX
](
state
,
curEleIndex
)
{
state
.
curEleIndex
=
curEleIndex
;
},
[
SET_CUR_CHILD_INDEX
](
state
,
curChildIndex
)
{
state
.
curChildIndex
=
curChildIndex
;
},
[
SET_TEMPLATE_LIST
](
state
,
data
)
{
state
.
templateList
=
data
;
},
[
SET_PAGE_DATA
](
state
,
data
)
{
state
.
pageInfo
.
page
=
data
;
},
[
COPY_OR_DELETE_PAGE_INFO
](
state
,
{
type
,
containerIndex
,
childIndex
})
{
const
page
=
(
state
.
pageInfo
.
page
as
Page
).
elements
;
if
(
type
===
'
delete
'
)
{
if
(
childIndex
||
childIndex
===
0
)
{
page
[
containerIndex
].
child
.
splice
(
childIndex
,
1
);
}
else
{
page
.
splice
(
containerIndex
,
1
);
}
state
.
curEleIndex
=
null
;
state
.
curChildIndex
=
null
;
}
else
if
(
type
===
'
copy
'
)
{
let
eleCopyed
=
{}
as
PageElement
;
if
(
childIndex
||
childIndex
===
0
)
{
eleCopyed
=
page
[
containerIndex
].
child
[
childIndex
];
const
{
left
,
top
}
=
eleCopyed
.
commonStyle
;
page
[
containerIndex
].
child
.
push
({
...
eleCopyed
,
commonStyle
:
{
...
eleCopyed
.
commonStyle
,
left
:
left
+
10
,
top
:
top
+
10
}
});
}
else
{
eleCopyed
=
page
[
containerIndex
];
page
.
push
({
...
eleCopyed
,
point
:
{
...
eleCopyed
.
point
,
i
:
page
.
length
}});
}
}
},
[
UPDATE_PAGE_INFO
](
state
,
{
containerIndex
,
childIndex
,
data
})
{
const
page
=
(
state
.
pageInfo
.
page
as
Page
).
elements
;
if
(
childIndex
||
childIndex
===
0
)
{
page
[
containerIndex
].
child
.
splice
(
childIndex
,
1
,
data
);
}
else
{
page
.
splice
(
containerIndex
,
1
,
data
);
}
},
[
UPDATE_COMMON_STYLE
](
state
,
{
containerIndex
,
childIndex
,
data
})
{
const
page
=
(
state
.
pageInfo
.
page
as
Page
).
elements
;
if
(
childIndex
||
childIndex
===
0
)
{
Vue
.
set
(
page
[
containerIndex
].
child
[
childIndex
],
'
commonStyle
'
,
data
);
}
else
{
Vue
.
set
(
page
[
containerIndex
],
'
commonStyle
'
,
data
);
}
},
[
UPDATE_PAGE_STYLE
](
state
,
{
data
})
{
(
state
.
pageInfo
.
page
as
Page
).
commonStyle
=
data
;
},
[
UPDATE_PAGE_PROPS
](
state
,
{
data
})
{
(
state
.
pageInfo
.
page
as
Page
).
props
=
data
;
},
[
ADD_ELEMENTS
](
state
,
{
containerIndex
,
data
})
{
const
page
=
(
state
.
pageInfo
.
page
as
Page
).
elements
;
if
(
containerIndex
||
containerIndex
===
0
)
{
page
[
containerIndex
].
child
.
push
(
data
);
}
else
{
page
.
push
(
data
);
}
},
};
constructor
(
initState
:
EditorState
=
JSON
.
parse
(
JSON
.
stringify
(
defaultState
)))
{
this
.
state
=
initState
;
}
}
\ No newline at end of file
config/plugin.local.ts
View file @
b4c4615a
export
default
{
export
default
{
cors
:
{
package
:
'
egg-cors
'
},
webpack
:
{
webpack
:
{
package
:
'
egg-webpack
'
package
:
'
egg-webpack
'
},
},
...
...
config/plugin.ts
View file @
b4c4615a
export
default
{
export
default
{
vuessr
:
{
vuessr
:
{
package
:
'
egg-view-vue-ssr
'
package
:
'
egg-view-vue-ssr
'
}
},
cors
:
{
package
:
'
egg-cors
'
},
};
};
\ No newline at end of file
typings/app/extend/helper.d.ts
deleted
100644 → 0
View file @
f9e8c662
// This file is created by egg-ts-helper@1.25.8
// Do not modify this file!!!!!!!!!
import
'
egg
'
;
import
ExtendIHelper
from
'
../../../app/extend/helper
'
;
type
ExtendIHelperType
=
typeof
ExtendIHelper
;
declare
module
'
egg
'
{
interface
IHelper
extends
ExtendIHelperType
{
}
}
\ No newline at end of file
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