cosey 0.1.4 → 0.2.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 +61 -0
- package/components/close/style/index.js +2 -2
- package/components/col/col.vue.js +1 -1
- package/components/col/style/index.js +3 -3
- package/components/config-provider/config-provider.d.ts +2 -0
- package/components/config-provider/config-provider.vue.js +13 -3
- package/components/context-menu/context-menu.vue.js +4 -4
- package/components/context-menu/context-sub-menu.vue.js +2 -2
- package/components/context-menu/style/index.js +2 -2
- package/components/editor/components/color-picker/color-picker.vue.js +15 -11
- package/components/editor/components/color-picker/useHistoryColor.js +3 -3
- package/components/editor/components/resize/resize.js +9 -9
- package/components/editor/components/resize/resize.style.js +20 -20
- package/components/editor/components/resize/resize.vue.js +2 -2
- package/components/editor/components/table-toolbar/table-toolbar.style.js +2 -2
- package/components/editor/components/table-toolbar/table-toolbar.vue.js +2 -2
- package/components/editor/components/toolbar/formats/font.vue.js +5 -1
- package/components/editor/components/toolbar/formats/header.vue.js +6 -2
- package/components/editor/components/toolbar/formats/link.vue.js +17 -13
- package/components/editor/components/toolbar/formats/size.vue.js +5 -1
- package/components/editor/components/toolbar/formats/source.vue.d.ts +2 -0
- package/components/editor/components/toolbar/formats/source.vue.js +78 -0
- package/components/editor/components/toolbar/formats/table.style.js +2 -2
- package/components/editor/components/toolbar/formats/video.vue.js +9 -5
- package/components/editor/components/toolbar/toolbar.vue.js +5 -0
- package/components/editor/formats/font.js +2 -2
- package/components/editor/formats/indent.js +1 -1
- package/components/editor/formats/kbd.d.ts +7 -0
- package/components/editor/formats/kbd.js +13 -0
- package/components/editor/modules/image-uploader/formats/image-loading.style.js +2 -2
- package/components/editor/quill.js +8 -6
- package/components/editor/style/index.js +25 -16
- package/components/field/components/autocomplete/autocomplete.vue.js +5 -1
- package/components/field/components/cascader/cascader.vue.js +5 -1
- package/components/field/components/checkbox-group/checkbox-group.vue.js +1 -1
- package/components/field/components/checkbox-group/panel.vue.js +10 -5
- package/components/field/components/date/date.vue.js +5 -1
- package/components/field/components/date-range/date-range.vue.js +6 -2
- package/components/field/components/date-time/date-time.vue.js +5 -1
- package/components/field/components/date-time-range/date-time-range.vue.js +6 -2
- package/components/field/components/dates/dates.vue.js +5 -1
- package/components/field/components/input/input.vue.js +5 -1
- package/components/field/components/input-tag/input-tag.vue.js +5 -1
- package/components/field/components/mention/mention.vue.js +5 -1
- package/components/field/components/month/month.vue.js +5 -1
- package/components/field/components/month-range/month-range.vue.js +6 -2
- package/components/field/components/months/months.vue.js +5 -1
- package/components/field/components/password/password.vue.js +5 -1
- package/components/field/components/select/select.d.ts +2 -2
- package/components/field/components/select/select.js +3 -3
- package/components/field/components/select/select.vue.js +5 -1
- package/components/field/components/select-v2/select-v2.d.ts +6 -3
- package/components/field/components/select-v2/select-v2.js +9 -0
- package/components/field/components/select-v2/select-v2.vue.js +21 -3
- package/components/field/components/textarea/textarea.vue.js +5 -1
- package/components/field/components/time/time.vue.js +5 -1
- package/components/field/components/time-range/time-range.vue.js +6 -2
- package/components/field/components/time-select/time-select.vue.js +5 -1
- package/components/field/components/tree-select/tree-select.vue.js +5 -1
- package/components/field/components/week/week.vue.js +6 -2
- package/components/field/components/year/year.vue.js +5 -1
- package/components/field/components/year-range/year-range.vue.js +6 -2
- package/components/field/components/years/years.vue.js +5 -1
- package/components/form/form-item.d.ts +1 -1
- package/components/form/form.d.ts +2 -0
- package/components/form/form.js +2 -2
- package/components/form/form.vue.d.ts +5 -0
- package/components/form/form.vue.js +6 -2
- package/components/form/index.d.ts +10 -1
- package/components/form/useBubbleTemplate.js +13 -5
- package/components/form-dialog/form-dialog.js +2 -2
- package/components/form-dialog/index.d.ts +4 -1552
- package/components/form-list/form-list.js +1 -1
- package/components/form-list/form-list.vue.js +5 -1
- package/components/form-list/index.d.ts +1 -1
- package/components/form-query/form-query.d.ts +2 -0
- package/components/form-query/form-query.vue.d.ts +5 -0
- package/components/form-query/form-query.vue.js +13 -7
- package/components/form-query/index.d.ts +9 -0
- package/components/highlight/style/index.js +2 -2
- package/components/horizontal-tree/horizontal-tree.vue.js +11 -6
- package/components/image-card/image-card.d.ts +1 -8
- package/components/image-card/image-card.vue.d.ts +4 -18
- package/components/image-card/index.d.ts +8 -29
- package/components/long-text/style/index.js +2 -2
- package/components/mask/style/index.js +2 -2
- package/components/row/row.vue.js +1 -1
- package/components/scroll-view/scroll-view.vue.js +1 -1
- package/components/scroll-view/style/index.js +9 -9
- package/components/table/index.d.ts +73 -78
- package/components/table/table-column/renderer.d.ts +2 -1
- package/components/table/table-column/renderer.js +2 -2
- package/components/table/table-column/table-column.d.ts +15 -15
- package/components/table/table-column/table-column.vue.d.ts +9 -5
- package/components/table/table-column/table-column.vue.js +5 -1
- package/components/table/table-column-editor/table-column-editor.vue.js +22 -14
- package/components/table/table-export/table-export.vue.js +31 -26
- package/components/table/table-query/table-query.d.ts +2 -0
- package/components/table/table-query/table-query.vue.d.ts +5 -0
- package/components/table/table.d.ts +22 -25
- package/components/table/table.vue.d.ts +45 -51
- package/components/table/table.vue.js +13 -9
- package/components/table/useTable.d.ts +2 -1
- package/components/table/useTable.js +2 -2
- package/components/table-action/index.d.ts +48 -6
- package/components/table-action/item.d.ts +16 -2
- package/components/table-action/item.vue.d.ts +34 -6
- package/components/table-action/item.vue.js +15 -9
- package/components/table-action/table-action.vue.d.ts +16 -2
- package/components/toggle/toggle.vue.js +5 -1
- package/components/upload/style/index.js +2 -2
- package/components/upload/upload-item.vue.d.ts +2 -2
- package/components/upload/upload-item.vue.js +16 -9
- package/components/upload/upload.vue.js +7 -1
- package/config/index.d.ts +1 -2
- package/config/index.js +2 -2
- package/config/nprogress.style.js +5 -5
- package/config/root-config-provider.vue.js +5 -5
- package/constant.d.ts +2 -2
- package/constant.js +2 -2
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +2 -1
- package/hooks/useColorScheme.js +4 -4
- package/hooks/useDir.d.ts +2 -0
- package/hooks/useDir.js +20 -0
- package/hooks/useEcharts.d.ts +3 -2
- package/hooks/useEcharts.js +15 -3
- package/hooks/useLocale.d.ts +23 -371
- package/hooks/useLocale.js +26 -35
- package/hooks/useUpsert.d.ts +5 -3
- package/hooks/useUpsert.js +33 -25
- package/index.d.ts +1 -1
- package/index.js +4 -4
- package/layout/layout-auth/style/index.js +6 -6
- package/layout/layout-breadcrumb/layout-breadcrumb.vue.js +6 -2
- package/layout/layout-change-password/layout-change-password.vue.js +28 -22
- package/layout/layout-content/layout-content.vue.js +1 -1
- package/layout/layout-content/style/index.js +1 -1
- package/layout/layout-forbidden/layout-forbidden.vue.js +11 -6
- package/layout/layout-header/layout-header.vue.js +4 -4
- package/layout/layout-header/style/index.js +3 -3
- package/layout/layout-iframe/style/index.js +2 -2
- package/layout/layout-internal-server-error/layout-internal-server-error.vue.js +11 -6
- package/layout/layout-login/layout-login.vue.js +19 -14
- package/layout/layout-main/layout-main.vue.js +1 -1
- package/layout/layout-menu/layout-menu.vue.js +5 -1
- package/layout/layout-menu/style/index.js +1 -1
- package/layout/layout-not-found/layout-not-found.vue.js +11 -6
- package/layout/layout-search/layout-search.vue.js +22 -14
- package/layout/layout-sidebar/layout-sidebar.vue.js +8 -5
- package/layout/layout-sidebar/style/index.js +2 -2
- package/layout/layout-snug-aside/style/index.js +1 -1
- package/layout/layout-tabbar/layout-tabbar.vue.js +21 -13
- package/layout/layout-tabbar/style/index.js +1 -1
- package/layout/layout-top-snug-menu/layout-top-snug-menu.vue.js +24 -17
- package/layout/layout-user-menu/layout-user-menu.vue.js +10 -6
- package/locale/index.d.ts +10 -0
- package/locale/index.js +2 -0
- package/locale/lang/ar.d.ts +280 -0
- package/locale/lang/ar.js +129 -0
- package/locale/lang/en.d.ts +302 -0
- package/locale/lang/en.js +129 -0
- package/locale/lang/zh-cn.d.ts +301 -0
- package/locale/lang/zh-cn.js +129 -0
- package/package.json +10 -8
- package/request/useRequest.js +31 -23
- package/store/index.d.ts +1 -1
- package/store/index.js +6 -3
- package/store/layout.js +208 -190
- package/store/plugin.d.ts +9 -0
- package/store/plugin.js +22 -0
- package/store/user.d.ts +1 -1
- package/utils/css.d.ts +4 -0
- package/utils/css.js +5 -2
- package/utils/excel/bookFormats.js +5 -5
- package/utils/excel/xlsx.js +2 -2
- package/utils/index.js +1 -1
- package/utils/message-box.js +3 -1
- package/utils/tree.js +2 -2
- package/components/form-dialog/form-dialog.vue.d.ts +0 -675
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent, inject, ref, createElementBlock, openBlock, Fragment, createVNode, withCtx, unref, createTextVNode, toDisplayString } from 'vue';
|
|
2
|
+
import { toolbarContextKey } from '../toolbarContext.js';
|
|
3
|
+
import stdin_default$1 from '../../button.vue.js';
|
|
4
|
+
import { ElDialog, ElInput, ElButton } from 'element-plus';
|
|
5
|
+
import stdin_default$2 from '../../../../icon/index.js';
|
|
6
|
+
import { useLocale } from '../../../../../hooks/useLocale.js';
|
|
7
|
+
|
|
8
|
+
var stdin_default = /* @__PURE__ */defineComponent({
|
|
9
|
+
__name: "source",
|
|
10
|
+
setup(__props) {
|
|
11
|
+
const {
|
|
12
|
+
t
|
|
13
|
+
} = useLocale();
|
|
14
|
+
const {
|
|
15
|
+
quill
|
|
16
|
+
} = inject(toolbarContextKey);
|
|
17
|
+
const visible = ref(false);
|
|
18
|
+
const value = ref("");
|
|
19
|
+
const onShow = () => {
|
|
20
|
+
value.value = quill.value?.getSemanticHTML() || "";
|
|
21
|
+
visible.value = true;
|
|
22
|
+
};
|
|
23
|
+
const onCancel = () => {
|
|
24
|
+
visible.value = false;
|
|
25
|
+
};
|
|
26
|
+
const onConfirm = () => {
|
|
27
|
+
quill.value?.clipboard.dangerouslyPasteHTML(value.value);
|
|
28
|
+
visible.value = false;
|
|
29
|
+
};
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return openBlock(), createElementBlock(Fragment, null, [createVNode(stdin_default$1, {
|
|
32
|
+
onClick: onShow
|
|
33
|
+
}, {
|
|
34
|
+
default: withCtx(() => [createVNode(unref(stdin_default$2), {
|
|
35
|
+
name: "co:repo-source-code"
|
|
36
|
+
})]),
|
|
37
|
+
_: 1
|
|
38
|
+
/* STABLE */
|
|
39
|
+
}), createVNode(unref(ElDialog), {
|
|
40
|
+
title: unref(t)("co.editor.sourceCode"),
|
|
41
|
+
modelValue: visible.value,
|
|
42
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => visible.value = $event),
|
|
43
|
+
width: "992px",
|
|
44
|
+
style: {
|
|
45
|
+
"max-width": "calc(100vw - 32px)"
|
|
46
|
+
}
|
|
47
|
+
}, {
|
|
48
|
+
footer: withCtx(() => [createVNode(unref(ElButton), {
|
|
49
|
+
onClick: onCancel
|
|
50
|
+
}, {
|
|
51
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.common.cancel")), 1
|
|
52
|
+
/* TEXT */)]),
|
|
53
|
+
_: 1
|
|
54
|
+
/* STABLE */
|
|
55
|
+
}), createVNode(unref(ElButton), {
|
|
56
|
+
type: "primary",
|
|
57
|
+
onClick: onConfirm
|
|
58
|
+
}, {
|
|
59
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.common.confirm")), 1
|
|
60
|
+
/* TEXT */)]),
|
|
61
|
+
_: 1
|
|
62
|
+
/* STABLE */
|
|
63
|
+
})]),
|
|
64
|
+
default: withCtx(() => [createVNode(unref(ElInput), {
|
|
65
|
+
modelValue: value.value,
|
|
66
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => value.value = $event),
|
|
67
|
+
type: "textarea",
|
|
68
|
+
rows: 26
|
|
69
|
+
}, null, 8, ["modelValue"])]),
|
|
70
|
+
_: 1
|
|
71
|
+
/* STABLE */
|
|
72
|
+
}, 8, ["title", "modelValue"])], 64
|
|
73
|
+
/* STABLE_FRAGMENT */);
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export { stdin_default as default };
|
|
@@ -28,9 +28,9 @@ var stdin_default = getSimpleStyleHook("EditorTable", (token) => {
|
|
|
28
28
|
[`${componentCls}-cell`]: {
|
|
29
29
|
width: token.size,
|
|
30
30
|
height: token.size,
|
|
31
|
-
|
|
31
|
+
borderBlockEnd: `${token.lineWidth} ${token.lineType} ${token.colorBorderSecondary}`,
|
|
32
32
|
"&:not(:last-child)": {
|
|
33
|
-
|
|
33
|
+
borderInlineEnd: `${token.lineWidth} ${token.lineType} ${token.colorBorderSecondary}`
|
|
34
34
|
},
|
|
35
35
|
"&.is-selected": {
|
|
36
36
|
backgroundColor: token.colorPrimary
|
|
@@ -5,17 +5,21 @@ import stdin_default$2 from '../../../../icon/index.js';
|
|
|
5
5
|
import { FormDialog as _FormDialog } from '../../../../form-dialog/index.js';
|
|
6
6
|
import { Form as _Form, FormItem as _FormItem } from '../../../../form/index.js';
|
|
7
7
|
import Quill from 'quill';
|
|
8
|
+
import { useLocale } from '../../../../../hooks/useLocale.js';
|
|
8
9
|
|
|
9
10
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
10
11
|
__name: "video",
|
|
11
12
|
setup(__props) {
|
|
13
|
+
const {
|
|
14
|
+
t
|
|
15
|
+
} = useLocale();
|
|
12
16
|
const {
|
|
13
17
|
quill
|
|
14
18
|
} = inject(toolbarContextKey);
|
|
15
19
|
const visible = ref(false);
|
|
16
20
|
let currentTarget = null;
|
|
17
21
|
const actionType = ref("insert");
|
|
18
|
-
const title = computed(() => `${actionType.value === "update" ? "
|
|
22
|
+
const title = computed(() => `${actionType.value === "update" ? t("co.editor.edit") : t("co.editor.insert")}${t("co.editor.video")}`);
|
|
19
23
|
const formModel = reactive({
|
|
20
24
|
url: "",
|
|
21
25
|
width: "300",
|
|
@@ -90,21 +94,21 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
90
94
|
modelValue: formModel.width,
|
|
91
95
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => formModel.width = $event),
|
|
92
96
|
prop: "width",
|
|
93
|
-
label: "
|
|
97
|
+
label: unref(t)("co.editor.width"),
|
|
94
98
|
"field-type": "input",
|
|
95
99
|
"col-props": {
|
|
96
100
|
span: 12
|
|
97
101
|
}
|
|
98
|
-
}, null, 8, ["modelValue"]), createVNode(unref(_FormItem), {
|
|
102
|
+
}, null, 8, ["modelValue", "label"]), createVNode(unref(_FormItem), {
|
|
99
103
|
modelValue: formModel.height,
|
|
100
104
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = $event => formModel.height = $event),
|
|
101
105
|
prop: "height",
|
|
102
|
-
label: "
|
|
106
|
+
label: unref(t)("co.editor.height"),
|
|
103
107
|
"field-type": "input",
|
|
104
108
|
"col-props": {
|
|
105
109
|
span: 12
|
|
106
110
|
}
|
|
107
|
-
}, null, 8, ["modelValue"])]),
|
|
111
|
+
}, null, 8, ["modelValue", "label"])]),
|
|
108
112
|
_: 1
|
|
109
113
|
/* STABLE */
|
|
110
114
|
}, 8, ["model"])]),
|
|
@@ -26,6 +26,7 @@ import stdin_default$l from './formats/video.vue.js';
|
|
|
26
26
|
import stdin_default$m from './formats/table.vue.js';
|
|
27
27
|
import stdin_default$n from './formats/formula.vue.js';
|
|
28
28
|
import stdin_default$o from './formats/clean.vue.js';
|
|
29
|
+
import stdin_default$p from './formats/source.vue.js';
|
|
29
30
|
import { useComponentConfig } from '../../../config-provider/config-provider.js';
|
|
30
31
|
|
|
31
32
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
@@ -116,6 +117,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
116
117
|
default: withCtx(() => [createVNode(stdin_default$o)]),
|
|
117
118
|
_: 1
|
|
118
119
|
/* STABLE */
|
|
120
|
+
}), createVNode(stdin_default$1, null, {
|
|
121
|
+
default: withCtx(() => [createVNode(stdin_default$p)]),
|
|
122
|
+
_: 1
|
|
123
|
+
/* STABLE */
|
|
119
124
|
})], 2
|
|
120
125
|
/* CLASS */);
|
|
121
126
|
};
|
|
@@ -6,13 +6,13 @@ class FontStyleAttributor extends Parchment.StyleAttributor {
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
const fonts = [
|
|
9
|
-
//
|
|
9
|
+
// chiness
|
|
10
10
|
["Microsoft YaHei", '"Microsoft YaHei"'],
|
|
11
11
|
["PingFang SC", '"PingFang SC"'],
|
|
12
12
|
["Hiragino Sans GB", '"Hiragino Sans GB"'],
|
|
13
13
|
["SimSun", "SimSun"],
|
|
14
14
|
["STHeiti", "STHeiti"],
|
|
15
|
-
//
|
|
15
|
+
// english
|
|
16
16
|
["Andale Mono", '"andale mono", monospace'],
|
|
17
17
|
["Arial", "arial, helvetica, sans-serif"],
|
|
18
18
|
["Arial Black", '"arial black", sans-serif'],
|
|
@@ -29,7 +29,7 @@ class IndentAttributor extends Parchment.StyleAttributor {
|
|
|
29
29
|
return this.normalize(parseInt(super.value(node), 10));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
const IndentStyle = new IndentAttributor("indent", "padding-
|
|
32
|
+
const IndentStyle = new IndentAttributor("indent", "padding-inline-start", {
|
|
33
33
|
scope: Parchment.Scope.BLOCK,
|
|
34
34
|
whitelist: Array(INDENT_STEP * 9).fill(0).map((_, i) => i + 1)
|
|
35
35
|
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import Inline from 'quill/blots/inline';
|
|
2
|
+
|
|
3
|
+
class Kbd extends Inline {
|
|
4
|
+
static blotName = "kbd";
|
|
5
|
+
static tagName = "KBD";
|
|
6
|
+
static create() {
|
|
7
|
+
const node = super.create();
|
|
8
|
+
return node;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
var stdin_default = Kbd;
|
|
12
|
+
|
|
13
|
+
export { stdin_default as default };
|
|
@@ -14,9 +14,9 @@ var stdin_default = getGlobalStyleHook("EditorImageLoading", (token) => {
|
|
|
14
14
|
},
|
|
15
15
|
div: {
|
|
16
16
|
position: "absolute",
|
|
17
|
-
|
|
17
|
+
insetBlockStart: "50%",
|
|
18
18
|
width: "100%",
|
|
19
|
-
|
|
19
|
+
marginBlockStart: -20,
|
|
20
20
|
textAlign: "center",
|
|
21
21
|
svg: {
|
|
22
22
|
display: "inline",
|
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import Quill from 'quill';
|
|
2
2
|
import { ImageUploader } from './modules/image-uploader/image-uploader.js';
|
|
3
|
-
import stdin_default$
|
|
3
|
+
import stdin_default$3 from './modules/custom-list.js';
|
|
4
4
|
import { Formula } from './formats/formula.js';
|
|
5
5
|
import { SizeStyle } from './formats/size.js';
|
|
6
6
|
import { FontStyle } from './formats/font.js';
|
|
7
7
|
import { Link } from './formats/link.js';
|
|
8
8
|
import { AlignStyle } from './formats/align.js';
|
|
9
|
-
import stdin_default$
|
|
10
|
-
import stdin_default from './formats/image.js';
|
|
9
|
+
import stdin_default$2 from './formats/video.js';
|
|
10
|
+
import stdin_default$1 from './formats/image.js';
|
|
11
|
+
import stdin_default from './formats/kbd.js';
|
|
11
12
|
|
|
12
13
|
function register() {
|
|
13
14
|
Quill.register(
|
|
14
15
|
{
|
|
15
16
|
"modules/imageUploader": ImageUploader,
|
|
16
|
-
"modules/customList": stdin_default$
|
|
17
|
+
"modules/customList": stdin_default$3,
|
|
17
18
|
"formats/formula": Formula,
|
|
18
19
|
"formats/size": SizeStyle,
|
|
19
20
|
"formats/font": FontStyle,
|
|
20
21
|
"formats/link": Link,
|
|
21
22
|
"formats/align": AlignStyle,
|
|
22
23
|
// 'formats/indent': IndentStyle,
|
|
23
|
-
"formats/video": stdin_default$
|
|
24
|
-
"formats/image": stdin_default
|
|
24
|
+
"formats/video": stdin_default$2,
|
|
25
|
+
"formats/image": stdin_default$1,
|
|
25
26
|
// 'formats/list': List,
|
|
27
|
+
"formats/kbd": stdin_default
|
|
26
28
|
},
|
|
27
29
|
true
|
|
28
30
|
);
|
|
@@ -14,8 +14,8 @@ const getQuillClipboardStyle = () => {
|
|
|
14
14
|
return {
|
|
15
15
|
".ql-clipboard": {
|
|
16
16
|
position: "absolute",
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
insetInlineStart: -1e5,
|
|
18
|
+
insetBlockStart: "50%",
|
|
19
19
|
height: 1,
|
|
20
20
|
overflowY: "hidden",
|
|
21
21
|
p: {
|
|
@@ -52,7 +52,7 @@ const getIndent = () => {
|
|
|
52
52
|
return {
|
|
53
53
|
...obj,
|
|
54
54
|
[`li.ql-indent-${num}`]: {
|
|
55
|
-
|
|
55
|
+
paddingInlineStart: `${3 * num + LIST_STYLE_OUTER_WIDTH}em`
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
58
|
}, {})
|
|
@@ -64,14 +64,14 @@ const getQuillArticleStyle = (token) => {
|
|
|
64
64
|
return {
|
|
65
65
|
...obj,
|
|
66
66
|
[`.ql-indent-${num}`]: {
|
|
67
|
-
|
|
67
|
+
paddingInlineStart: `${3 * num}em`
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
}, {}),
|
|
71
71
|
"p, ol, pre, blockquote, h1, h2, h3, h4, h5, h6": {
|
|
72
72
|
margin: 0,
|
|
73
73
|
padding: 0,
|
|
74
|
-
|
|
74
|
+
marginBlockEnd: token.marginSM
|
|
75
75
|
},
|
|
76
76
|
"h1, h2, h3, h4, h5, h6": {
|
|
77
77
|
fontWeight: token.fontWeightStrong
|
|
@@ -127,10 +127,10 @@ const getQuillArticleStyle = (token) => {
|
|
|
127
127
|
maxWidth: "100%"
|
|
128
128
|
},
|
|
129
129
|
blockquote: {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
borderInlineStart: `4px solid ${token.colorBorder}`,
|
|
131
|
+
marginBlockEnd: 5,
|
|
132
|
+
marginBlockStart: 5,
|
|
133
|
+
paddingInlineStart: 16
|
|
134
134
|
},
|
|
135
135
|
code: {
|
|
136
136
|
fontSize: "85%",
|
|
@@ -138,6 +138,15 @@ const getQuillArticleStyle = (token) => {
|
|
|
138
138
|
paddingInline: 4,
|
|
139
139
|
borderRadius: token.borderRadiusSM,
|
|
140
140
|
backgroundColor: "#f0f0f0"
|
|
141
|
+
},
|
|
142
|
+
kbd: {
|
|
143
|
+
padding: `2px 6px`,
|
|
144
|
+
fontSize: ".875em",
|
|
145
|
+
color: token.colorText,
|
|
146
|
+
backgroundColor: token.colorBgContainer,
|
|
147
|
+
border: `${token.lineType} ${token.lineWidth} ${token.colorBorder}`,
|
|
148
|
+
borderRadius: token.borderRadiusXS,
|
|
149
|
+
boxShadow: `0 2px 0 -1px ${token.colorBgContainer}, 0 2px ${token.colorBorder}`
|
|
141
150
|
}
|
|
142
151
|
};
|
|
143
152
|
};
|
|
@@ -203,8 +212,8 @@ const getQuillEditorStyle = (token) => {
|
|
|
203
212
|
},
|
|
204
213
|
"&.ql-blank::before": {
|
|
205
214
|
position: "absolute",
|
|
206
|
-
|
|
207
|
-
|
|
215
|
+
insetInlineStart: token.padding,
|
|
216
|
+
insetInlineEnd: token.padding,
|
|
208
217
|
color: token.colorTextPlaceholder,
|
|
209
218
|
content: "attr(data-placeholder)",
|
|
210
219
|
fontStyle: "italic",
|
|
@@ -212,8 +221,8 @@ const getQuillEditorStyle = (token) => {
|
|
|
212
221
|
},
|
|
213
222
|
".ql-code-block-container": {
|
|
214
223
|
position: "relative",
|
|
215
|
-
|
|
216
|
-
|
|
224
|
+
marginBlockEnd: 5,
|
|
225
|
+
marginBlockStart: 5,
|
|
217
226
|
paddingBlock: 5,
|
|
218
227
|
paddingInline: 10,
|
|
219
228
|
overflow: "visible",
|
|
@@ -222,8 +231,8 @@ const getQuillEditorStyle = (token) => {
|
|
|
222
231
|
borderRadius: token.borderRadius,
|
|
223
232
|
backgroundColor: "#23241f",
|
|
224
233
|
".ql-ui": {
|
|
225
|
-
|
|
226
|
-
|
|
234
|
+
insetInlineEnd: 5,
|
|
235
|
+
insetBlockStart: 5,
|
|
227
236
|
color: token.colorText,
|
|
228
237
|
backgroundColor: token.colorBgElevated,
|
|
229
238
|
appearance: "auto"
|
|
@@ -252,7 +261,7 @@ const getEditorStyle = (token) => {
|
|
|
252
261
|
borderRadius: token.borderRadius
|
|
253
262
|
},
|
|
254
263
|
[`${toolbarCls} ~ ${containerCls}`]: {
|
|
255
|
-
|
|
264
|
+
borderBlockStart: 0,
|
|
256
265
|
borderTopLeftRadius: 0,
|
|
257
266
|
borderTopRightRadius: 0
|
|
258
267
|
},
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { ElAutocomplete } from 'element-plus';
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
3
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
4
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
4
5
|
|
|
5
6
|
var stdin_default = defineComponent((props, {
|
|
6
7
|
slots
|
|
7
8
|
}) => {
|
|
9
|
+
const {
|
|
10
|
+
t
|
|
11
|
+
} = useLocale();
|
|
8
12
|
return () => {
|
|
9
13
|
if (props.readonly) {
|
|
10
14
|
const value = props.componentProps?.modelValue;
|
|
11
15
|
return addNullablePlaceholder(value);
|
|
12
16
|
}
|
|
13
17
|
return h(ElAutocomplete, mergeProps({
|
|
14
|
-
placeholder: "
|
|
18
|
+
placeholder: t("co.common.pleaseInput"),
|
|
15
19
|
clearable: true,
|
|
16
20
|
style: {
|
|
17
21
|
display: "flex"
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { ElCascader } from 'element-plus';
|
|
2
2
|
import { defineComponent, computed, h, mergeProps } from 'vue';
|
|
3
3
|
import { getTreeLabelByValue } from '../../../../utils/collection.js';
|
|
4
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
4
5
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
5
6
|
|
|
6
7
|
var stdin_default = defineComponent((props, {
|
|
7
8
|
slots
|
|
8
9
|
}) => {
|
|
10
|
+
const {
|
|
11
|
+
t
|
|
12
|
+
} = useLocale();
|
|
9
13
|
const componentProps = computed(() => {
|
|
10
14
|
return props.componentProps ?? {};
|
|
11
15
|
});
|
|
@@ -22,7 +26,7 @@ var stdin_default = defineComponent((props, {
|
|
|
22
26
|
return addNullablePlaceholder(value, val => getTreeLabelByValue(componentProps.value.options ?? [], val, mergedOptionProps.value).join(" / "));
|
|
23
27
|
}
|
|
24
28
|
return h(ElCascader, mergeProps({
|
|
25
|
-
placeholder: "
|
|
29
|
+
placeholder: t("co.common.pleaseSelect"),
|
|
26
30
|
clearable: true,
|
|
27
31
|
style: {
|
|
28
32
|
display: "flex",
|
|
@@ -50,7 +50,7 @@ var stdin_default = defineComponent(props => {
|
|
|
50
50
|
style: {
|
|
51
51
|
width: checkboxWidth.value
|
|
52
52
|
},
|
|
53
|
-
class: "!
|
|
53
|
+
class: "!me-0"
|
|
54
54
|
}))));
|
|
55
55
|
return componentProps.value.indeterminate ? h(stdin_default$1, {
|
|
56
56
|
modelValue: checkboxGroupProps.value.modelValue,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { defineComponent, ref, watch, resolveComponent, createBlock, openBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, createTextVNode,
|
|
1
|
+
import { defineComponent, ref, watch, resolveComponent, createBlock, openBlock, unref, withCtx, renderSlot, createVNode, createElementVNode, createTextVNode, toDisplayString, normalizeStyle } from 'vue';
|
|
2
2
|
import { Panel as _Panel } from '../../../panel/index.js';
|
|
3
3
|
import { useToken } from '../../../theme/util/useToken.js';
|
|
4
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
4
5
|
|
|
5
6
|
var stdin_default = /* @__PURE__ */defineComponent({
|
|
6
7
|
...{
|
|
@@ -27,6 +28,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
27
28
|
}) {
|
|
28
29
|
const props = __props;
|
|
29
30
|
const emit = __emit;
|
|
31
|
+
const {
|
|
32
|
+
t
|
|
33
|
+
} = useLocale();
|
|
30
34
|
const {
|
|
31
35
|
token
|
|
32
36
|
} = useToken();
|
|
@@ -55,12 +59,13 @@ var stdin_default = /* @__PURE__ */defineComponent({
|
|
|
55
59
|
indeterminate: isIndeterminate.value,
|
|
56
60
|
onChange: handleCheckAllChange
|
|
57
61
|
}, {
|
|
58
|
-
default: withCtx(() =>
|
|
59
|
-
|
|
60
|
-
|
|
62
|
+
default: withCtx(() => [createTextVNode(toDisplayString(unref(t)("co.editor.checkAll")), 1
|
|
63
|
+
/* TEXT */)]),
|
|
64
|
+
_: 1
|
|
65
|
+
/* STABLE */
|
|
61
66
|
}, 8, ["modelValue", "indeterminate"]), createElementVNode("div", {
|
|
62
67
|
style: normalizeStyle({
|
|
63
|
-
|
|
68
|
+
marginInlineStart: "auto",
|
|
64
69
|
fontSize: unref(token).fontSizeSM
|
|
65
70
|
})
|
|
66
71
|
}, toDisplayString(_ctx.modelValue.length) + " / " + toDisplayString(_ctx.options.length), 5
|
|
@@ -2,18 +2,22 @@ import { ElDatePicker } from 'element-plus';
|
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import { DATE_FORMAT } from '../../../../utils/date.js';
|
|
5
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
5
6
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
6
7
|
|
|
7
8
|
var stdin_default = defineComponent((props, {
|
|
8
9
|
slots
|
|
9
10
|
}) => {
|
|
11
|
+
const {
|
|
12
|
+
t
|
|
13
|
+
} = useLocale();
|
|
10
14
|
return () => {
|
|
11
15
|
if (props.readonly) {
|
|
12
16
|
const value = props.componentProps?.modelValue;
|
|
13
17
|
return addNullablePlaceholder(value, val => dayjs(val).format(DATE_FORMAT));
|
|
14
18
|
}
|
|
15
19
|
return h(ElDatePicker, mergeProps({
|
|
16
|
-
placeholder: "
|
|
20
|
+
placeholder: t("co.common.pleaseSelect"),
|
|
17
21
|
style: {
|
|
18
22
|
display: "flex",
|
|
19
23
|
width: "100%"
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { ElDatePicker } from 'element-plus';
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
4
5
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
5
6
|
import { DATE_FORMAT } from '../../../../utils/date.js';
|
|
6
7
|
|
|
7
8
|
var stdin_default = defineComponent((props, {
|
|
8
9
|
slots
|
|
9
10
|
}) => {
|
|
11
|
+
const {
|
|
12
|
+
t
|
|
13
|
+
} = useLocale();
|
|
10
14
|
return () => {
|
|
11
15
|
if (props.readonly) {
|
|
12
16
|
const value = props.componentProps?.modelValue;
|
|
13
17
|
return addNullablePlaceholder(value, val => val.map(item => dayjs(item).format(DATE_FORMAT)).join(" - "));
|
|
14
18
|
}
|
|
15
19
|
return h(ElDatePicker, mergeProps({
|
|
16
|
-
startPlaceholder: "
|
|
17
|
-
endPlaceholder: "
|
|
20
|
+
startPlaceholder: t("co.common.pleaseSelect"),
|
|
21
|
+
endPlaceholder: t("co.common.pleaseSelect"),
|
|
18
22
|
defaultTime: [new Date(0, 0, 1, 0, 0, 0), new Date(0, 0, 1, 23, 59, 59)],
|
|
19
23
|
style: {
|
|
20
24
|
display: "flex",
|
|
@@ -2,18 +2,22 @@ import { ElDatePicker } from 'element-plus';
|
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
4
|
import { DATE_TIME_FORMAT } from '../../../../utils/date.js';
|
|
5
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
5
6
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
6
7
|
|
|
7
8
|
var stdin_default = defineComponent((props, {
|
|
8
9
|
slots
|
|
9
10
|
}) => {
|
|
10
11
|
return () => {
|
|
12
|
+
const {
|
|
13
|
+
t
|
|
14
|
+
} = useLocale();
|
|
11
15
|
if (props.readonly) {
|
|
12
16
|
const value = props.componentProps?.modelValue;
|
|
13
17
|
return addNullablePlaceholder(value, val => dayjs(val).format(DATE_TIME_FORMAT));
|
|
14
18
|
}
|
|
15
19
|
return h(ElDatePicker, mergeProps({
|
|
16
|
-
placeholder: "
|
|
20
|
+
placeholder: t("co.common.pleaseSelect"),
|
|
17
21
|
style: {
|
|
18
22
|
display: "flex",
|
|
19
23
|
width: "100%"
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
import { ElDatePicker } from 'element-plus';
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
4
5
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
5
6
|
import { DATE_TIME_FORMAT } from '../../../../utils/date.js';
|
|
6
7
|
|
|
7
8
|
var stdin_default = defineComponent((props, {
|
|
8
9
|
slots
|
|
9
10
|
}) => {
|
|
11
|
+
const {
|
|
12
|
+
t
|
|
13
|
+
} = useLocale();
|
|
10
14
|
return () => {
|
|
11
15
|
if (props.readonly) {
|
|
12
16
|
const value = props.componentProps?.modelValue;
|
|
13
17
|
return addNullablePlaceholder(value, val => val.map(item => dayjs(item).format(DATE_TIME_FORMAT)).join(" - "));
|
|
14
18
|
}
|
|
15
19
|
return h(ElDatePicker, mergeProps({
|
|
16
|
-
startPlaceholder: "
|
|
17
|
-
endPlaceholder: "
|
|
20
|
+
startPlaceholder: t("co.common.pleaseSelect"),
|
|
21
|
+
endPlaceholder: t("co.common.pleaseSelect"),
|
|
18
22
|
defaultTime: [new Date(0, 0, 1, 0, 0, 0), new Date(0, 0, 1, 23, 59, 59)],
|
|
19
23
|
style: {
|
|
20
24
|
display: "flex",
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { ElDatePicker } from 'element-plus';
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
3
|
import dayjs from 'dayjs';
|
|
4
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
4
5
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
5
6
|
import { DATE_FORMAT } from '../../../../utils/date.js';
|
|
6
7
|
|
|
7
8
|
var stdin_default = defineComponent((props, {
|
|
8
9
|
slots
|
|
9
10
|
}) => {
|
|
11
|
+
const {
|
|
12
|
+
t
|
|
13
|
+
} = useLocale();
|
|
10
14
|
return () => {
|
|
11
15
|
if (props.readonly) {
|
|
12
16
|
const value = props.componentProps?.modelValue;
|
|
13
17
|
return addNullablePlaceholder(value, val => val.map(item => dayjs(item).format(DATE_FORMAT)).join(", "));
|
|
14
18
|
}
|
|
15
19
|
return h(ElDatePicker, mergeProps({
|
|
16
|
-
placeholder: "
|
|
20
|
+
placeholder: t("co.common.pleaseSelect"),
|
|
17
21
|
style: {
|
|
18
22
|
display: "flex",
|
|
19
23
|
width: "100%"
|
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
import { ElInput } from 'element-plus';
|
|
2
2
|
import { defineComponent, h, mergeProps } from 'vue';
|
|
3
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
3
4
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
4
5
|
|
|
5
6
|
var stdin_default = defineComponent((props, {
|
|
6
7
|
slots
|
|
7
8
|
}) => {
|
|
9
|
+
const {
|
|
10
|
+
t
|
|
11
|
+
} = useLocale();
|
|
8
12
|
return () => {
|
|
9
13
|
if (props.readonly) {
|
|
10
14
|
return addNullablePlaceholder(props.componentProps?.modelValue);
|
|
11
15
|
}
|
|
12
16
|
return h(ElInput, mergeProps({
|
|
13
|
-
placeholder: "
|
|
17
|
+
placeholder: t("co.common.pleaseInput"),
|
|
14
18
|
clearable: true,
|
|
15
19
|
style: {
|
|
16
20
|
display: "flex"
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { ElInputTag } from 'element-plus';
|
|
2
2
|
import { defineComponent, h } from 'vue';
|
|
3
|
+
import { useLocale } from '../../../../hooks/useLocale.js';
|
|
3
4
|
import { addNullablePlaceholder } from '../../../../utils/vue.js';
|
|
4
5
|
|
|
5
6
|
var stdin_default = defineComponent((props, {
|
|
6
7
|
slots
|
|
7
8
|
}) => {
|
|
9
|
+
const {
|
|
10
|
+
t
|
|
11
|
+
} = useLocale();
|
|
8
12
|
return () => {
|
|
9
13
|
if (props.readonly) {
|
|
10
14
|
const value = props.componentProps?.modelValue;
|
|
11
15
|
return addNullablePlaceholder(value, val => val.join(", "));
|
|
12
16
|
}
|
|
13
17
|
return h(ElInputTag, {
|
|
14
|
-
placeholder: "
|
|
18
|
+
placeholder: t("co.common.pleaseInput"),
|
|
15
19
|
clearable: true,
|
|
16
20
|
...props.componentProps
|
|
17
21
|
}, slots);
|