在我们的目录视图(在线商店)中,我们使用javascript来获取产品的不同视图,并使用CSS缩小图像.3连续/ 4或5 /
默认视图为4:
-webkit-transform: scale(0.83);
-moz-transform: scale(0.83);
-ms-transform: scale(0.83);
-o-transform: scale(0.83);
transform: scale(0.83);
Run Code Online (Sandbox Code Playgroud)
一切正常,但在野生动物园中图像看起来非常模糊.有没有办法改善野生动物园的渲染?更大图片:http://i.stack.imgur.com/NaFeB.jpg
我试图在点击链接后获取哈希值.有任何想法吗?
例如
链接
index.html#needThis
Run Code Online (Sandbox Code Playgroud)
这是我的结果:
index.htmlneedThis
Run Code Online (Sandbox Code Playgroud)
如何删除'index.html'?
$('#myselector').on('click', 'a', function(){
var hash = $(this).attr('href').replace('#', '') //get url
console.log(hash);
})
Run Code Online (Sandbox Code Playgroud) 我已经更改了我的应用程序以使其与 nuxt i18n 一起使用,并且当我直接访问路由时,翻译似乎有效。
例如 http://localhost:3000/fr/step/1
我的应用程序中有以下结构,每个步骤都是一个页面,里面有不同的组件。
我的nuxt配置:
在文档中,它说我需要localePath
为我的 nuxt-link添加它以使其与 i18n 插件一起使用。
https://nuxt-community.github.io/nuxt-i18n/basic-usage.html#nuxt-link
例如:
<nuxt-link to="localePath('about')">About</nuxt-link>
Run Code Online (Sandbox Code Playgroud)
在我的应用程序中,我曾经以编程方式导航到下一步,例如:
this.$router.push({ path: `step/${this.currentStep + 1}` });
Run Code Online (Sandbox Code Playgroud)
现在我有两个问题(问题):
localePath
?例如this.localePath('step/2')
不起作用。它总是重定向到首页。<nuxt-link :to="localePath('step/2')">Foo</nuxt-link>
但它也不起作用。当我尝试类似的事情时:<nuxt-link :to="localePath('success')">Foo</nuxt-link>
它有效,因为success
页面在第一级。似乎路由或我处理子页面的方式有问题。谁能帮我这个?