vue-editify 0.1.19 → 0.1.20
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +3 -3
- package/examples/App.vue +62 -62
- package/examples/main.ts +4 -4
- package/lib/components/button/button.vue.d.ts +11 -11
- package/lib/components/checkbox/checkbox.vue.d.ts +8 -8
- package/lib/components/colors/colors.vue.d.ts +4 -4
- package/lib/components/icon/icon.vue.d.ts +1 -1
- package/lib/components/insertImage/insertImage.vue.d.ts +9 -9
- package/lib/components/insertLink/insertLink.vue.d.ts +2 -2
- package/lib/components/insertTable/insertTable.vue.d.ts +2 -2
- package/lib/components/insertVideo/insertVideo.vue.d.ts +9 -9
- package/lib/components/layer/layer.vue.d.ts +9 -9
- package/lib/components/menu/menu.vue.d.ts +4 -4
- package/lib/components/toolbar/toolbar.vue.d.ts +9 -9
- package/lib/components/tooltip/tooltip.vue.d.ts +1 -1
- package/lib/components/triangle/triangle.vue.d.ts +4 -4
- package/lib/editify/editify.vue.d.ts +68 -68
- package/lib/editify.es.js +35 -24
- package/lib/editify.umd.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/style.css +1 -1
- package/package.json +45 -45
- package/src/components/button/button.less +145 -145
- package/src/components/button/button.vue +197 -197
- package/src/components/button/props.ts +95 -95
- package/src/components/checkbox/checkbox.less +84 -84
- package/src/components/checkbox/checkbox.vue +68 -68
- package/src/components/checkbox/props.ts +49 -49
- package/src/components/colors/colors.less +75 -75
- package/src/components/colors/colors.vue +36 -36
- package/src/components/colors/props.ts +29 -29
- package/src/components/icon/icon.less +14 -14
- package/src/components/icon/icon.vue +12 -12
- package/src/components/icon/props.ts +11 -11
- package/src/components/insertImage/insertImage.less +135 -135
- package/src/components/insertImage/insertImage.vue +146 -146
- package/src/components/insertImage/props.ts +43 -43
- package/src/components/insertLink/insertLink.less +64 -64
- package/src/components/insertLink/insertLink.vue +58 -58
- package/src/components/insertLink/props.ts +16 -16
- package/src/components/insertTable/insertTable.less +54 -54
- package/src/components/insertTable/insertTable.vue +85 -85
- package/src/components/insertTable/props.ts +27 -27
- package/src/components/insertVideo/insertVideo.less +135 -135
- package/src/components/insertVideo/insertVideo.vue +146 -146
- package/src/components/insertVideo/props.ts +43 -43
- package/src/components/layer/layer.less +49 -49
- package/src/components/layer/layer.vue +598 -598
- package/src/components/layer/props.ts +71 -71
- package/src/components/menu/menu.less +63 -63
- package/src/components/menu/menu.vue +1569 -1569
- package/src/components/menu/props.ts +17 -17
- package/src/components/toolbar/props.ts +35 -35
- package/src/components/toolbar/toolbar.less +89 -89
- package/src/components/toolbar/toolbar.vue +1101 -1101
- package/src/components/tooltip/props.ts +21 -21
- package/src/components/tooltip/tooltip.less +23 -23
- package/src/components/tooltip/tooltip.vue +37 -37
- package/src/components/triangle/props.ts +26 -26
- package/src/components/triangle/triangle.less +79 -79
- package/src/components/triangle/triangle.vue +65 -65
- package/src/core/function.ts +1150 -1144
- package/src/core/rule.ts +259 -259
- package/src/core/tool.ts +1137 -1137
- package/src/css/base.less +30 -30
- package/src/css/hljs.less +54 -54
- package/src/editify/editify.less +404 -404
- package/src/editify/editify.vue +810 -803
- package/src/editify/props.ts +156 -156
- package/src/hljs/index.ts +197 -197
- package/src/icon/iconfont.css +219 -219
- package/src/index.ts +32 -32
- package/src/locale/en_US.ts +88 -88
- package/src/locale/index.ts +12 -12
- package/src/locale/zh_CN.ts +88 -88
- package/tsconfig.json +27 -27
- package/tsconfig.node.json +11 -11
- package/vite-env.d.ts +1 -1
- package/vite.config.ts +42 -42
@@ -1,17 +1,17 @@
|
|
1
|
-
import { ExtractPublicPropTypes, PropType } from 'vue'
|
2
|
-
import { MenuConfigType } from '../../core/tool'
|
3
|
-
|
4
|
-
export const MenuProps = {
|
5
|
-
//菜单栏配置
|
6
|
-
config: {
|
7
|
-
type: Object as PropType<MenuConfigType>,
|
8
|
-
default: null
|
9
|
-
},
|
10
|
-
//主题色
|
11
|
-
color: {
|
12
|
-
type: String,
|
13
|
-
default: ''
|
14
|
-
}
|
15
|
-
}
|
16
|
-
|
17
|
-
export type MenuPropsType = ExtractPublicPropTypes<typeof MenuProps>
|
1
|
+
import { ExtractPublicPropTypes, PropType } from 'vue'
|
2
|
+
import { MenuConfigType } from '../../core/tool'
|
3
|
+
|
4
|
+
export const MenuProps = {
|
5
|
+
//菜单栏配置
|
6
|
+
config: {
|
7
|
+
type: Object as PropType<MenuConfigType>,
|
8
|
+
default: null
|
9
|
+
},
|
10
|
+
//主题色
|
11
|
+
color: {
|
12
|
+
type: String,
|
13
|
+
default: ''
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
export type MenuPropsType = ExtractPublicPropTypes<typeof MenuProps>
|
@@ -1,35 +1,35 @@
|
|
1
|
-
import { ExtractPublicPropTypes, PropType } from 'vue'
|
2
|
-
import { ToolbarConfigType } from '../../core/tool'
|
3
|
-
|
4
|
-
export const ToolbarProps = {
|
5
|
-
//是否显示
|
6
|
-
modelValue: {
|
7
|
-
type: Boolean,
|
8
|
-
default: false
|
9
|
-
},
|
10
|
-
//关联元素
|
11
|
-
node: {
|
12
|
-
type: [String, Node] as PropType<string | HTMLElement>,
|
13
|
-
default: null
|
14
|
-
},
|
15
|
-
//类型
|
16
|
-
type: {
|
17
|
-
type: String as PropType<'text' | 'table' | 'link' | 'codeBlock' | 'image' | 'video'>,
|
18
|
-
default: 'text',
|
19
|
-
validator(value: any) {
|
20
|
-
return ['text', 'table', 'link', 'codeBlock', 'image', 'video'].includes(value)
|
21
|
-
}
|
22
|
-
},
|
23
|
-
//工具条配置
|
24
|
-
config: {
|
25
|
-
type: Object as PropType<ToolbarConfigType>,
|
26
|
-
default: null
|
27
|
-
},
|
28
|
-
//主题色
|
29
|
-
color: {
|
30
|
-
type: String,
|
31
|
-
default: ''
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
export type ToolbarPropsType = ExtractPublicPropTypes<typeof ToolbarProps>
|
1
|
+
import { ExtractPublicPropTypes, PropType } from 'vue'
|
2
|
+
import { ToolbarConfigType } from '../../core/tool'
|
3
|
+
|
4
|
+
export const ToolbarProps = {
|
5
|
+
//是否显示
|
6
|
+
modelValue: {
|
7
|
+
type: Boolean,
|
8
|
+
default: false
|
9
|
+
},
|
10
|
+
//关联元素
|
11
|
+
node: {
|
12
|
+
type: [String, Node] as PropType<string | HTMLElement>,
|
13
|
+
default: null
|
14
|
+
},
|
15
|
+
//类型
|
16
|
+
type: {
|
17
|
+
type: String as PropType<'text' | 'table' | 'link' | 'codeBlock' | 'image' | 'video'>,
|
18
|
+
default: 'text',
|
19
|
+
validator(value: any) {
|
20
|
+
return ['text', 'table', 'link', 'codeBlock', 'image', 'video'].includes(value)
|
21
|
+
}
|
22
|
+
},
|
23
|
+
//工具条配置
|
24
|
+
config: {
|
25
|
+
type: Object as PropType<ToolbarConfigType>,
|
26
|
+
default: null
|
27
|
+
},
|
28
|
+
//主题色
|
29
|
+
color: {
|
30
|
+
type: String,
|
31
|
+
default: ''
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
export type ToolbarPropsType = ExtractPublicPropTypes<typeof ToolbarProps>
|
@@ -1,89 +1,89 @@
|
|
1
|
-
.editify-toolbar {
|
2
|
-
display: flex;
|
3
|
-
justify-content: flex-start;
|
4
|
-
align-items: center;
|
5
|
-
padding: 6px 10px;
|
6
|
-
|
7
|
-
.editify-icon-rotate {
|
8
|
-
transform: rotate(180deg);
|
9
|
-
}
|
10
|
-
}
|
11
|
-
|
12
|
-
.editify-toolbar-link {
|
13
|
-
display: block;
|
14
|
-
width: 280px;
|
15
|
-
padding: 4px;
|
16
|
-
|
17
|
-
.editify-toolbar-link-label {
|
18
|
-
display: block;
|
19
|
-
text-align: left;
|
20
|
-
margin-bottom: 10px;
|
21
|
-
font-size: @font-size;
|
22
|
-
color: @font-color;
|
23
|
-
}
|
24
|
-
|
25
|
-
input {
|
26
|
-
appearance: none;
|
27
|
-
-webkit-appearance: none;
|
28
|
-
-moz-appearance: none;
|
29
|
-
display: block;
|
30
|
-
width: 100%;
|
31
|
-
margin: 0 0 10px 0;
|
32
|
-
padding: 4px 2px;
|
33
|
-
border: none;
|
34
|
-
font-size: @font-size;
|
35
|
-
color: @font-color;
|
36
|
-
border-bottom: 1px solid @border-color;
|
37
|
-
line-height: 1.5;
|
38
|
-
transition: all 500ms;
|
39
|
-
background-color: transparent;
|
40
|
-
outline: none;
|
41
|
-
|
42
|
-
&::-webkit-input-placeholder,
|
43
|
-
&::placeholder {
|
44
|
-
color: @font-color-disabled;
|
45
|
-
font-family: inherit;
|
46
|
-
font-size: inherit;
|
47
|
-
vertical-align: middle;
|
48
|
-
}
|
49
|
-
|
50
|
-
&[disabled] {
|
51
|
-
background-color: transparent;
|
52
|
-
opacity: 0.6;
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
.editify-toolbar-link-footer {
|
57
|
-
display: flex;
|
58
|
-
justify-content: space-between;
|
59
|
-
align-items: center;
|
60
|
-
width: 100%;
|
61
|
-
font-size: @font-size;
|
62
|
-
color: @font-color-light;
|
63
|
-
|
64
|
-
.editify-toolbar-link-operations {
|
65
|
-
display: flex;
|
66
|
-
justify-content: flex-start;
|
67
|
-
align-items: center;
|
68
|
-
|
69
|
-
& > span,
|
70
|
-
& > a {
|
71
|
-
cursor: pointer;
|
72
|
-
opacity: 0.8;
|
73
|
-
transition: all 200ms;
|
74
|
-
|
75
|
-
&:hover {
|
76
|
-
opacity: 1;
|
77
|
-
}
|
78
|
-
}
|
79
|
-
|
80
|
-
& > span {
|
81
|
-
margin-right: 15px;
|
82
|
-
}
|
83
|
-
|
84
|
-
& > a {
|
85
|
-
text-decoration: none;
|
86
|
-
}
|
87
|
-
}
|
88
|
-
}
|
89
|
-
}
|
1
|
+
.editify-toolbar {
|
2
|
+
display: flex;
|
3
|
+
justify-content: flex-start;
|
4
|
+
align-items: center;
|
5
|
+
padding: 6px 10px;
|
6
|
+
|
7
|
+
.editify-icon-rotate {
|
8
|
+
transform: rotate(180deg);
|
9
|
+
}
|
10
|
+
}
|
11
|
+
|
12
|
+
.editify-toolbar-link {
|
13
|
+
display: block;
|
14
|
+
width: 280px;
|
15
|
+
padding: 4px;
|
16
|
+
|
17
|
+
.editify-toolbar-link-label {
|
18
|
+
display: block;
|
19
|
+
text-align: left;
|
20
|
+
margin-bottom: 10px;
|
21
|
+
font-size: @font-size;
|
22
|
+
color: @font-color;
|
23
|
+
}
|
24
|
+
|
25
|
+
input {
|
26
|
+
appearance: none;
|
27
|
+
-webkit-appearance: none;
|
28
|
+
-moz-appearance: none;
|
29
|
+
display: block;
|
30
|
+
width: 100%;
|
31
|
+
margin: 0 0 10px 0;
|
32
|
+
padding: 4px 2px;
|
33
|
+
border: none;
|
34
|
+
font-size: @font-size;
|
35
|
+
color: @font-color;
|
36
|
+
border-bottom: 1px solid @border-color;
|
37
|
+
line-height: 1.5;
|
38
|
+
transition: all 500ms;
|
39
|
+
background-color: transparent;
|
40
|
+
outline: none;
|
41
|
+
|
42
|
+
&::-webkit-input-placeholder,
|
43
|
+
&::placeholder {
|
44
|
+
color: @font-color-disabled;
|
45
|
+
font-family: inherit;
|
46
|
+
font-size: inherit;
|
47
|
+
vertical-align: middle;
|
48
|
+
}
|
49
|
+
|
50
|
+
&[disabled] {
|
51
|
+
background-color: transparent;
|
52
|
+
opacity: 0.6;
|
53
|
+
}
|
54
|
+
}
|
55
|
+
|
56
|
+
.editify-toolbar-link-footer {
|
57
|
+
display: flex;
|
58
|
+
justify-content: space-between;
|
59
|
+
align-items: center;
|
60
|
+
width: 100%;
|
61
|
+
font-size: @font-size;
|
62
|
+
color: @font-color-light;
|
63
|
+
|
64
|
+
.editify-toolbar-link-operations {
|
65
|
+
display: flex;
|
66
|
+
justify-content: flex-start;
|
67
|
+
align-items: center;
|
68
|
+
|
69
|
+
& > span,
|
70
|
+
& > a {
|
71
|
+
cursor: pointer;
|
72
|
+
opacity: 0.8;
|
73
|
+
transition: all 200ms;
|
74
|
+
|
75
|
+
&:hover {
|
76
|
+
opacity: 1;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
& > span {
|
81
|
+
margin-right: 15px;
|
82
|
+
}
|
83
|
+
|
84
|
+
& > a {
|
85
|
+
text-decoration: none;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}
|