Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
黄庭坚
jinfa-platform
Commits
51bc6457
Commit
51bc6457
authored
Jul 23, 2020
by
GuanHua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:语言修改
parent
062755a5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
4 deletions
+7
-4
base.config.json
config/base.config.json
+0
-0
SelectLang.tsx
src/layouts/components/SelectLang.tsx
+1
-1
index.tsx
src/pages/shop/components/citySelect/index.tsx
+3
-3
index.tsx
src/pages/shop/shopInfo/index.tsx
+3
-0
No files found.
config/base.config.json
View file @
51bc6457
This diff is collapsed.
Click to expand it.
src/layouts/components/SelectLang.tsx
View file @
51bc6457
...
...
@@ -16,7 +16,7 @@ interface countryItem {
const
SelectLang
:
React
.
FC
=
()
=>
{
// 此处暂时无接口, 对接接口后需用枚举类型做补充
const
[
currentLangKey
,
setCurrentLangKey
]
=
useState
<
string
>
(
'
zh-CN
'
)
const
[
currentLangKey
,
setCurrentLangKey
]
=
useState
<
string
>
(
'
cn
'
)
useEffect
(()
=>
{
console
.
log
(
getLocale
(),
"locale"
)
...
...
src/pages/shop/components/citySelect/index.tsx
View file @
51bc6457
...
...
@@ -93,8 +93,8 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
onChange
(
newData
)
}
const
handleAddNewSelect
=
(
index
:
number
)
=>
{
onAdd
({
index
,
provinceId
:
0
,
cityId
:
0
})
const
handleAddNewSelect
=
()
=>
{
onAdd
({
index
:
selectData
.
length
+
1
,
provinceId
:
0
,
cityId
:
0
})
}
const
handleReduceSelect
=
(
index
:
number
)
=>
{
if
(
selectData
.
length
>
1
)
{
...
...
@@ -128,7 +128,7 @@ const CityCascader: React.FC<CitySelectPropsType> = (props) => {
</
Select
>
{
index
===
selectData
.
length
-
1
&&
(
<
div
className=
{
cx
(
styles
.
opration_btn
,
styles
.
add
)
}
onClick=
{
()
=>
handleAddNewSelect
(
index
+
1
)
}
>
<
div
className=
{
cx
(
styles
.
opration_btn
,
styles
.
add
)
}
onClick=
{
()
=>
handleAddNewSelect
()
}
>
<
PlusOutlined
/>
</
div
>
)
...
...
src/pages/shop/shopInfo/index.tsx
View file @
51bc6457
...
...
@@ -40,7 +40,10 @@ const ShopInfo: React.FC = () => {
const
handleReduceCitySelect
=
(
index
:
number
)
=>
{
let
temp
=
JSON
.
parse
(
JSON
.
stringify
(
selectCityData
))
console
.
log
(
index
,
"index"
)
console
.
log
(
temp
)
temp
=
temp
.
filter
((
item
:
any
)
=>
item
.
index
!==
index
)
console
.
log
(
temp
)
setSelectCityData
(
temp
)
}
...
...
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