'Use the <code>container-id</code> attribute to specify the scrolling container. <code>link-click</code> listens to anchor click events and prevents the default browser behavior. Implement intra-page redirection in single-page <code>hash</code> routing mode so that the page scrolls only in the specified container. Set the custom class name through the <code>mask-class</code> attribute to highlight the scrolling target element'
'en-US':`By setting the scrolling container through<code>container id</code>,<code>link click</code>listens for anchor click events, prevents browser default behavior, and implements single page<code>hash</code>routing mode for page hopping, scrolling within the specified container< Br/>
'en-US':'<code>on-change</code> event. Callback is triggered when the anchor link changes.'
'zh-CN':'通过<code>change</code>监听锚点改变的事件。',
'en-US':'<code>change</code> event. Callback is triggered when the anchor link changes.'
},
'codeFiles':['on-change.vue']
'codeFiles':['change.vue']
}
],
apis:[
@ -49,8 +49,12 @@ export default {
{
'name':'container-id',
'type':'string',
'defaultValue':'document.body',
'desc':{'zh-CN':'指定滚动容器的id值','en-US':'Specify the scrolling container ID.'},
'defaultValue':'',
'desc':{
'zh-CN':'用于单页面 hash 路由模式时指定滚动容器的id值,不指定则默认为 HTML 文档的根节点 body 元素',
'en-US':
'When using single page hash routing mode, specify the id value of the scrolling container. If not specified, it defaults to the root node body element of the HTML document'
},
'demoId':'set-container'
},
{
@ -62,11 +66,12 @@ export default {
},
{
'name':'links',
'type':'{ key, link, title, children }[]',
'type':'ILink[]',
'typeAnchorName':'ILink',
'defaultValue':'',
'desc':{
'zh-CN':'数据配置项,可通过children嵌套',
'en-US':'Data configuration item, which can be nested by children.'
'zh-CN':'导航数据配置项,可通过children嵌套',
'en-US':'Navigation data configuration items can be nested through children'
'An anchor click event, which is a callback function triggered after the anchor clicks. //Parameter arg1: click event object //Parameter arg2: {link: click anchor link, title: click node title}'