form-driver 0.3.13 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/m3.css +57 -0
- package/dist/m3.js +1 -1
- package/es/m3.css +57 -0
- package/es/m3.js +2190 -1386
- package/lib/m3.css +57 -0
- package/lib/m3.js +2188 -1382
- package/package.json +13 -9
- package/src/framework/Init.tsx +152 -150
- package/src/framework/M3.tsx +83 -59
- package/src/framework/MUtil.tsx +275 -140
- package/src/framework/MViewer.tsx +198 -106
- package/src/framework/Schema.ts +100 -87
- package/src/types/MSetType.ts +128 -71
- package/src/ui/editor/basic/ACheckBox.tsx +98 -50
- package/src/ui/editor/complex/ACheckDrag.tsx +356 -0
- package/src/ui/editor/complex/AForm.tsx +3 -1
- package/src/ui/editor/complex/JsonEditor.tsx +32 -21
- package/src/ui/widget/DIYCheckbox.less +36 -0
- package/src/ui/widget/DIYCheckbox.tsx +154 -0
- package/src/ui/widget/SortDrag.less +32 -0
- package/src/ui/widget/SortDrag.tsx +145 -0
- package/types/framework/Assembly.d.ts +2 -2
- package/types/framework/M3.d.ts +2 -2
- package/types/framework/MUtil.d.ts +5 -5
- package/types/framework/MViewer.d.ts +1 -1
- package/types/framework/Schema.d.ts +13 -11
- package/types/framework/Validator.d.ts +1 -1
- package/types/types/MDecorationType.d.ts +3 -3
- package/types/types/MSetType.d.ts +1 -1
- package/types/ui/editor/basic/ACheckBox.d.ts +2 -2
- package/types/ui/editor/basic/ARangePicker.d.ts +6 -2
- package/types/ui/editor/complex/ACheckDrag.d.ts +28 -0
- package/types/ui/editor/complex/JsonEditor.d.ts +1 -1
- package/types/ui/widget/DIYCheckbox.d.ts +19 -0
- package/types/ui/widget/SegmentEditSwitch.d.ts +1 -1
- package/types/ui/widget/SortDrag.d.ts +14 -0
package/README.md
CHANGED
|
@@ -11,8 +11,8 @@ An efficient framework for creating forms.
|
|
|
11
11
|
# 安装依赖
|
|
12
12
|
npm run i
|
|
13
13
|
|
|
14
|
-
#
|
|
15
|
-
npm run
|
|
14
|
+
# 本地调试 http://0.0.0.0:8080
|
|
15
|
+
npm run start
|
|
16
16
|
|
|
17
17
|
# 本地构建
|
|
18
18
|
npm run b
|
|
@@ -25,7 +25,7 @@ npm run pub
|
|
|
25
25
|
|
|
26
26
|
``` md
|
|
27
27
|
├── demo/ # 演示页面目录
|
|
28
|
-
│ ├── src/ # demo
|
|
28
|
+
│ ├── src/ # demo 页面代码(引用 M3 M3 源代码)
|
|
29
29
|
│ └── dist/ # demo 构建产物
|
|
30
30
|
├── docs/ # M3 的文档
|
|
31
31
|
├── src/ # M3 源代码
|
package/dist/m3.css
CHANGED
|
@@ -318,6 +318,63 @@ table.M3_table tr:last-child td {
|
|
|
318
318
|
margin-bottom: 5px;
|
|
319
319
|
}
|
|
320
320
|
|
|
321
|
+
.diy-checkbox-wrapper:hover .diy-checkbox-icon {
|
|
322
|
+
transform: scale(1.1);
|
|
323
|
+
}
|
|
324
|
+
.diy-checkbox-wrapper .diy-checkbox-icon {
|
|
325
|
+
display: inline-flex;
|
|
326
|
+
align-items: center;
|
|
327
|
+
justify-content: center;
|
|
328
|
+
width: 16px;
|
|
329
|
+
height: 16px;
|
|
330
|
+
border: 1px solid #d9d9d9;
|
|
331
|
+
border-radius: 2px;
|
|
332
|
+
transition: all 0.3s;
|
|
333
|
+
}
|
|
334
|
+
.diy-checkbox-wrapper .diy-checkbox-icon.checked {
|
|
335
|
+
background-color: #1890ff;
|
|
336
|
+
border-color: #1890ff;
|
|
337
|
+
color: white;
|
|
338
|
+
}
|
|
339
|
+
.diy-checkbox-wrapper .diy-checkbox-icon.indeterminate {
|
|
340
|
+
background-color: #1890ff;
|
|
341
|
+
border-color: #1890ff;
|
|
342
|
+
color: white;
|
|
343
|
+
}
|
|
344
|
+
.diy-checkbox-wrapper .diy-checkbox-icon:hover {
|
|
345
|
+
border-color: #40a9ff;
|
|
346
|
+
}
|
|
347
|
+
.diy-checkbox-wrapper .diy-checkbox-label {
|
|
348
|
+
-webkit-user-select: none;
|
|
349
|
+
-moz-user-select: none;
|
|
350
|
+
-ms-user-select: none;
|
|
351
|
+
user-select: none;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.sortDrag .dragItem {
|
|
355
|
+
display: flex;
|
|
356
|
+
justify-content: space-between;
|
|
357
|
+
padding: 4px 8px;
|
|
358
|
+
background: #fff;
|
|
359
|
+
font-size: 16px;
|
|
360
|
+
transition: background 0.2s, box-shadow 0.2s;
|
|
361
|
+
cursor: -webkit-grab;
|
|
362
|
+
cursor: grab;
|
|
363
|
+
}
|
|
364
|
+
.sortDrag .dragItem.dragging {
|
|
365
|
+
background: #bae7ff;
|
|
366
|
+
box-shadow: 0 2px 8px rgba(24,144,255,0.2);
|
|
367
|
+
}
|
|
368
|
+
.sortDrag .dragItem.dropping {
|
|
369
|
+
background: #f2f2f2;
|
|
370
|
+
}
|
|
371
|
+
.sortDrag .dragBody {
|
|
372
|
+
flex: 1;
|
|
373
|
+
}
|
|
374
|
+
.sortDrag .dragHandle {
|
|
375
|
+
width: 40px;
|
|
376
|
+
}
|
|
377
|
+
|
|
321
378
|
.form-driver-plugin-richtext-viewer-wrap .richtext-viewer-more {
|
|
322
379
|
text-align: center;
|
|
323
380
|
box-shadow: 0px -5px 5px rgba(232,232,232,0.38039);
|