Skip to content

Commit 32a6e5c

Browse files
author
kirillmurashov
committed
Readme fixed and updated
1 parent 4f78b56 commit 32a6e5c

File tree

3 files changed

+43
-17
lines changed

3 files changed

+43
-17
lines changed

README.md

Lines changed: 42 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,10 @@ Type: `Boolean`<br>
120120
Required: `false`<br>
121121
Default: `false`
122122

123-
Disable behavior of the component by clicking on it and clicking outside the component's area (isActive: true / false).
123+
Disable behavior of the component by clicking on it and clicking outside the component's area (isActive: true / false).<br>
124124
If the prop is enabled, the component is oriented only to the specified.
125125

126-
通过单击组件并单击组件区域外部来禁用组件的行为(isActive:true / false)。
126+
通过单击组件并单击组件区域外部来禁用组件的行为(isActive:true / false)。<br>
127127
如果启用了prop,则组件仅面向指定的。
128128

129129
```html
@@ -135,9 +135,10 @@ Type: `Number`<br>
135135
Required: `false`<br>
136136
Default: `0`
137137

138-
Define the initial width of the parent element. If not specified it calculated automatically.
138+
Define the initial width of the parent element. If not specified it calculated automatically.<br>
139139
With this parameter, you can set the bounding area for the component, and also it is used when resizing in real time.
140-
定义父元素的初始宽度。 如果未指定,则自动计算。
140+
141+
定义父元素的初始宽度。 如果未指定,则自动计算。<br>
141142
使用此参数,您可以设置组件的边界区域,并在实时调整大小时使用它。
142143
```html
143144
<vue-drag-resize :parentW="2000">
@@ -148,8 +149,9 @@ Type: `Number`<br>
148149
Required: `false`<br>
149150
Default: `0`
150151

151-
Define the initial height of the parent element. If not specified it calculated automatically.
152+
Define the initial height of the parent element. If not specified it calculated automatically.<br>
152153
With this parameter, you can set the bounding area for the component, and also it is used when resizing in real time.
154+
153155
定义父元素的初始高度。 如果未指定,则自动计算。
154156
使用此参数,您可以设置组件的边界区域,并在实时调整大小时使用它。
155157

@@ -162,9 +164,10 @@ Type: `Number`<br>
162164
Required: `false`<br>
163165
Default: `1`
164166

165-
Define the initial horizontal scale or the parent element. Same value in parent's transform: scale() css definition.
167+
Define the initial horizontal scale or the parent element. Same value in parent's transform: scale() css definition.<br>
166168
The drag/resize and the sticks' sizes will computed with this value.
167-
定义初始水平比例或父元素。父级的transform:scale()css定义中的值相同。
169+
170+
定义初始水平比例或父元素。父级的transform:scale()css定义中的值相同。<br>
168171
拖动/调整大小和杆的大小将使用该值计算。
169172
```html
170173
<vue-drag-resize :parentScaleX="0.5">
@@ -175,10 +178,10 @@ Type: `Number`<br>
175178
Required: `false`<br>
176179
Default: `1`
177180

178-
Define the initial vertical scale or the parent element. Same value in parent's transform: scale() css definition.
181+
Define the initial vertical scale or the parent element. Same value in parent's transform: scale() css definition.<br>
179182
The drag/resize and the sticks' sizes will computed with this value.
180-
定义初始垂直比例或父元素。父级的transform:scale()css定义中的值相同。
181183

184+
定义初始垂直比例或父元素。父级的transform:scale()css定义中的值相同。<br>
182185
拖动/调整大小和杆的大小将使用该值计算。
183186

184187
```html
@@ -191,6 +194,7 @@ Required: `false`<br>
191194
Default: `true`
192195

193196
Determines whether the component should draggable.
197+
194198
确定组件是否应可拖动。
195199

196200

@@ -204,6 +208,7 @@ Required: `false`<br>
204208
Default: `true`
205209

206210
Determines whether the component should resize.
211+
207212
确定组件是否应调整大小。
208213

209214

@@ -216,6 +221,7 @@ Required: `false`<br>
216221
Default: `false`
217222

218223
Limits the scope of the component's change to its parent size.
224+
219225
将组件更改的范围限制为其父大小。
220226

221227

@@ -262,6 +268,7 @@ Required: `false`<br>
262268
Default: `false`
263269

264270
Determines whether the component should retain its proportions.
271+
265272
确定组件是否应保持其比例。
266273

267274

@@ -270,11 +277,14 @@ Determines whether the component should retain its proportions.
270277
```
271278

272279
#### w
273-
Type: `Number`<br>
280+
Type: `Number|String`<br>
274281
Required: `false`<br>
275282
Default: `200`
276283

277-
Define the initial width of the component.
284+
Define the initial width of the component.<br>
285+
The value can either be a number >= 0 or the string 'auto'. <br>
286+
If set to 'auto', the initial width value will be equal to the width of the content within the component.
287+
278288
定义组件的初始宽度。
279289

280290

@@ -283,11 +293,14 @@ Define the initial width of the component.
283293
```
284294

