Vue2-Golden-Layout如何改写为支持长尾词的?

2026-04-01 06:451阅读0评论SEO资讯
  • 内容介绍
  • 文章标签
  • 相关推荐

本文共计317个文字,预计阅读时间需要2分钟。

Vue2-Golden-Layout如何改写为支持长尾词的?

使用配置方式:导入以下CSS文件:

1.`import 'golden-layout/src/css/goldenlayout-base.css'`

2.`import 'golden-layout/src/css/goldenlayout-dark-theme.css'`

3.`import 'golden-layout/lib/jquery'`

官方示例中,主要功能实现需要注册组件的方法。

使用配置:

import 'golden-layout/src/css/goldenlayout-base.css'
import 'golden-layout/src/css/goldenlayout-dark-theme.css'
import 'golden-layout/lib/jquery'

官方示例中,主要功能基本都需要写注册组件的方法才能实施,而且配置布局每一个都不一样,需要配置想要的初始布局,及布局的组件名。并且注册组件的方法需要组件名,及指定组件内容,最后初始化组件,就可开始拖拽布局页面了。

配置布局:
var config = {
content: [{
type: 'row',
content: [{
type:'component',
componentName: 'example',
componentState: { text: 'Component 1' }
},
{
type:'component',
componentName: 'example',
componentState: { text: 'Component 2' }
}]
}]
};
实例化GoldenLayout
var myLayout = new window.GoldenLayout( config, $('#layoutContainer') );
注册组件及添加指定内容
myLayout.registerComponent( 'example', function( container, state ){
container.getElement().html( '<h2>' + state.text + '</h2>');
});
初始化布局
myLayout.init()



Vue2-Golden-Layout如何改写为支持长尾词的?


本文共计317个文字,预计阅读时间需要2分钟。

Vue2-Golden-Layout如何改写为支持长尾词的?

使用配置方式:导入以下CSS文件:

1.`import 'golden-layout/src/css/goldenlayout-base.css'`

2.`import 'golden-layout/src/css/goldenlayout-dark-theme.css'`

3.`import 'golden-layout/lib/jquery'`

官方示例中,主要功能实现需要注册组件的方法。

使用配置:

import 'golden-layout/src/css/goldenlayout-base.css'
import 'golden-layout/src/css/goldenlayout-dark-theme.css'
import 'golden-layout/lib/jquery'

官方示例中,主要功能基本都需要写注册组件的方法才能实施,而且配置布局每一个都不一样,需要配置想要的初始布局,及布局的组件名。并且注册组件的方法需要组件名,及指定组件内容,最后初始化组件,就可开始拖拽布局页面了。

配置布局:
var config = {
content: [{
type: 'row',
content: [{
type:'component',
componentName: 'example',
componentState: { text: 'Component 1' }
},
{
type:'component',
componentName: 'example',
componentState: { text: 'Component 2' }
}]
}]
};
实例化GoldenLayout
var myLayout = new window.GoldenLayout( config, $('#layoutContainer') );
注册组件及添加指定内容
myLayout.registerComponent( 'example', function( container, state ){
container.getElement().html( '<h2>' + state.text + '</h2>');
});
初始化布局
myLayout.init()



Vue2-Golden-Layout如何改写为支持长尾词的?