
无需加好友免费技术支持
前几日用vue相互配合wow为顾客制做双语教学宣传单页缓存动漫网页页面……
1、组装wow.js依赖,
npm install wowjs --save;
2、在main.js在文件中引入动漫css,
import "";
3、在入口app.vue文件中引用。
import WOW from "wow.js" ;
mounted() {
const wow = new WOW({
boxClass: "wow", // animated element css class (default is wow)
animateClass: "animated", // animation css class (default is animated)
offset: 0, // distance to the element when triggering the animation (default is 0)
mobile: true, // trigger animations on mobile devices (default is true)
live: true, // act on asynchronously loaded content (default is true)
scrollContainer: null, // optional scroll container selector, otherwise use window,
resetAnimation: true, // reset animation on end (default is true)
});
wow.init();
},
4.应用编码:
1、组装vuei18n依赖,
npm install vue-i18n@next
2、新建lang文件夹在里面新创建ch.js,en.js,index.js配备中英内容与入口文件index文件;
3、在main.js文件中引用,
import VueI18n from ""
3.在页面上应用
import { useI18n } from "vue-i18n";
{{ $t("baige.top.year") }}