添加语言适配
This commit is contained in:
@@ -12,8 +12,8 @@ let data = {
|
||||
const driverObj__ = driver({
|
||||
steps: [
|
||||
{ element: '.Guide_1_1', popover: { title: 'Title', description: 'Description' } },
|
||||
{ element: '.Guide_1_2', popover: { title: 'Title', description: 'Description' } },
|
||||
{ element: '.Guide_1_2', popover: { title: 'Title', description: 'Description' } },
|
||||
// { element: '.Guide_1_2', popover: { title: 'Title', description: 'Description' } },
|
||||
// { element: '.Guide_1_2', popover: { title: 'Title', description: 'Description' } },
|
||||
{ element: '.Guide_1_4', popover: { title: 'Title', description: 'Description' } },
|
||||
{ element: '.Guide_1_5', popover: { title: 'Title', description: 'Description' } },
|
||||
{ element: '.Guide_1_6', popover: { title: 'Title', description: 'Description' } },
|
||||
@@ -58,16 +58,21 @@ const driverObj__ = driver({
|
||||
overlayOpacity:.4,
|
||||
overlay: true,
|
||||
onPopoverRender: (popover, options) => {//每个步骤的元素和所有信息
|
||||
// console.log(popover,options);
|
||||
console.log(popover,options);
|
||||
if(element){
|
||||
element.classList.remove('Guide_')
|
||||
}
|
||||
popover.previousButton.style.display = 'none'
|
||||
let driver = document.querySelector('body')
|
||||
if(options.state.activeIndex >= 2 && options.state.activeIndex < 3){
|
||||
options.config.stagePadding = 0
|
||||
}else{
|
||||
options.config.stagePadding = 10
|
||||
}
|
||||
if(
|
||||
options.state.activeIndex >= 1 && options.state.activeIndex <= 2 ||
|
||||
options.state.activeIndex >= 20 && options.state.activeIndex < 21 ||
|
||||
options.state.activeIndex >= 26 && options.state.activeIndex < 27
|
||||
// options.state.activeIndex >= 1 && options.state.activeIndex <= 2 ||
|
||||
options.state.activeIndex >= 18 && options.state.activeIndex < 19 ||
|
||||
options.state.activeIndex >= 24 && options.state.activeIndex < 25
|
||||
){
|
||||
popover.footer.style.display = 'block'
|
||||
driver.classList.add('showEvents')
|
||||
@@ -90,7 +95,10 @@ const driverObj__ = driver({
|
||||
},
|
||||
//销毁前
|
||||
onDestroyStarted:()=>{
|
||||
data.driver = false
|
||||
data = {
|
||||
index : driverIndex__,
|
||||
driver : false,
|
||||
}
|
||||
store?.commit("setGuide", data);
|
||||
driverObj__.destroy();//销毁方法
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user