语言适配
This commit is contained in:
@@ -118,7 +118,7 @@
|
||||
<!-- <div class="button_second Guide_1_31" @click="exportCanvas()"> -->
|
||||
<div class="button_second Guide_1_31" @click="exportModel()">
|
||||
<!-- {{ $t('HomeView.Export') }} -->
|
||||
finalize collection
|
||||
{{$t('HomeView.FinalizeCollection')}}
|
||||
</div>
|
||||
<!-- <div
|
||||
:class="[
|
||||
|
||||
@@ -61,7 +61,7 @@ export default defineComponent({
|
||||
worksSelect: 'all',
|
||||
worksType: [
|
||||
{
|
||||
name: '全部',
|
||||
name: useI18n().t('works.all'),
|
||||
value: 'all'
|
||||
},
|
||||
// {
|
||||
@@ -73,11 +73,11 @@ export default defineComponent({
|
||||
// value: 'freehandSketching'
|
||||
// },
|
||||
{
|
||||
name: 'Favorite Works',
|
||||
name: useI18n().t('works.FavoriteWorks'),
|
||||
value: 'favoriteWorks'
|
||||
},
|
||||
{
|
||||
name: 'My Works',
|
||||
name: useI18n().t('works.MyWorks'),
|
||||
value: 'myWorks'
|
||||
},
|
||||
],
|
||||
@@ -180,7 +180,7 @@ export default defineComponent({
|
||||
filter.isNoData = false
|
||||
getPorfolio()
|
||||
let worksPage:any = document.querySelector('.works_page')
|
||||
let imgParent:any = document.querySelector('.page_loading')
|
||||
let imgParent:any = document.querySelector('.works_page .page_loading')
|
||||
new IntersectionObserver(
|
||||
(entries, observer) => {
|
||||
// 如果不是相交,则直接返回
|
||||
@@ -285,6 +285,7 @@ export default defineComponent({
|
||||
}
|
||||
.page_content {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
height: auto;
|
||||
background: #f7f8fa;
|
||||
.page_loading_box{
|
||||
|
||||
@@ -233,8 +233,7 @@
|
||||
type="checkbox"
|
||||
name="checkbox-question"
|
||||
class="marTop1"
|
||||
:value="othersHelpful"
|
||||
v-model="helpful"
|
||||
ref="helpfulOthers"
|
||||
/>
|
||||
<span> Others:</span>
|
||||
<textarea
|
||||
@@ -345,9 +344,8 @@
|
||||
<input
|
||||
type="checkbox"
|
||||
name="checkbox-question"
|
||||
:value="othersImprovel"
|
||||
class="marTop1"
|
||||
v-model="improve"
|
||||
ref="improvelOthers"
|
||||
/>
|
||||
<span> Others:</span>
|
||||
<!-- <input
|
||||
@@ -357,7 +355,7 @@
|
||||
<textarea
|
||||
name="comments"
|
||||
id="text-area"
|
||||
:value="othersImprovel"
|
||||
v-model="othersImprovel"
|
||||
placeholder="Please enter..."
|
||||
></textarea>
|
||||
</label>
|
||||
@@ -397,8 +395,7 @@
|
||||
<input
|
||||
type="checkbox"
|
||||
name="reasonForNotSubscribe"
|
||||
:value="othersIsSubscribeCause"
|
||||
v-model="reasonForNotSubscribe"
|
||||
ref="isSubscribeCauseOthers"
|
||||
class="marTop1"
|
||||
/>
|
||||
<span> Others:</span>
|
||||
@@ -450,6 +447,11 @@ export default defineComponent({
|
||||
reasonForNotSubscribe:[],
|
||||
designTools:'',
|
||||
});
|
||||
let refList:any = reactive({
|
||||
helpfulOthers:{},
|
||||
improvelOthers:{},
|
||||
isSubscribeCauseOthers:{},
|
||||
})
|
||||
let othersHelpful = ref('')
|
||||
let othersImprovel = ref('')
|
||||
let othersIsSubscribeCause = ref()
|
||||
@@ -623,44 +625,51 @@ export default defineComponent({
|
||||
let setSubmit = () => {
|
||||
let state = false
|
||||
let skipList = ['designTools','reasonForNotSubscribe']
|
||||
for (const key in feedbackData) {
|
||||
|
||||
let data = JSON.parse(JSON.stringify(feedbackData))
|
||||
if(refList.helpfulOthers.checked && othersHelpful.value){
|
||||
data.helpful.push(othersHelpful.value)
|
||||
}
|
||||
if(refList.improvelOthers.checked && othersImprovel.value){
|
||||
data.improve.push(othersImprovel.value)
|
||||
}
|
||||
if(refList.isSubscribeCauseOthers.checked && othersIsSubscribeCause.value){
|
||||
data.reasonForNotSubscribe.push(othersIsSubscribeCause.value)
|
||||
}
|
||||
for (const key in data) {
|
||||
if(skipList.indexOf(key) > -1){
|
||||
continue
|
||||
}
|
||||
let keyList = ['helpful','improve']
|
||||
if(keyList.indexOf(key) > -1){
|
||||
if(feedbackData[key].length == 0){
|
||||
if(data[key].length == 0){
|
||||
state = true
|
||||
break
|
||||
}
|
||||
}else if(feedbackData.isSubscribe == 'no' && feedbackData.reasonForNotSubscribe.length){
|
||||
}else if(data.isSubscribe == 'no' && data.reasonForNotSubscribe.length == 0){
|
||||
state = true
|
||||
break
|
||||
}else{
|
||||
if(feedbackData[key] == ''){
|
||||
if(data[key] == ''){
|
||||
state = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(state){
|
||||
message.info('Please check that all the * numbers have been filled in')
|
||||
return
|
||||
}
|
||||
let _this = this
|
||||
Modal.confirm({
|
||||
title: `Please confirm your email address to ensure it is correct. ${feedbackData.email}`,
|
||||
title: `Please confirm your email address to ensure it is correct. ${data.email}`,
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
okText: 'Yes',
|
||||
cancelText: 'No',
|
||||
mask:false,
|
||||
centered:true,
|
||||
onOk() {
|
||||
feedbackData.language = 'EN'
|
||||
submit(JSON.stringify(feedbackData))
|
||||
data.language = 'EN'
|
||||
submit(JSON.stringify(data))
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -673,8 +682,10 @@ export default defineComponent({
|
||||
).catch(res=>{
|
||||
});
|
||||
}
|
||||
|
||||
return {
|
||||
...toRefs(feedbackData),
|
||||
...toRefs(refList),
|
||||
othersHelpful,
|
||||
othersImprovel,
|
||||
othersIsSubscribeCause,
|
||||
|
||||
@@ -232,8 +232,7 @@
|
||||
type="checkbox"
|
||||
name="checkbox-question"
|
||||
class="marTop1"
|
||||
:value="othersHelpful"
|
||||
v-model="helpful"
|
||||
ref="helpfulOthers"
|
||||
/>
|
||||
<span> 其他:</span>
|
||||
<textarea
|
||||
@@ -342,9 +341,8 @@
|
||||
<input
|
||||
type="checkbox"
|
||||
name="checkbox-question"
|
||||
:value="othersImprovel"
|
||||
class="marTop1"
|
||||
v-model="improve"
|
||||
ref="improvelOthers"
|
||||
/>
|
||||
<span> 其他:</span>
|
||||
<!-- <input
|
||||
@@ -354,7 +352,7 @@
|
||||
<textarea
|
||||
name="comments"
|
||||
id="text-area"
|
||||
:value="othersImprovel"
|
||||
v-model="othersImprovel"
|
||||
placeholder="请输入..."
|
||||
></textarea>
|
||||
</label>
|
||||
@@ -394,8 +392,7 @@
|
||||
<input
|
||||
type="checkbox"
|
||||
name="reasonForNotSubscribe"
|
||||
:value="othersIsSubscribeCause"
|
||||
v-model="reasonForNotSubscribe"
|
||||
ref="isSubscribeCauseOthers"
|
||||
class="marTop1"
|
||||
/>
|
||||
<span> 其他:</span>
|
||||
@@ -446,6 +443,11 @@ export default defineComponent({
|
||||
reasonForNotSubscribe:[],
|
||||
designTools:'',
|
||||
});
|
||||
let refList:any = reactive({
|
||||
helpfulOthers:{},
|
||||
improvelOthers:{},
|
||||
isSubscribeCauseOthers:{},
|
||||
})
|
||||
let othersHelpful = ref('')
|
||||
let othersImprovel = ref('')
|
||||
let othersIsSubscribeCause = ref()
|
||||
@@ -619,44 +621,51 @@ export default defineComponent({
|
||||
let setSubmit = () => {
|
||||
let state = false
|
||||
let skipList = ['designTools','reasonForNotSubscribe']
|
||||
for (const key in feedbackData) {
|
||||
|
||||
let data = JSON.parse(JSON.stringify(feedbackData))
|
||||
if(refList.helpfulOthers.checked && othersHelpful.value){
|
||||
data.helpful.push(othersHelpful.value)
|
||||
}
|
||||
if(refList.improvelOthers.checked && othersImprovel.value){
|
||||
data.improve.push(othersImprovel.value)
|
||||
}
|
||||
if(refList.isSubscribeCauseOthers.checked && othersIsSubscribeCause.value){
|
||||
data.reasonForNotSubscribe.push(othersIsSubscribeCause.value)
|
||||
}
|
||||
for (const key in data) {
|
||||
if(skipList.indexOf(key) > -1){
|
||||
continue
|
||||
}
|
||||
let keyList = ['helpful','improve']
|
||||
if(keyList.indexOf(key) > -1){
|
||||
if(feedbackData[key].length == 0){
|
||||
if(data[key].length == 0){
|
||||
state = true
|
||||
break
|
||||
}
|
||||
}else if(feedbackData.isSubscribe == 'no' && feedbackData.reasonForNotSubscribe.length){
|
||||
}else if(data.isSubscribe == 'no' && data.reasonForNotSubscribe.length == 0){
|
||||
state = true
|
||||
break
|
||||
}else{
|
||||
if(feedbackData[key] == ''){
|
||||
if(data[key] == ''){
|
||||
state = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(state){
|
||||
message.info('Please check that all the * numbers have been filled in')
|
||||
return
|
||||
}
|
||||
let _this = this
|
||||
Modal.confirm({
|
||||
title: `Please confirm your email address to ensure it is correct. ${feedbackData.email}`,
|
||||
title: `Please confirm your email address to ensure it is correct. ${data.email}`,
|
||||
icon: createVNode(ExclamationCircleOutlined),
|
||||
okText: 'Yes',
|
||||
cancelText: 'No',
|
||||
mask:false,
|
||||
centered:true,
|
||||
onOk() {
|
||||
feedbackData.language = 'CN'
|
||||
submit(JSON.stringify(feedbackData))
|
||||
data.language = 'CN'
|
||||
submit(JSON.stringify(data))
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -668,7 +677,8 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
return {
|
||||
...toRefs(feedbackData),
|
||||
...toRefs(feedbackData),
|
||||
...toRefs(refList),
|
||||
othersHelpful,
|
||||
othersImprovel,
|
||||
othersIsSubscribeCause,
|
||||
|
||||
Reference in New Issue
Block a user