285295
#### h
286-
Type: `Number`<br>
296+
Type: `Number|String`<br>
287297
Required: `false`<br>
288298
Default: `200`
289299

290-
Define the initial height of the component.
300+
Define the initial height of the component.<br>
301+
The value can either be a number >= 0 or the string 'auto'. <br>
302+
If set to 'auto', the initial height value will be equal to the height of the content within the component.
303+
291304
定义组件的初始高度。
292305

293306

@@ -302,6 +315,7 @@ Required: `false`<br>
302315
Default: `50`
303316

304317
Define the minimal width of the component.
318+
305319
定义组件的初始宽度。
306320

307321

@@ -316,6 +330,7 @@ Required: `false`<br>
316330
Default: `50`
317331

318332
Define the minimal height of the component.
333+
319334
定义组件的最小高度。
320335

321336

@@ -329,6 +344,7 @@ Required: `false`<br>
329344
Default: `0`
330345

331346
Define the initial x position of the component.
347+
332348
定义组件的初始X位置。
333349

334350

@@ -342,6 +358,7 @@ Required: `false`<br>
342358
Default: `0`
343359

344360
Define the initial y position of the component.
361+
345362
定义组件的初始Y位置。
346363

347364

@@ -355,6 +372,7 @@ Required: `false`<br>
355372
Default: `auto`
356373

357374
Define the zIndex of the component.
375+
358376
定义组件的zindex(层级)。
359377

360378
```html
@@ -378,6 +396,7 @@ Required: `false`<br>
378396
Default: `['tl', 'tm', 'tr', 'mr', 'br', 'bm', 'bl', 'ml']`
379397

380398
Define the array of handles to restrict the element resizing:
399+
381400
定义句柄数组以限制元素大小调整:
382401

383402
* `tl` - Top left
@@ -399,6 +418,7 @@ Required: `false`<br>
399418
Default: `both`
400419

401420
Define the axis on which the element is draggable. Available values are `x`, `y`, `both` or `none`.
421+
402422
定义元素可拖动的轴。 可用值为`x``y``both``none`
403423

404424
```html
@@ -410,6 +430,7 @@ Type: `String`<br>
410430
Required: `false`
411431

412432
Defines the selector that should be used to drag the component.
433+
413434
定义应该用于拖动组件的选择器。
414435

415436
```html
@@ -421,6 +442,7 @@ Type: `String`<br>
421442
Required: `false`
422443

423444
Defines a selector that should be used to prevent drag initialization.
445+
424446
定义应该用于防止拖动初始化的选择器。
425447

426448
```html
@@ -450,6 +472,7 @@ Required: `false`<br>
450472
Parameters: `Original event handler`
451473

452474
Called whenever the component gets clicked.
475+
453476
单击组件时调用。
454477

455478
```html
@@ -462,6 +485,7 @@ Required: `false`<br>
462485
Parameters: `-`
463486

464487
Called whenever the component gets clicked, in order to show handles.
488+
465489
单击组件时调用,以显示句柄。
466490

467491
```html
@@ -474,6 +498,7 @@ Required: `false`<br>
474498
Parameters: `-`
475499

476500
Called whenever the user clicks anywhere outside the component, in order to deactivate it.
501+
477502
每当用户单击组件外部的任何位置时调用,以便将其停用。
478503

479504

@@ -496,6 +521,7 @@ Parameters: `object`
496521
```
497522

498523
Called whenever the component gets resized.
524+
499525
每当组件调整大小时调用。
500526

501527

@@ -517,6 +543,7 @@ Parameters: `object`
517543
```
518544

519545
Called whenever the component stops getting resized.
546+
520547
每当组件停止调整大小时调用。
521548

522549

@@ -538,6 +565,7 @@ Parameters: `object`
538565
```
539566

540567
Called whenever the component gets dragged.
568+
541569
每当拖动组件时调用。
542570

543571

@@ -560,6 +588,7 @@ Parameters: `object`
560588

561589

562590
Called whenever the component stops getting dragged.
591+
563592
每当组件停止拖动时调用。
564593

565594

src/component/vue-drag-resize.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.vdr {
22
position: absolute;
33
box-sizing: border-box;
4-
overflow: visible;
4+
55
}
66
.vdr.active:before{
77
content: '';

src/component/vue-drag-resize.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ export default {
5050
isResizable: {
5151
type: Boolean, default: true,
5252
},
53-
focusable: {
54-
type: Boolean, default: false,
55-
},
5653
aspectRatio: {
5754
type: Boolean, default: false,
5855
},

0 commit comments

Comments
 (0)