Skip to content

Commit 5be328f

Browse files
author
yuangongji
authored
add Chinese website documents (jbaysolutions#536)
1 parent 6d3635f commit 5be328f

20 files changed

+1019
-41
lines changed

website/docs/.vuepress/config.js

Lines changed: 102 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,18 @@ const title = 'Vue Grid Layout - ️A grid layout system for Vue.js'
33

44
module.exports = {
55
base: "/vue-grid-layout/",
6-
title,
7-
description,
6+
locales: {
7+
'/': {
8+
lang: 'en-US',
9+
title: 'Vue Grid Layout - ️A grid layout system for Vue.js',
10+
description: 'A draggable and resizable grid layout, as a Vue component.'
11+
},
12+
'/zh/': {
13+
lang: 'zh-CN',
14+
title: 'Vue Grid Layout -️ 适用Vue.js的栅格布局系统',
15+
description: '可拖动和可调整大小栅格布局的Vue组件。'
16+
}
17+
},
818
head: [
919
['link', { rel: 'icon', href: `/favicon.ico` }],
1020
['link', { rel: "apple-touch-icon", sizes: "180x180", href: "https://jbaysolutions.github.io/vue-grid-layout/assets/favicon/apple-touch-icon.png"}],
@@ -13,53 +23,104 @@ module.exports = {
1323
port: 8081,
1424
theme: '@vuepress/vue',
1525
themeConfig: {
16-
sidebar: {
17-
'/guide/': [
18-
{
19-
title: "Guide",
20-
collapsable: false,
21-
children: [
22-
'',
23-
'usage',
24-
'properties',
25-
'events',
26-
'styling',
27-
]
28-
},
29-
{
30-
title: "Examples",
31-
collapsable: false,
32-
children: [
33-
'01-basic',
34-
'02-events',
35-
'03-multiple-grids',
36-
'04-allow-ignore',
37-
'05-mirrored',
38-
'06-responsive',
39-
'07-prevent-collision',
40-
'08-responsive-predefined-layouts',
41-
'09-dynamic-add-remove',
42-
'10-drag-from-outside',
43-
]
44-
}
45-
]
46-
},
47-
nav: [
48-
{text: 'Home', link: '/'},
49-
{text: 'Guide', link: '/guide/'},
50-
{text: 'Changelog', link: '/changelog/'}
51-
],
52-
searchPlaceholder: 'Search...',
5326
smoothScroll: true,
5427
logo: '/assets/img/logo.png',
5528
repo: 'jbaysolutions/vue-grid-layout',
5629
docsDir: 'website/docs',
5730
editLinks: true,
58-
editLinkText: 'Help improve this page!',
59-
lastUpdated: 'Last Updated',
6031
algolia: {
6132
apiKey: '2f143d1edd24605564065dd02bf0a22b',
6233
indexName: 'vue_grid_layout'
34+
},
35+
locales: {
36+
'/': {
37+
selectText: 'Languages',
38+
label: 'English',
39+
ariaLabel: 'Select language',
40+
sidebar: {
41+
'/guide/': [
42+
{
43+
title: "Guide",
44+
collapsable: false,
45+
children: [
46+
'',
47+
'usage',
48+
'properties',
49+
'events',
50+
'styling',
51+
]
52+
},
53+
{
54+
title: "Examples",
55+
collapsable: false,
56+
children: [
57+
'01-basic',
58+
'02-events',
59+
'03-multiple-grids',
60+
'04-allow-ignore',
61+
'05-mirrored',
62+
'06-responsive',
63+
'07-prevent-collision',
64+
'08-responsive-predefined-layouts',
65+
'09-dynamic-add-remove',
66+
'10-drag-from-outside',
67+
]
68+
}
69+
]
70+
},
71+
nav: [
72+
{text: 'Home', link: '/'},
73+
{text: 'Guide', link: '/guide/'},
74+
{text: 'Changelog', link: '/changelog/'}
75+
],
76+
searchPlaceholder: 'Search...',
77+
editLinkText: 'Help improve this page!',
78+
lastUpdated: 'Last Updated'
79+
},
80+
'/zh/': {
81+
selectText: '选择语言',
82+
label: '简体中文',
83+
ariaLabel: '选择语言',
84+
sidebar: {
85+
'/zh/guide/': [
86+
{
87+
title: "首页",
88+
collapsable: false,
89+
children: [
90+
'',
91+
'usage',
92+
'properties',
93+
'events',
94+
'styling',
95+
]
96+
},
97+
{
98+
title: "例子",
99+
collapsable: false,
100+
children: [
101+
'01-basic',
102+
'02-events',
103+
'03-multiple-grids',
104+
'04-allow-ignore',
105+
'05-mirrored',
106+
'06-responsive',
107+
'07-prevent-collision',
108+
'08-responsive-predefined-layouts',
109+
'09-dynamic-add-remove',
110+
'10-drag-from-outside',
111+
]
112+
}
113+
]
114+
},
115+
nav: [
116+
{text: '首页', link: '/zh/'},
117+
{text: '指南', link: '/zh/guide/'},
118+
{text: '更新日志', link: '/zh/changelog/'}
119+
],
120+
searchPlaceholder: '搜索...',
121+
editLinkText: '帮助改善此页面!',
122+
lastUpdated: '最后更新时间'
123+
}
63124
}
64125
},
65126
plugins: [

website/docs/zh/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
layout: HomeLayout
3+
home: true
4+
heroImage: /assets/img/logo.png
5+
heroText: Vue Grid Layout
6+
tagline: 一个类似于<a href="http://dsmorse.github.io/gridster.js/" target="_blank">Gridster</a>的栅格布局系统, 适用于Vue.js。灵感源自于<a href='https://github.com/STRML/react-grid-layout' target='_blank'>React-Grid-Layout</a>
7+
actionText: 开始 →
8+
actionLink: /zh/guide/
9+
features:
10+
- title: ✥ 可拖拽
11+
details:
12+
- title: ⇲ 可调整大小
13+
details:
14+
- title: 静态部件(不可拖拽、调整大小)
15+
details:
16+
- title: 拖拽和调整大小时进行边界检查
17+
details:
18+
- title: 增减部件时避免重建栅格
19+
details:
20+
- title: 可序列化和还原的布局
21+
details:
22+
- title: 自动化 RTL 支持
23+
details:
24+
- title: 响应式
25+
details:
26+
- title: Min/max w/h per item
27+
details:
28+
---
29+
30+
<HomeFooter></HomeFooter>
31+

website/docs/zh/changelog/README.md

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
sidebar: auto
3+
---
4+
# 更新日志
5+
6+
## 2.3.11(2020年10月13日)
7+
8+
* 已修复:使用响应式布局时的回归(#487)
9+
10+
## 2.3.10(2020年10月12日)
11+
12+
* 将interact.js升级到1.10.0,现在作为ES6模块导入以优化大小
13+
* 已修复:在RTL模式下无法调整栅格元素的大小 (感谢 [or-lat](https://github.com/or-lat)
14+
* 添加了GridLayout.useStyleCursor属性以修复可能的浏览器冻结 (感谢 [mosuzi](https://github.com/mosuzi)
15+
* 已修复:当GridItem不是GridLayout的子级时,父布局错误 (感谢 [lzq4047](https://github.com/lzq4047)
16+
* 已修复:在响应模式下再次隐藏/显示元素时,元素的大小发生变化 (感谢 [lustan3216](https://github.com/lustan3216)))
17+
18+
## 2.3.9(2020年9月28日)
19+
20+
* 已修复插件安装(已修复#311) (感谢 [yfwz100](https://github.com/yfwz100)
21+
* interact.js升级版本至1.9.22
22+
23+
## 2.3.8(2020年7月31日)
24+
25+
* 支持动态修改margin属性 (感谢 [yfwz100](https://github.com/yfwz100)
26+
* 添加了丢失的“布局更新”事件 (感谢 [ben-lau](https://github.com/ben-lau)
27+
* 支持初始响应式布局和断点更改事件 (感谢 [ftylitak](https://github.com/ftylitak)
28+
* 修正了布局项被删除且未设置interactObj时可能出现的错误 (感谢 [Tofandel](https://github.com/Tofandel)
29+
* 在响应模式下修复错误的栅格元素排序 (感谢 [pieterbeulque](https://github.com/pieterbeulque)
30+
31+
## 2.3.7(2019年10月31日)
32+
33+
* 在#337中引入容器更改大小(浏览器窗口或其他大小)时发出的重命名“调整大小”事件,在#358已修复
34+
* 已修复layout-ready事件
35+
36+
## 2.3.6(2019年9月11日)
37+
38+
* 恢复栅格元素w和h先前的舍入更改,已修复#355
39+
40+
## 2.3.5(2019年9月7日)
41+
42+
* 已修复:在移动设备上无触摸,并且仅当元素可拖动或可调整大小时 (感谢 [DGoms](https://github.com/DGoms))。
43+
* 防止碰撞功能 (感谢 [SheanDe](https://github.com/SheanDe))。
44+
* 简体中文README (感谢 [harrywangchina](https://github.com/harrywangchina))。
45+
* 如果由于除手动调整大小(例如,浏览器窗口调整大小)以外的更改而调整了栅格项的大小,则此时将发出`resized`事件 (感谢 [pmorch](https://github.com/pmorch))。
46+
* 改进`layout-ready`触发事件 (感谢 [pmorch](https://github.com/pmorch))。
47+
* 添加了min/max height and width的监视程序 (感谢 [grinat](https://github.com/grinat))。
48+
* 改进:确保grid-item的大小大于slot-item (感谢 [ywmail](https://github.com/ywmail))。
49+
50+
## 2.3.4(2019年3月5日)
51+
52+
* 支持静态部件 (感谢 [panjiangyi](https://github.com/panjiangyi))。
53+
* RTL错误修正 (感谢 [irvingwa](https://github.com/irvingwa))。
54+
* 内存泄漏修复 (感谢 [aiankile](https://github.com/aiankile))。
55+
* 已修复了栅格布局安装上的异常 (感谢 [BenoitZugmeyer](https://github.com/BenoitZugmeyer))。
56+
* 已修复了响应模式下重叠和调整大小的错误 (感谢 [shpfive](https://github.com/shpfive))。
57+
* 添加了GridLayout发出的新事件 (layout-created, layout-before-mount,layout-mounted,layout-ready) (感谢 [samuelmolinski](https://github.com/samuelmolinski))。
58+
59+
## 2.3.3(2018年12月26日)
60+
61+
* 恢复了将vue作为外部添加,这导致加载umd时出现问题。
62+
63+
## 2.3.2(2018年12月13日)
64+
65+
* 添加了vue作为外部webpack配置以修复启动问题 (感谢 [Micene9](https://github.com/Micene09)
66+
67+
## 2.3.1(2018年11月6日)
68+
69+
* 之前在Android上进行触摸拖动的修复方法打破了在其他移动浏览器上的拖动 (感谢 [onx2](https://github.com/onx2)
70+
71+
72+
## 2.3.0(2018年10月26日)
73+
74+
* 响应式布局支持 (感谢 [shpfive](https://github.com/shpfive)
75+
* 已修复了在Android上进行触摸拖动的问题 (感谢 [pbabey](https://github.com/pbabey)
76+
77+
## 2.2.0(2018年9月10日)
78+
79+
* 使用Vue CLI更改了项目结构并进行了构建
80+
* GridItem新的autosize方法。现在,需要使用this.$parent.autoSize()从子组件中调用 (感谢 [mech01nc01](https://github.com/mech01nc01)
81+
* 抽象的DOM相关要求提供初始SSR支持 (感谢 [Kukks](https://github.com/Kukks)
82+
* GridItem.i现在可以是数字或字符串 (感谢 [xch1029](https://github.com/xch1029)
83+
* 使用interactjs大小来限制调整大小 (感谢 [LuisCarreras](https://github.com/LuisCarreras)
84+
* 已修复了实例释放时的interactjs实例泄漏 (感谢 [zzuligy](https://github.com/zzuligy)
85+
86+
## 2.1.13(2018年5月2日)
87+
88+
* 调整大小事件现在也发出以像素为单位的尺寸 (感谢 [buremba](https://github.com/buremba)
89+
* 支持动态列修改(#121) (感谢 [ittus](https://github.com/ittus)
90+
91+
## 2.1.12(2018年2月27日)
92+
93+
* 将interact.js更新为1.3.3 (#144
94+
95+
## 2.1.11(2018年1月5日)
96+
97+
* 解决了同一个虚拟机(#134)上有多个栅格的问题 (感谢 [Suen](https://github.com/sunzongzheng)
98+
* 解决了重新分配时布局更新的问题(#130) (感谢 [daizengyu](https://github.com/daizengyu123)
99+
100+
## 2.1.10(2017年12月15日)
101+
102+
* 已修复了与#119相关的可能错误
103+
* 将CSS转换为Translation3D(#96)
104+
* 添加了is-mirrored配置,允许从右向左渲染栅格元素(水平翻转) (感谢 [kweij](https://github.com/kweij)
105+
* 添加了栅格更新事件,可以更轻松地与vuex集成 (感谢 [SergeyKhval](https://github.com/SergeyKhval)
106+
107+
## 2.1.9(2017年8月17日)
108+
109+
* 已修复了对interact.js的本地模块引用
110+
111+
## 2.1.8(2017年8月17日)
112+
113+
* 已修复#61#37
114+
* 已修复#82
115+
* 已修复#87
116+
117+
## 2.1.7(2017年8月17日)
118+
119+
* 已修复#59
120+
* 已修复#83
121+
* 对GridItem中props的dragAllowFrom和dragIgnoreFrom实现了支持 (感谢 [ThePlastic](https://github.com/ThePlastic)
122+
123+
## 2.1.6(2017年4月6日)
124+
125+
* 已修复#43,配置拖曳元件上的栅格项内容忽略 (感谢 [neithere](https://github.com/neithere)
126+
* 已修复了getLayoutItem,有时返回null元素 (感谢 [pbabey](https://github.com/pbabey)
127+
128+
## 2.1.5(2017年3月24日)
129+
130+
* 真正修复#22、#32,多个栅格实例在2.1.4中无法正常工作
131+
* resizeEvent现在还以像素为单位返回元素的宽度和高度(实现#34)
132+
133+
134+
## 2.1.4(2017年3月20日)
135+
136+
* 实现#32,在同一页面上支持多个栅格实例
137+
138+
## 2.1.3(2017年3月9日)
139+
140+
* 已修复#27, props属性突变告警
141+
142+
143+
## 2.1.2(2017年2月16日)
144+
145+
* 实现#12,GridItems上的按钮将触发移动设备上的拖动
146+
* 实现#24,在销毁之前删除监听 (感谢 [pbabey](https://github.com/pbabey)
147+
148+
149+
## 2.1.1(2017年2月9日)
150+
151+
* 实现#13,支持行高动态更新
152+
* 实现#23,支持动态启用/禁用拖动和调整大小
153+
* 实现#21,移动并调整大小的事件
154+
155+
156+
## 2.1.0(2017年2月6日)
157+
158+
* RTL支持 (感谢 [easteregg](https://github.com/easteregg)
159+
* 移动和调整事件大小 (感谢 [ThePlastic](https://github.com/ThePlastic)

website/docs/zh/guide/01-basic.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 01 - 基本
2+
3+
[查看资料](https://github.com/jbaysolutions/vue-grid-layout/blob/master/website/docs/.vuepress/components/Example01Basic.vue)
4+
5+
<ClientOnly>
6+
<Example01Basic></Example01Basic>
7+
</ClientOnly>
8+

website/docs/zh/guide/02-events.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# 02 - 移动事件并调整大小
2+
3+
[查看资料](https://github.com/jbaysolutions/vue-grid-layout/blob/master/website/docs/.vuepress/components/Example02Events.vue)
4+
5+
<ClientOnly>
6+
<Example02Events></Example02Events>
7+
</ClientOnly>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 03 - 多个栅格
2+
3+
[查看资料](https://github.com/jbaysolutions/vue-grid-layout/blob/master/website/docs/.vuepress/components/Example03MultipleGrids.vue)
4+
5+
<ClientOnly>
6+
<Example03MultipleGrids></Example03MultipleGrids>
7+
</ClientOnly>
8+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 04 - 拖动允许/忽略元素
2+
3+
忽略对某些元素的拖动而对其他元素的允许。
4+
5+
单击并拖动每个项目角上的点以重新定位
6+
7+
[查看资料](https://github.com/jbaysolutions/vue-grid-layout/blob/master/website/docs/.vuepress/components/Example04AllowIgnore.vue)
8+
9+
<ClientOnly>
10+
<Example04AllowIgnore></Example04AllowIgnore>
11+
</ClientOnly>
12+

0 commit comments

Comments
 (0)