提交 00bdacee 编写于 作者: D DCloud_LXH

fix(App): navigator seo

上级 8912639b
...@@ -10,6 +10,14 @@ export class UniNavigator extends UniComponent { ...@@ -10,6 +10,14 @@ export class UniNavigator extends UniComponent {
refNodeId: number, refNodeId: number,
nodeJson: Partial<UniNodeJSON> nodeJson: Partial<UniNodeJSON>
) { ) {
super(id, 'uni-navigator', Navigator, parentNodeId, refNodeId, nodeJson) super(
id,
'uni-navigator',
Navigator,
parentNodeId,
refNodeId,
nodeJson,
'uni-navigator'
)
} }
} }
import { getCurrentInstance } from 'vue' import { getCurrentInstance } from 'vue'
import { useHover } from '../../helpers/useHover' import { useHover } from '../../helpers/useHover'
import { defineBuiltInComponent } from '@dcloudio/uni-components' import { defineBuiltInComponent } from '@dcloudio/uni-components'
import { useAttrs } from '../../helpers/useAttrs'
import { onEventPrevent } from '@dcloudio/uni-core' import { onEventPrevent } from '@dcloudio/uni-core'
const OPEN_TYPES = [ const OPEN_TYPES = [
...@@ -60,9 +59,6 @@ export default /*#__PURE__*/ defineBuiltInComponent({ ...@@ -60,9 +59,6 @@ export default /*#__PURE__*/ defineBuiltInComponent({
setup(props, { slots }) { setup(props, { slots }) {
const vm = getCurrentInstance() const vm = getCurrentInstance()
const __scopeId = (vm && (vm.root.type as any).__scopeId) || '' const __scopeId = (vm && (vm.root.type as any).__scopeId) || ''
const { $attrs, $excludeAttrs, $listeners } = useAttrs({
excludeListeners: true,
})
const { hovering, binding } = useHover(props) const { hovering, binding } = useHover(props)
function onClick($event: MouseEvent) { function onClick($event: MouseEvent) {
...@@ -114,9 +110,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({ ...@@ -114,9 +110,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
<uni-navigator <uni-navigator
class={hasHoverClass && hovering.value ? hoverClass : ''} class={hasHoverClass && hovering.value ? hoverClass : ''}
{...(hasHoverClass && binding)} {...(hasHoverClass && binding)}
{...$attrs.value} {...(vm ? vm.attrs : {})}
{...$excludeAttrs.value}
{...$listeners.value}
{...{ {...{
[__scopeId]: '', [__scopeId]: '',
}} }}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册