@veltra/desktop 1.1.5 → 1.1.7
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/dist/components/action/action-group.vue.d.ts +1 -1
- package/dist/components/action/action.vue.d.ts +1 -1
- package/dist/components/batch-edit/batch-edit-form.js +23 -11
- package/dist/components/batch-edit/batch-edit-form.js.map +1 -1
- package/dist/components/batch-edit/batch-edit.js +0 -1
- package/dist/components/batch-edit/batch-edit.js.map +1 -1
- package/dist/components/batch-edit/style.js +1 -0
- package/dist/components/button/button.vue.d.ts +1 -1
- package/dist/components/button/style2.css +57 -45
- package/dist/components/cascade/cascade.vue.d.ts +4 -4
- package/dist/components/cascade/style2.css +2 -1
- package/dist/components/checkbox/checkbox-button.vue.d.ts +1 -1
- package/dist/components/checkbox/style2.css +2 -2
- package/dist/components/checkbox-group/checkbox-group.vue.d.ts +1 -1
- package/dist/components/collapse/collapse.vue.d.ts +1 -1
- package/dist/components/date-picker/date-picker.vue.d.ts +1 -1
- package/dist/components/date-range-picker/date-range-picker.vue.d.ts +1 -1
- package/dist/components/drawer/drawer.vue.d.ts +2 -2
- package/dist/components/expression-editor/style2.css +4 -4
- package/dist/components/file-viewer/file-viewer.vue.d.ts +1 -1
- package/dist/components/index.d.ts +9 -8
- package/dist/components/index.js +56 -54
- package/dist/components/index.js.map +1 -1
- package/dist/components/input/input.vue.d.ts +2 -2
- package/dist/components/kbd/index.d.ts +1 -0
- package/dist/components/kbd/kbd.js +17 -0
- package/dist/components/kbd/kbd.js.map +1 -0
- package/dist/components/kbd/kbd.vue.d.ts +18 -0
- package/dist/components/kbd/style.d.ts +1 -0
- package/dist/components/kbd/style.js +1 -0
- package/dist/components/kbd/style2.css +43 -0
- package/dist/components/message-confirm/style2.css +3 -1
- package/dist/components/multi-select/multi-select.vue.d.ts +2 -2
- package/dist/components/multi-tree-select/multi-tree-select.vue.d.ts +4 -4
- package/dist/components/notification/notification.vue.d.ts +1 -1
- package/dist/components/notification/style2.css +1 -1
- package/dist/components/number-input/number-input.vue.d.ts +2 -2
- package/dist/components/paginator/style2.css +4 -3
- package/dist/components/progress-nodes/progress-nodes.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group.vue.d.ts +1 -1
- package/dist/components/select/select.vue.d.ts +1 -1
- package/dist/components/table/table.js +0 -1
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/table-editor/table-editor.js +0 -1
- package/dist/components/table-editor/table-editor.js.map +1 -1
- package/dist/components/tabs/style2.css +3 -3
- package/dist/components/tabs/tabs-horizontal.vue.d.ts +5 -5
- package/dist/components/tabs/tabs-vertical.vue.d.ts +4 -4
- package/dist/components/tabs/tabs.vue.d.ts +5 -5
- package/dist/components/tag/style2.css +35 -35
- package/dist/components/textarea/textarea.vue.d.ts +2 -2
- package/dist/components/tip/tip.vue.d.ts +1 -1
- package/dist/components/tree/style2.css +2 -2
- package/dist/components/tree-select/tree-select.vue.d.ts +4 -4
- package/dist/index.d.ts +45 -44
- package/dist/index.js +44 -43
- package/dist/style.js +1 -0
- package/dist/types/table.d.ts +0 -2
- package/package.json +11 -11
- package/src/components/auto-complete/style.scss +3 -1
- package/src/components/batch-edit/batch-edit-form.vue +10 -2
- package/src/components/batch-edit/style.ts +1 -0
- package/src/components/button/style.scss +16 -9
- package/src/components/cascade/style.scss +5 -2
- package/src/components/checkbox/style.scss +2 -2
- package/src/components/code-editor/style.scss +5 -2
- package/src/components/date-range-picker/style.scss +3 -1
- package/src/components/expression-editor/style.scss +4 -4
- package/src/components/index.ts +2 -0
- package/src/components/kbd/index.ts +1 -0
- package/src/components/kbd/kbd.vue +13 -0
- package/src/components/kbd/style.scss +37 -0
- package/src/components/kbd/style.ts +1 -0
- package/src/components/message-confirm/style.scss +3 -1
- package/src/components/multi-select/style.scss +3 -1
- package/src/components/multi-tree-select/style.scss +3 -1
- package/src/components/notification/style.scss +1 -1
- package/src/components/paginator/style.scss +4 -3
- package/src/components/tabs/style.scss +2 -2
- package/src/components/tag/style.scss +5 -5
- package/src/components/textarea/style.scss +3 -1
- package/src/components/tree/style.scss +2 -2
- package/src/style.ts +1 -0
- package/src/types/table.ts +0 -2
|
@@ -10,9 +10,9 @@ type __VLS_Slots = {
|
|
|
10
10
|
declare const __VLS_base: _$vue.DefineComponent<ActionGroupProps, _ActionGroupExposed, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ActionGroupProps> & Readonly<{}>, {
|
|
11
11
|
type: _$_veltra_utils0.ColorType;
|
|
12
12
|
size: "small" | "default" | "large";
|
|
13
|
-
text: boolean;
|
|
14
13
|
circle: boolean;
|
|
15
14
|
max: number;
|
|
15
|
+
text: boolean;
|
|
16
16
|
loading: boolean;
|
|
17
17
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -17,8 +17,8 @@ declare const __VLS_base: _$vue.DefineComponent<ActionProps, {}, {}, {}, {}, _$v
|
|
|
17
17
|
}>, {
|
|
18
18
|
type: ButtonType;
|
|
19
19
|
size: _$_veltra_utils0.ComponentSize;
|
|
20
|
-
text: boolean;
|
|
21
20
|
circle: boolean;
|
|
21
|
+
text: boolean;
|
|
22
22
|
loading: boolean;
|
|
23
23
|
inDropdown: boolean;
|
|
24
24
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -2,8 +2,9 @@ import _sfc_main$1 from "../icon/icon.js";
|
|
|
2
2
|
import _sfc_main$2 from "../scroll/scroll.js";
|
|
3
3
|
import form_default from "../form/form.js";
|
|
4
4
|
import _sfc_main$3 from "../button/button.js";
|
|
5
|
+
import _sfc_main$4 from "../kbd/kbd.js";
|
|
5
6
|
import { BatchEditDIKey } from "./di.js";
|
|
6
|
-
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx
|
|
7
|
+
import { Transition, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, guardReactiveProps, inject, normalizeClass, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, toDisplayString, unref, withCtx } from "vue";
|
|
7
8
|
import { bem } from "@veltra/utils";
|
|
8
9
|
import { AddChild, Close, EditPen, Plus, View } from "@veltra/icons/normal";
|
|
9
10
|
//#region src/components/batch-edit/batch-edit-form.vue
|
|
@@ -47,6 +48,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
47
48
|
const bodyKey = computed(() => {
|
|
48
49
|
return `${state.type}-${state.row?.uid ?? "create"}-${state.parentRow?.uid ?? "root"}`;
|
|
49
50
|
});
|
|
51
|
+
function handleFormKeydown(e) {
|
|
52
|
+
if ((e.metaKey || e.ctrlKey) && e.key === "Enter") {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
handleSave();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
50
57
|
return (_ctx, _cache) => {
|
|
51
58
|
return unref(state).visible && !!unref(props).model ? (openBlock(), createElementBlock("aside", {
|
|
52
59
|
key: 0,
|
|
@@ -88,7 +95,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
88
95
|
default: withCtx(() => [createVNode(unref(form_default), {
|
|
89
96
|
model: unref(props).model,
|
|
90
97
|
readonly: unref(props).readonly,
|
|
91
|
-
|
|
98
|
+
onKeydown: handleFormKeydown,
|
|
92
99
|
"label-width": unref(props).labelWidth
|
|
93
100
|
}, {
|
|
94
101
|
default: withCtx(({ data, model }) => [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({
|
|
@@ -103,7 +110,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
110
|
}, 8, [
|
|
104
111
|
"model",
|
|
105
112
|
"readonly",
|
|
106
|
-
"onKeyup",
|
|
107
113
|
"label-width"
|
|
108
114
|
])]),
|
|
109
115
|
_: 3
|
|
@@ -116,12 +122,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
122
|
}, " 有未保存改动 ", 2)) : !unref(props).readonly ? (openBlock(), createElementBlock("span", {
|
|
117
123
|
key: 1,
|
|
118
124
|
class: normalizeClass(unref(cls).e("form-hint"))
|
|
119
|
-
}, [
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
+
}, [
|
|
126
|
+
createVNode(unref(_sfc_main$4), null, {
|
|
127
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Ctrl + Enter", -1)])]),
|
|
128
|
+
_: 1
|
|
129
|
+
}),
|
|
130
|
+
_cache[2] || (_cache[2] = createTextVNode(" 保存 · ", -1)),
|
|
131
|
+
createVNode(unref(_sfc_main$4), null, {
|
|
132
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [createTextVNode("Esc", -1)])]),
|
|
133
|
+
_: 1
|
|
134
|
+
}),
|
|
135
|
+
_cache[3] || (_cache[3] = createTextVNode(" 关闭 ", -1))
|
|
136
|
+
], 2)) : (openBlock(), createElementBlock("span", {
|
|
125
137
|
key: 2,
|
|
126
138
|
class: normalizeClass(unref(cls).e("form-hint"))
|
|
127
139
|
}, "只读模式", 2)), createElementVNode("div", { class: normalizeClass(unref(cls).e("form-actions")) }, [createVNode(unref(_sfc_main$3), {
|
|
@@ -129,7 +141,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
129
141
|
loading: unref(state).loading,
|
|
130
142
|
onClick: unref(handleClose)
|
|
131
143
|
}, {
|
|
132
|
-
default: withCtx(() => [..._cache[
|
|
144
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [createTextVNode(" 取消 ", -1)])]),
|
|
133
145
|
_: 1
|
|
134
146
|
}, 8, ["loading", "onClick"]), !unref(props).readonly && (creatable.value || updatable.value) ? (openBlock(), createBlock(unref(_sfc_main$3), {
|
|
135
147
|
key: 0,
|
|
@@ -138,7 +150,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
138
150
|
disabled: !unref(state).dataUpdated,
|
|
139
151
|
onClick: unref(handleSave)
|
|
140
152
|
}, {
|
|
141
|
-
default: withCtx(() => [..._cache[
|
|
153
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" 保存 ", -1)])]),
|
|
142
154
|
_: 1
|
|
143
155
|
}, 8, [
|
|
144
156
|
"type",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-edit-form.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit-form.vue"],"sourcesContent":["<template>\n <aside :class=\"cls.e('form')\" v-if=\"state.visible && !!props.model\">\n <header :class=\"cls.e('form-header')\">\n <span :class=\"[cls.e('form-icon'), bem.is(headerInfo.tone)]\">\n <u-icon>\n <component :is=\"headerInfo.icon\" />\n </u-icon>\n </span>\n <div :class=\"cls.e('form-title')\">\n <h3 :class=\"cls.e('form-title-text')\">{{ headerInfo.title }}</h3>\n <span v-if=\"headerInfo.chip\" :class=\"cls.e('form-chip')\">\n {{ headerInfo.chip }}\n </span>\n </div>\n <u-button\n :class=\"cls.e('form-close')\"\n :icon=\"Close\"\n text\n circle\n size=\"small\"\n title=\"关闭\"\n @click=\"handleClose\"\n />\n </header>\n\n <u-scroll always :class=\"cls.e('form-body')\" :key=\"bodyKey\">\n <transition name=\"fade\" appear mode=\"out-in\">\n <u-form\n :model=\"props.model\"\n :readonly=\"props.readonly\"\n @
|
|
1
|
+
{"version":3,"file":"batch-edit-form.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit-form.vue"],"sourcesContent":["<template>\n <aside :class=\"cls.e('form')\" v-if=\"state.visible && !!props.model\">\n <header :class=\"cls.e('form-header')\">\n <span :class=\"[cls.e('form-icon'), bem.is(headerInfo.tone)]\">\n <u-icon>\n <component :is=\"headerInfo.icon\" />\n </u-icon>\n </span>\n <div :class=\"cls.e('form-title')\">\n <h3 :class=\"cls.e('form-title-text')\">{{ headerInfo.title }}</h3>\n <span v-if=\"headerInfo.chip\" :class=\"cls.e('form-chip')\">\n {{ headerInfo.chip }}\n </span>\n </div>\n <u-button\n :class=\"cls.e('form-close')\"\n :icon=\"Close\"\n text\n circle\n size=\"small\"\n title=\"关闭\"\n @click=\"handleClose\"\n />\n </header>\n\n <u-scroll always :class=\"cls.e('form-body')\" :key=\"bodyKey\">\n <transition name=\"fade\" appear mode=\"out-in\">\n <u-form\n :model=\"props.model\"\n :readonly=\"props.readonly\"\n @keydown=\"handleFormKeydown\"\n :label-width=\"props.labelWidth\"\n >\n <template #default=\"{ data, model }\">\n <slot\n v-bind=\"{\n data,\n model,\n row: state.row,\n depth: state.depth,\n indexes: insertIndexes,\n index: state.row?.index\n }\"\n />\n </template>\n </u-form>\n </transition>\n </u-scroll>\n\n <footer :class=\"cls.e('form-footer')\">\n <span :class=\"cls.e('form-hint')\" v-if=\"!props.readonly && state.dataUpdated\">\n 有未保存改动\n </span>\n <span :class=\"cls.e('form-hint')\" v-else-if=\"!props.readonly\">\n <u-kbd>Ctrl + Enter</u-kbd> 保存 · <u-kbd>Esc</u-kbd> 关闭\n </span>\n <span :class=\"cls.e('form-hint')\" v-else>只读模式</span>\n\n <div :class=\"cls.e('form-actions')\">\n <u-button text :loading=\"state.loading\" @click=\"handleClose\"> 取消 </u-button>\n <u-button\n v-if=\"!props.readonly && (creatable || updatable)\"\n :type=\"state.type === 'create' ? 'success' : 'primary'\"\n :loading=\"state.loading\"\n :disabled=\"!state.dataUpdated\"\n @click=\"handleSave\"\n >\n 保存\n </u-button>\n </div>\n </footer>\n </aside>\n</template>\n\n<script lang=\"ts\" setup>\nimport { AddChild, Close, EditPen, Plus, View } from '@veltra/icons/normal'\nimport { bem } from '@veltra/utils'\nimport { computed, inject, type Component } from 'vue'\n\nimport { UButton } from '../button'\nimport { UForm } from '../form'\nimport { UIcon } from '../icon'\nimport { UKbd } from '../kbd'\nimport { UScroll } from '../scroll'\nimport { BatchEditDIKey } from './di'\n\ndefineOptions({ name: 'BatchEditForm' })\n\nconst {\n cls,\n props,\n state,\n insertIndexes,\n handleSave,\n handleClose,\n staticFeatures,\n dynamicFeatures\n} = inject(BatchEditDIKey)!\n\nconst creatable = computed(() => {\n return (\n state.type === 'create' &&\n (staticFeatures.value.has('create') || dynamicFeatures.value.create?.(state.row))\n )\n})\n\nconst updatable = computed(() => {\n return (\n state.type === 'update' &&\n (staticFeatures.value.has('update') || dynamicFeatures.value.update?.(state.row))\n )\n})\n\ninterface HeaderInfo {\n icon: Component\n title: string\n chip?: string\n tone: 'create' | 'update' | 'view' | 'child'\n}\n\nconst headerInfo = computed<HeaderInfo>(() => {\n if (props.readonly) {\n return {\n icon: View,\n title: '查看详情',\n chip: state.row ? `第 ${state.row.index + 1} 行` : undefined,\n tone: 'view'\n }\n }\n if (state.parentRow) {\n return {\n icon: AddChild,\n title: '新增子级',\n chip: `归属于第 ${state.parentRow.index + 1} 行`,\n tone: 'child'\n }\n }\n if (state.type === 'create') {\n return {\n icon: Plus,\n title: '新增',\n tone: 'create'\n }\n }\n return {\n icon: EditPen,\n title: '编辑',\n chip: state.row ? `第 ${state.row.index + 1} 行` : undefined,\n tone: 'update'\n }\n})\n\n/** 通过 row 切换 / 类型切换驱动表单内容淡出淡入 */\nconst bodyKey = computed(() => {\n return `${state.type}-${state.row?.uid ?? 'create'}-${state.parentRow?.uid ?? 'root'}`\n})\n\nfunction handleFormKeydown(e: KeyboardEvent) {\n if ((e.metaKey || e.ctrlKey) && e.key === 'Enter') {\n e.preventDefault()\n handleSave()\n }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;EAwFA,MAAM,EACJ,KACA,OACA,OACA,eACA,YACA,aACA,gBACA,oBACE,OAAO,eAAe;EAE1B,MAAM,YAAY,eAAe;AAC/B,UACE,MAAM,SAAS,aACd,eAAe,MAAM,IAAI,SAAS,IAAI,gBAAgB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ACf,UAAQ,CAAG,MAAA,MAAK,CAAC;KACjB,SAAO,MAAA,WAAU;;4BAGpB,CAAA,GAAA,OAAA,OAAA,OAAA,KAAA,CAAA,gBAFC,QAED,GAAA,CAAA,EAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"batch-edit.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit.vue"],"sourcesContent":["<template>\n <u-layout\n :class=\"cls.b\"\n :cols=\"cols\"\n rows=\"100%\"\n gap=\"8px\"\n resizable\n @keydown=\"handleKeydown\"\n tabindex=\"-1\"\n >\n <!-- 编辑列表 -->\n <BatchEditList :slots=\"slots\" />\n\n <!-- 编辑表单 -->\n <BatchEditForm v-slot=\"scoped\">\n <!-- @vue-ignore -->\n <slot name=\"form\" v-bind=\"scoped\" />\n </BatchEditForm>\n </u-layout>\n</template>\n\n<script lang=\"ts\" setup generic=\"Model extends FormModel\">\nimport { bem } from '@veltra/utils'\nimport { computed, inject, provide, shallowRef, watch } from 'vue'\n\nimport type {\n BatchEditEmits,\n BatchEditFeature,\n BatchEditProps,\n TableColumnSlotsScope,\n TableExposed,\n TableRow\n} from '../../types'\nimport { DialogDIKey } from '../dialog/di'\nimport type { FormModel } from '../form'\nimport { ULayout } from '../layout'\nimport BatchEditForm from './batch-edit-form.vue'\nimport BatchEditList from './batch-edit-list.vue'\nimport { BatchEditDIKey } from './di'\nimport { useEdit } from './use-edit'\n\ndefineOptions({ name: 'BatchEdit' })\n\nconst props = withDefaults(defineProps<BatchEditProps<Model>>(), {\n cols: () => ['1fr', '420px'],\n mode: 'normal'\n})\n\nconst emit = defineEmits<BatchEditEmits>()\n\nconst staticFeatures = computed(() => {\n const { features } = props\n\n if (Array.isArray(features)) {\n return new Set(features)\n }\n\n const defaultFeatures = new Set<BatchEditFeature>(['create', 'delete', 'update', 'createChild'])\n\n if (!features) {\n return defaultFeatures\n }\n\n // 函数与 false 的特性视为关闭;显式 true 视为开启(即便不在默认集合内)\n Object.entries(features).forEach(([key, value]) => {\n const k = key as BatchEditFeature\n if (typeof value === 'function' || value === false) {\n defaultFeatures.delete(k)\n } else if (value === true) {\n defaultFeatures.add(k)\n }\n })\n return defaultFeatures\n})\n\nconst dynamicFeatures = computed<\n Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n>(() => {\n const { features } = props\n if (!Array.isArray(features) && typeof features === 'object') {\n const ret = Object.entries(features)\n .filter(([_, value]) => {\n return typeof value === 'function'\n })\n .reduce(\n (acc, [key, value]) => {\n acc[key] = value\n return acc\n },\n {} as Record<BatchEditFeature, (row?: TableRow) => boolean>\n )\n return ret\n }\n\n return {} as Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n})\n\nconst slots = defineSlots<\n {\n form?: (props: {\n /** 表单数据 */\n data: Model['data']\n /** 表单模型 */\n model: Model\n /** 当前编辑的层级 */\n depth?: number\n /** 当前编辑的行 */\n row?: TableRow\n /** 当前编辑的行索引 */\n index?: number\n /** 操作的目标行索引路径 */\n indexes?: number[]\n }) => any\n\n header?: () => any\n } & Partial<{\n [key: `column:${string}`]: (props: TableColumnSlotsScope) => any\n }>\n>()\n\nconst cls = bem('batch-edit')\n\nconst tableRef = shallowRef<TableExposed>()\n\nconst editCtx = useEdit({ props, emit, tableRef })\n\nconst { state, handleClose, handleSave, handleDelete, handleCreate } = editCtx\n\nprovide(BatchEditDIKey, {\n cls,\n props,\n emit,\n tableRef,\n staticFeatures,\n dynamicFeatures,\n ...editCtx\n})\n\nconst dialogCtx = inject(DialogDIKey, undefined)\n\ndialogCtx &&\n watch(dialogCtx.visible, (visible) => {\n !visible && editCtx.handleClose()\n })\n\nconst cols = computed(() => {\n return !!state.row || state.visible ? props.cols : undefined\n})\n\n/**\n * 键盘快捷键:\n * - Esc 关闭表单\n * - ⌘/Ctrl + S 保存\n * - ⌘/Ctrl + Backspace 删除当前编辑行\n * - ⌘/Ctrl + N 新增(仅在不在表单中时)\n */\nfunction handleKeydown(e: KeyboardEvent) {\n if (props.readonly && e.key !== 'Escape') return\n\n if (e.key === 'Escape') {\n if (state.visible) {\n e.preventDefault()\n handleClose()\n }\n return\n }\n\n const meta = e.metaKey || e.ctrlKey\n if (!meta) return\n\n const key = e.key.toLowerCase()\n\n if (key === 's' && state.visible) {\n e.preventDefault()\n handleSave()\n return\n }\n\n if (e.key === 'Backspace' && state.row && state.type === 'update') {\n e.preventDefault()\n handleDelete(state.row)\n return\n }\n\n if (key === 'n' && !state.visible) {\n e.preventDefault()\n handleCreate()\n }\n}\n</script>\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"batch-edit.js","names":[],"sources":["../../../src/components/batch-edit/batch-edit.vue"],"sourcesContent":["<template>\n <u-layout\n :class=\"cls.b\"\n :cols=\"cols\"\n rows=\"100%\"\n gap=\"8px\"\n resizable\n @keydown=\"handleKeydown\"\n tabindex=\"-1\"\n >\n <!-- 编辑列表 -->\n <BatchEditList :slots=\"slots\" />\n\n <!-- 编辑表单 -->\n <BatchEditForm v-slot=\"scoped\">\n <!-- @vue-ignore -->\n <slot name=\"form\" v-bind=\"scoped\" />\n </BatchEditForm>\n </u-layout>\n</template>\n\n<script lang=\"ts\" setup generic=\"Model extends FormModel\">\nimport { bem } from '@veltra/utils'\nimport { computed, inject, provide, shallowRef, watch } from 'vue'\n\nimport type {\n BatchEditEmits,\n BatchEditFeature,\n BatchEditProps,\n TableColumnSlotsScope,\n TableExposed,\n TableRow\n} from '../../types'\nimport { DialogDIKey } from '../dialog/di'\nimport type { FormModel } from '../form'\nimport { ULayout } from '../layout'\nimport BatchEditForm from './batch-edit-form.vue'\nimport BatchEditList from './batch-edit-list.vue'\nimport { BatchEditDIKey } from './di'\nimport { useEdit } from './use-edit'\n\ndefineOptions({ name: 'BatchEdit' })\n\nconst props = withDefaults(defineProps<BatchEditProps<Model>>(), {\n cols: () => ['1fr', '420px'],\n mode: 'normal'\n})\n\nconst emit = defineEmits<BatchEditEmits>()\n\nconst staticFeatures = computed(() => {\n const { features } = props\n\n if (Array.isArray(features)) {\n return new Set(features)\n }\n\n const defaultFeatures = new Set<BatchEditFeature>(['create', 'delete', 'update', 'createChild'])\n\n if (!features) {\n return defaultFeatures\n }\n\n // 函数与 false 的特性视为关闭;显式 true 视为开启(即便不在默认集合内)\n Object.entries(features).forEach(([key, value]) => {\n const k = key as BatchEditFeature\n if (typeof value === 'function' || value === false) {\n defaultFeatures.delete(k)\n } else if (value === true) {\n defaultFeatures.add(k)\n }\n })\n return defaultFeatures\n})\n\nconst dynamicFeatures = computed<\n Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n>(() => {\n const { features } = props\n if (!Array.isArray(features) && typeof features === 'object') {\n const ret = Object.entries(features)\n .filter(([_, value]) => {\n return typeof value === 'function'\n })\n .reduce(\n (acc, [key, value]) => {\n acc[key] = value\n return acc\n },\n {} as Record<BatchEditFeature, (row?: TableRow) => boolean>\n )\n return ret\n }\n\n return {} as Record<BatchEditFeature, ((row?: TableRow) => boolean) | undefined>\n})\n\nconst slots = defineSlots<\n {\n form?: (props: {\n /** 表单数据 */\n data: Model['data']\n /** 表单模型 */\n model: Model\n /** 当前编辑的层级 */\n depth?: number\n /** 当前编辑的行 */\n row?: TableRow\n /** 当前编辑的行索引 */\n index?: number\n /** 操作的目标行索引路径 */\n indexes?: number[]\n }) => any\n\n header?: () => any\n } & Partial<{\n [key: `column:${string}`]: (props: TableColumnSlotsScope) => any\n }>\n>()\n\nconst cls = bem('batch-edit')\n\nconst tableRef = shallowRef<TableExposed>()\n\nconst editCtx = useEdit({ props, emit, tableRef })\n\nconst { state, handleClose, handleSave, handleDelete, handleCreate } = editCtx\n\nprovide(BatchEditDIKey, {\n cls,\n props,\n emit,\n tableRef,\n staticFeatures,\n dynamicFeatures,\n ...editCtx\n})\n\nconst dialogCtx = inject(DialogDIKey, undefined)\n\ndialogCtx &&\n watch(dialogCtx.visible, (visible) => {\n !visible && editCtx.handleClose()\n })\n\nconst cols = computed(() => {\n return !!state.row || state.visible ? props.cols : undefined\n})\n\n/**\n * 键盘快捷键:\n * - Esc 关闭表单\n * - ⌘/Ctrl + S 保存\n * - ⌘/Ctrl + Backspace 删除当前编辑行\n * - ⌘/Ctrl + N 新增(仅在不在表单中时)\n */\nfunction handleKeydown(e: KeyboardEvent) {\n if (props.readonly && e.key !== 'Escape') return\n\n if (e.key === 'Escape') {\n if (state.visible) {\n e.preventDefault()\n handleClose()\n }\n return\n }\n\n const meta = e.metaKey || e.ctrlKey\n if (!meta) return\n\n const key = e.key.toLowerCase()\n\n if (key === 's' && state.visible) {\n e.preventDefault()\n handleSave()\n return\n }\n\n if (e.key === 'Backspace' && state.row && state.type === 'update') {\n e.preventDefault()\n handleDelete(state.row)\n return\n }\n\n if (key === 'n' && !state.visible) {\n e.preventDefault()\n handleCreate()\n }\n}\n</script>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAKd,MAAM,OAAO;EAEb,MAAM,iBAAiB,eAAe;GACpC,MAAM,EAAE,aAAa;AAErB,OAAI,MAAM,QAAQ,SAAS,CACzB,QAAO,IAAI,IAAI,SAAQ;GAGzB,MAAM,kBAAkB,IAAI,IAAsB;IAAC;IAAU;IAAU;IAAU;IAAc,CAAA;AAE/F,OAAI,CAAC,SACH,QAAO;AAIT,UAAO,QAAQ,SAAS,CAAC,SAAS,CAAC,KAAK,WAAW;IACjD,MAAM,IAAI;AACV,QAAI,OAAO,UAAU,cAAc,UAAU,MAC3C,iBAAgB,OAAO,EAAC;aACf,UAAU,KACnB,iBAAgB,IAAI,EAAC;KAExB;AACD,UAAO;IACR;EAED,MAAM,kBAAkB,eAEhB;GACN,MAAM,EAAE,aAAa;AACrB,OAAI,CAAC,MAAM,QAAQ,SAAS,IAAI,OAAO,aAAa,SAYlD,QAXY,OAAO,QAAQ,SAAQ,CAChC,QAAQ,CAAC,GAAG,WAAW;AACtB,WAAO,OAAO,UAAU;KACzB,CACA,QACE,KAAK,C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;;2BAEI;KAAb,mBAAA,SAAa;KACb,YAAgC,aAAA,EAAT,OAAK,CAAA;KAE5B,mBAAA,SAAa;KACb,YAGgB,aAAA,MAAA;wBAHO,WAAM,CAC3B,mBAAA,gBAAoB,EACpB,WAAoC,KAAA,QAAA,QAAA,eAAA,mBAAV,OAAM,CAAA,CAAA,CAAA,CAAA"}
|
|
@@ -12,8 +12,8 @@ declare const __VLS_base: _$vue.DefineComponent<ButtonProps, _ButtonExposed, {},
|
|
|
12
12
|
onClick?: ((e: MouseEvent) => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
14
|
disabled: boolean;
|
|
15
|
-
iconPosition: "left" | "right";
|
|
16
15
|
loadingIcon: _$vue.Component;
|
|
16
|
+
iconPosition: "left" | "right";
|
|
17
17
|
propagate: boolean;
|
|
18
18
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
*/
|
|
17
17
|
/** 暗色:data-theme 与系统偏好,与 UITheme.injectBuiltInThemes 选择器策略一致 */
|
|
18
18
|
.u-button {
|
|
19
|
-
color: var(--u-text-color-main);
|
|
19
|
+
color: var(--u-button-default-color, var(--u-text-color-main));
|
|
20
|
+
box-sizing: border-box;
|
|
20
21
|
line-height: 1;
|
|
21
22
|
outline: none;
|
|
22
23
|
text-decoration: none;
|
|
@@ -26,8 +27,8 @@
|
|
|
26
27
|
cursor: pointer;
|
|
27
28
|
padding: 0 0.8em;
|
|
28
29
|
-webkit-appearance: none;
|
|
29
|
-
border:
|
|
30
|
-
background-color: var(--u-color-default);
|
|
30
|
+
border: 1px solid var(--u-button-default-border, transparent);
|
|
31
|
+
background-color: var(--u-button-default-bg, var(--u-color-default));
|
|
31
32
|
box-shadow: var(--u-shadow-emboss);
|
|
32
33
|
transition: background-color 0.25s, box-shadow 0.2s;
|
|
33
34
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
@@ -38,6 +39,10 @@
|
|
|
38
39
|
align-items: center;
|
|
39
40
|
flex-wrap: nowrap;
|
|
40
41
|
}
|
|
42
|
+
.u-button:hover {
|
|
43
|
+
background-color: var(--u-button-default-hover-bg, var(--u-color-default-dark-1));
|
|
44
|
+
border-color: var(--u-button-default-hover-border, transparent);
|
|
45
|
+
}
|
|
41
46
|
.u-button:active {
|
|
42
47
|
box-shadow: none;
|
|
43
48
|
}
|
|
@@ -104,10 +109,11 @@
|
|
|
104
109
|
}
|
|
105
110
|
.u-button--color-primary {
|
|
106
111
|
background-color: var(--u-color-primary);
|
|
107
|
-
color: var(--u-text-color-white);
|
|
112
|
+
color: var(--u-button-primary-text-color, var(--u-text-color-white));
|
|
108
113
|
}
|
|
109
114
|
.u-button--color-primary:hover {
|
|
110
|
-
background-color: var(--u-color-primary-dark-1);
|
|
115
|
+
background-color: var(--u-button-primary-hover-bg, var(--u-color-primary-dark-1));
|
|
116
|
+
color: var(--u-button-primary-hover-color, var(--u-button-primary-text-color, var(--u-text-color-white)));
|
|
111
117
|
}
|
|
112
118
|
.u-button--color-primary.is-disabled {
|
|
113
119
|
background-color: var(--u-color-primary-light-5);
|
|
@@ -129,7 +135,7 @@
|
|
|
129
135
|
box-shadow: 0px 0px 0px 1px var(--u-color-primary);
|
|
130
136
|
}
|
|
131
137
|
.u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-primary.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
132
|
-
background-color: var(--u-color-primary-light-9);
|
|
138
|
+
background-color: var(--u-button-primary-plain-bg, var(--u-color-primary-light-9));
|
|
133
139
|
}
|
|
134
140
|
.u-button--color-primary.is-text.is-disabled {
|
|
135
141
|
color: var(--u-color-primary-light-5);
|
|
@@ -138,9 +144,9 @@
|
|
|
138
144
|
color: var(--u-color-primary-light-5);
|
|
139
145
|
}
|
|
140
146
|
.u-button--color-primary.is-plain {
|
|
141
|
-
color: var(--u-color-primary);
|
|
142
|
-
background-color: var(--u-color-primary-light-9);
|
|
143
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-primary-light-5);
|
|
147
|
+
color: var(--u-button-primary-plain-color, var(--u-color-primary));
|
|
148
|
+
background-color: var(--u-button-primary-plain-bg, var(--u-color-primary-light-9));
|
|
149
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-primary-plain-shadow, var(--u-color-primary-light-5));
|
|
144
150
|
}
|
|
145
151
|
.u-button--color-primary.is-plain:active {
|
|
146
152
|
box-shadow: none;
|
|
@@ -154,10 +160,11 @@
|
|
|
154
160
|
}
|
|
155
161
|
.u-button--color-success {
|
|
156
162
|
background-color: var(--u-color-success);
|
|
157
|
-
color: var(--u-text-color-white);
|
|
163
|
+
color: var(--u-button-success-text-color, var(--u-text-color-white));
|
|
158
164
|
}
|
|
159
165
|
.u-button--color-success:hover {
|
|
160
|
-
background-color: var(--u-color-success-dark-1);
|
|
166
|
+
background-color: var(--u-button-success-hover-bg, var(--u-color-success-dark-1));
|
|
167
|
+
color: var(--u-button-success-hover-color, var(--u-button-success-text-color, var(--u-text-color-white)));
|
|
161
168
|
}
|
|
162
169
|
.u-button--color-success.is-disabled {
|
|
163
170
|
background-color: var(--u-color-success-light-5);
|
|
@@ -179,7 +186,7 @@
|
|
|
179
186
|
box-shadow: 0px 0px 0px 1px var(--u-color-success);
|
|
180
187
|
}
|
|
181
188
|
.u-button--color-success.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-success.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
182
|
-
background-color: var(--u-color-success-light-9);
|
|
189
|
+
background-color: var(--u-button-success-plain-bg, var(--u-color-success-light-9));
|
|
183
190
|
}
|
|
184
191
|
.u-button--color-success.is-text.is-disabled {
|
|
185
192
|
color: var(--u-color-success-light-5);
|
|
@@ -188,9 +195,9 @@
|
|
|
188
195
|
color: var(--u-color-success-light-5);
|
|
189
196
|
}
|
|
190
197
|
.u-button--color-success.is-plain {
|
|
191
|
-
color: var(--u-color-success);
|
|
192
|
-
background-color: var(--u-color-success-light-9);
|
|
193
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-success-light-5);
|
|
198
|
+
color: var(--u-button-success-plain-color, var(--u-color-success));
|
|
199
|
+
background-color: var(--u-button-success-plain-bg, var(--u-color-success-light-9));
|
|
200
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-success-plain-shadow, var(--u-color-success-light-5));
|
|
194
201
|
}
|
|
195
202
|
.u-button--color-success.is-plain:active {
|
|
196
203
|
box-shadow: none;
|
|
@@ -204,10 +211,11 @@
|
|
|
204
211
|
}
|
|
205
212
|
.u-button--color-warning {
|
|
206
213
|
background-color: var(--u-color-warning);
|
|
207
|
-
color: var(--u-text-color-white);
|
|
214
|
+
color: var(--u-button-warning-text-color, var(--u-text-color-white));
|
|
208
215
|
}
|
|
209
216
|
.u-button--color-warning:hover {
|
|
210
|
-
background-color: var(--u-color-warning-dark-1);
|
|
217
|
+
background-color: var(--u-button-warning-hover-bg, var(--u-color-warning-dark-1));
|
|
218
|
+
color: var(--u-button-warning-hover-color, var(--u-button-warning-text-color, var(--u-text-color-white)));
|
|
211
219
|
}
|
|
212
220
|
.u-button--color-warning.is-disabled {
|
|
213
221
|
background-color: var(--u-color-warning-light-5);
|
|
@@ -229,7 +237,7 @@
|
|
|
229
237
|
box-shadow: 0px 0px 0px 1px var(--u-color-warning);
|
|
230
238
|
}
|
|
231
239
|
.u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-warning.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
232
|
-
background-color: var(--u-color-warning-light-9);
|
|
240
|
+
background-color: var(--u-button-warning-plain-bg, var(--u-color-warning-light-9));
|
|
233
241
|
}
|
|
234
242
|
.u-button--color-warning.is-text.is-disabled {
|
|
235
243
|
color: var(--u-color-warning-light-5);
|
|
@@ -238,9 +246,9 @@
|
|
|
238
246
|
color: var(--u-color-warning-light-5);
|
|
239
247
|
}
|
|
240
248
|
.u-button--color-warning.is-plain {
|
|
241
|
-
color: var(--u-color-warning);
|
|
242
|
-
background-color: var(--u-color-warning-light-9);
|
|
243
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-warning-light-5);
|
|
249
|
+
color: var(--u-button-warning-plain-color, var(--u-color-warning));
|
|
250
|
+
background-color: var(--u-button-warning-plain-bg, var(--u-color-warning-light-9));
|
|
251
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-warning-plain-shadow, var(--u-color-warning-light-5));
|
|
244
252
|
}
|
|
245
253
|
.u-button--color-warning.is-plain:active {
|
|
246
254
|
box-shadow: none;
|
|
@@ -254,10 +262,11 @@
|
|
|
254
262
|
}
|
|
255
263
|
.u-button--color-danger {
|
|
256
264
|
background-color: var(--u-color-danger);
|
|
257
|
-
color: var(--u-text-color-white);
|
|
265
|
+
color: var(--u-button-danger-text-color, var(--u-text-color-white));
|
|
258
266
|
}
|
|
259
267
|
.u-button--color-danger:hover {
|
|
260
|
-
background-color: var(--u-color-danger-dark-1);
|
|
268
|
+
background-color: var(--u-button-danger-hover-bg, var(--u-color-danger-dark-1));
|
|
269
|
+
color: var(--u-button-danger-hover-color, var(--u-button-danger-text-color, var(--u-text-color-white)));
|
|
261
270
|
}
|
|
262
271
|
.u-button--color-danger.is-disabled {
|
|
263
272
|
background-color: var(--u-color-danger-light-5);
|
|
@@ -279,7 +288,7 @@
|
|
|
279
288
|
box-shadow: 0px 0px 0px 1px var(--u-color-danger);
|
|
280
289
|
}
|
|
281
290
|
.u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-danger.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
282
|
-
background-color: var(--u-color-danger-light-9);
|
|
291
|
+
background-color: var(--u-button-danger-plain-bg, var(--u-color-danger-light-9));
|
|
283
292
|
}
|
|
284
293
|
.u-button--color-danger.is-text.is-disabled {
|
|
285
294
|
color: var(--u-color-danger-light-5);
|
|
@@ -288,9 +297,9 @@
|
|
|
288
297
|
color: var(--u-color-danger-light-5);
|
|
289
298
|
}
|
|
290
299
|
.u-button--color-danger.is-plain {
|
|
291
|
-
color: var(--u-color-danger);
|
|
292
|
-
background-color: var(--u-color-danger-light-9);
|
|
293
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-danger-light-5);
|
|
300
|
+
color: var(--u-button-danger-plain-color, var(--u-color-danger));
|
|
301
|
+
background-color: var(--u-button-danger-plain-bg, var(--u-color-danger-light-9));
|
|
302
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-danger-plain-shadow, var(--u-color-danger-light-5));
|
|
294
303
|
}
|
|
295
304
|
.u-button--color-danger.is-plain:active {
|
|
296
305
|
box-shadow: none;
|
|
@@ -304,10 +313,11 @@
|
|
|
304
313
|
}
|
|
305
314
|
.u-button--color-info {
|
|
306
315
|
background-color: var(--u-color-info);
|
|
307
|
-
color: var(--u-text-color-white);
|
|
316
|
+
color: var(--u-button-info-text-color, var(--u-text-color-white));
|
|
308
317
|
}
|
|
309
318
|
.u-button--color-info:hover {
|
|
310
|
-
background-color: var(--u-color-info-dark-1);
|
|
319
|
+
background-color: var(--u-button-info-hover-bg, var(--u-color-info-dark-1));
|
|
320
|
+
color: var(--u-button-info-hover-color, var(--u-button-info-text-color, var(--u-text-color-white)));
|
|
311
321
|
}
|
|
312
322
|
.u-button--color-info.is-disabled {
|
|
313
323
|
background-color: var(--u-color-info-light-5);
|
|
@@ -329,7 +339,7 @@
|
|
|
329
339
|
box-shadow: 0px 0px 0px 1px var(--u-color-info);
|
|
330
340
|
}
|
|
331
341
|
.u-button--color-info.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-info.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
332
|
-
background-color: var(--u-color-info-light-9);
|
|
342
|
+
background-color: var(--u-button-info-plain-bg, var(--u-color-info-light-9));
|
|
333
343
|
}
|
|
334
344
|
.u-button--color-info.is-text.is-disabled {
|
|
335
345
|
color: var(--u-color-info-light-5);
|
|
@@ -338,9 +348,9 @@
|
|
|
338
348
|
color: var(--u-color-info-light-5);
|
|
339
349
|
}
|
|
340
350
|
.u-button--color-info.is-plain {
|
|
341
|
-
color: var(--u-color-info);
|
|
342
|
-
background-color: var(--u-color-info-light-9);
|
|
343
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-info-light-5);
|
|
351
|
+
color: var(--u-button-info-plain-color, var(--u-color-info));
|
|
352
|
+
background-color: var(--u-button-info-plain-bg, var(--u-color-info-light-9));
|
|
353
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-info-plain-shadow, var(--u-color-info-light-5));
|
|
344
354
|
}
|
|
345
355
|
.u-button--color-info.is-plain:active {
|
|
346
356
|
box-shadow: none;
|
|
@@ -354,10 +364,11 @@
|
|
|
354
364
|
}
|
|
355
365
|
.u-button--color-disabled {
|
|
356
366
|
background-color: var(--u-color-disabled);
|
|
357
|
-
color: var(--u-text-color-white);
|
|
367
|
+
color: var(--u-button-disabled-text-color, var(--u-text-color-white));
|
|
358
368
|
}
|
|
359
369
|
.u-button--color-disabled:hover {
|
|
360
|
-
background-color: var(--u-color-disabled-dark-1);
|
|
370
|
+
background-color: var(--u-button-disabled-hover-bg, var(--u-color-disabled-dark-1));
|
|
371
|
+
color: var(--u-button-disabled-hover-color, var(--u-button-disabled-text-color, var(--u-text-color-white)));
|
|
361
372
|
}
|
|
362
373
|
.u-button--color-disabled.is-disabled {
|
|
363
374
|
background-color: var(--u-color-disabled-light-5);
|
|
@@ -379,7 +390,7 @@
|
|
|
379
390
|
box-shadow: 0px 0px 0px 1px var(--u-color-disabled);
|
|
380
391
|
}
|
|
381
392
|
.u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-disabled.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
382
|
-
background-color: var(--u-color-disabled-light-9);
|
|
393
|
+
background-color: var(--u-button-disabled-plain-bg, var(--u-color-disabled-light-9));
|
|
383
394
|
}
|
|
384
395
|
.u-button--color-disabled.is-text.is-disabled {
|
|
385
396
|
color: var(--u-color-disabled-light-5);
|
|
@@ -388,9 +399,9 @@
|
|
|
388
399
|
color: var(--u-color-disabled-light-5);
|
|
389
400
|
}
|
|
390
401
|
.u-button--color-disabled.is-plain {
|
|
391
|
-
color: var(--u-color-disabled);
|
|
392
|
-
background-color: var(--u-color-disabled-light-9);
|
|
393
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-disabled-light-5);
|
|
402
|
+
color: var(--u-button-disabled-plain-color, var(--u-color-disabled));
|
|
403
|
+
background-color: var(--u-button-disabled-plain-bg, var(--u-color-disabled-light-9));
|
|
404
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-disabled-plain-shadow, var(--u-color-disabled-light-5));
|
|
394
405
|
}
|
|
395
406
|
.u-button--color-disabled.is-plain:active {
|
|
396
407
|
box-shadow: none;
|
|
@@ -404,10 +415,11 @@
|
|
|
404
415
|
}
|
|
405
416
|
.u-button--color-default {
|
|
406
417
|
background-color: var(--u-color-default);
|
|
407
|
-
color: var(--u-text-color-white);
|
|
418
|
+
color: var(--u-button-default-text-color, var(--u-text-color-white));
|
|
408
419
|
}
|
|
409
420
|
.u-button--color-default:hover {
|
|
410
|
-
background-color: var(--u-color-default-dark-1);
|
|
421
|
+
background-color: var(--u-button-default-hover-bg, var(--u-color-default-dark-1));
|
|
422
|
+
color: var(--u-button-default-hover-color, var(--u-button-default-text-color, var(--u-text-color-white)));
|
|
411
423
|
}
|
|
412
424
|
.u-button--color-default.is-disabled {
|
|
413
425
|
background-color: var(--u-color-default-light-5);
|
|
@@ -429,7 +441,7 @@
|
|
|
429
441
|
box-shadow: 0px 0px 0px 1px var(--u-color-default);
|
|
430
442
|
}
|
|
431
443
|
.u-button--color-default.is-text:not(.is-disabled):not(.is-loading):hover, .u-button--color-default.is-text:not(.is-disabled):not(.is-loading):focus {
|
|
432
|
-
background-color: var(--u-color-default-light-9);
|
|
444
|
+
background-color: var(--u-button-default-plain-bg, var(--u-color-default-light-9));
|
|
433
445
|
}
|
|
434
446
|
.u-button--color-default.is-text.is-disabled {
|
|
435
447
|
color: var(--u-color-default-light-5);
|
|
@@ -438,9 +450,9 @@
|
|
|
438
450
|
color: var(--u-color-default-light-5);
|
|
439
451
|
}
|
|
440
452
|
.u-button--color-default.is-plain {
|
|
441
|
-
color: var(--u-color-default);
|
|
442
|
-
background-color: var(--u-color-default-light-9);
|
|
443
|
-
box-shadow: 0px 0px 2px 1px var(--u-color-default-light-5);
|
|
453
|
+
color: var(--u-button-default-plain-color, var(--u-color-default));
|
|
454
|
+
background-color: var(--u-button-default-plain-bg, var(--u-color-default-light-9));
|
|
455
|
+
box-shadow: 0px 0px 2px 1px var(--u-button-default-plain-shadow, var(--u-color-default-light-5));
|
|
444
456
|
}
|
|
445
457
|
.u-button--color-default.is-plain:active {
|
|
446
458
|
box-shadow: none;
|
|
@@ -4,24 +4,24 @@ import * as _$vue from "vue";
|
|
|
4
4
|
//#region src/components/cascade/cascade.vue.d.ts
|
|
5
5
|
declare const __VLS_export: _$vue.DefineComponent<CascadeProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {} & {
|
|
6
6
|
"update:modelValue": (value?: string | string[] | undefined) => any;
|
|
7
|
-
clear: () => any;
|
|
8
7
|
change: (...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any;
|
|
8
|
+
clear: () => any;
|
|
9
9
|
}, string, _$vue.PublicProps, Readonly<CascadeProps> & Readonly<{
|
|
10
10
|
"onUpdate:modelValue"?: ((value?: string | string[] | undefined) => any) | undefined;
|
|
11
|
-
onClear?: (() => any) | undefined;
|
|
12
11
|
onChange?: ((...args: [value?: string | undefined, label?: string | undefined, item?: Record<string, any> | undefined] | [value: string[], label: string[], data: Record<string, any>[]]) => any) | undefined;
|
|
12
|
+
onClear?: (() => any) | undefined;
|
|
13
13
|
}>, {
|
|
14
|
+
disabled: boolean;
|
|
14
15
|
labelKey: string;
|
|
15
16
|
valueKey: string;
|
|
16
17
|
childrenKey: string;
|
|
17
18
|
data: Record<string, any>[];
|
|
18
|
-
disabled: boolean;
|
|
19
19
|
readonly: boolean;
|
|
20
20
|
placeholder: string;
|
|
21
21
|
clearable: boolean;
|
|
22
|
+
separator: string;
|
|
22
23
|
filterable: boolean;
|
|
23
24
|
visibilityLimit: number;
|
|
24
|
-
separator: string;
|
|
25
25
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
26
26
|
declare const _default: typeof __VLS_export;
|
|
27
27
|
//#endregion
|
|
@@ -127,7 +127,8 @@
|
|
|
127
127
|
margin-bottom: 0.2rem;
|
|
128
128
|
}
|
|
129
129
|
.u-cascade-panel-item__option.is-active {
|
|
130
|
-
background-color: var(--u-color-primary-light-9);
|
|
130
|
+
background-color: var(--u-cascade-node-active-bg, var(--u-color-primary-light-9));
|
|
131
|
+
color: var(--u-cascade-node-active-color, var(--u-color-primary));
|
|
131
132
|
border-radius: var(--u-radius-default);
|
|
132
133
|
}
|
|
133
134
|
.u-cascade-panel-item__option.is-selected {
|
|
@@ -20,8 +20,8 @@ declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {
|
|
|
20
20
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
21
21
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
22
22
|
}>, {
|
|
23
|
-
type: _$_veltra_utils0.ColorType;
|
|
24
23
|
disabled: boolean;
|
|
24
|
+
type: _$_veltra_utils0.ColorType;
|
|
25
25
|
readonly: boolean;
|
|
26
26
|
round: boolean;
|
|
27
27
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
.u-checkbox__wrap {
|
|
75
75
|
border: var(--u-border-width) var(--u-border-style) var(--u-checkbox-border, #ccc);
|
|
76
76
|
border-radius: 6px;
|
|
77
|
-
color: #fff;
|
|
77
|
+
color: var(--u-checkbox-color, #fff);
|
|
78
78
|
transition: background-color 0.15s ease;
|
|
79
79
|
display: inline-flex;
|
|
80
80
|
justify-content: center;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
line-height: 1em;
|
|
86
86
|
}
|
|
87
87
|
.u-checkbox--indeterminate {
|
|
88
|
-
background-color: #fff;
|
|
88
|
+
background-color: var(--u-checkbox-color, #fff);
|
|
89
89
|
width: 10px;
|
|
90
90
|
height: 2px;
|
|
91
91
|
vertical-align: middle;
|
|
@@ -14,9 +14,9 @@ declare const __VLS_export: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {},
|
|
|
14
14
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
15
|
"onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
+
disabled: boolean;
|
|
17
18
|
labelKey: string;
|
|
18
19
|
valueKey: string;
|
|
19
|
-
disabled: boolean;
|
|
20
20
|
readonly: boolean;
|
|
21
21
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -13,9 +13,9 @@ declare const __VLS_base: _$vue.DefineComponent<CollapseProps, _CollapseExposed,
|
|
|
13
13
|
"onUpdate:modelValue"?: ((value: CollapseModelValue) => any) | undefined;
|
|
14
14
|
onChange?: ((value: CollapseModelValue) => any) | undefined;
|
|
15
15
|
}>, {
|
|
16
|
+
iconPosition: CollapseIconPosition;
|
|
16
17
|
accordion: boolean;
|
|
17
18
|
bordered: boolean;
|
|
18
|
-
iconPosition: CollapseIconPosition;
|
|
19
19
|
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
20
20
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
21
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: _$vue.DefineComponent<DatePickerProps, {}, {}, {}, {
|
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DatePickerProps> & Readonly<{
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: string | number | Date | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
type: "date" | "month" | "year";
|
|
11
10
|
disabled: boolean;
|
|
11
|
+
type: "date" | "month" | "year";
|
|
12
12
|
readonly: boolean;
|
|
13
13
|
placeholder: string;
|
|
14
14
|
clearable: boolean;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: _$vue.DefineComponent<DateRangePickerProps, {}, {},
|
|
|
7
7
|
}, string, _$vue.PublicProps, Readonly<DateRangePickerProps> & Readonly<{
|
|
8
8
|
"onUpdate:modelValue"?: ((value?: [string, string] | undefined) => any) | undefined;
|
|
9
9
|
}>, {
|
|
10
|
-
type: "date" | "month" | "year";
|
|
11
10
|
disabled: boolean;
|
|
11
|
+
type: "date" | "month" | "year";
|
|
12
12
|
readonly: boolean;
|
|
13
13
|
placeholder: [string, string];
|
|
14
14
|
clearable: boolean;
|
|
@@ -14,12 +14,12 @@ type __VLS_Slots = {} & {
|
|
|
14
14
|
declare const __VLS_base: _$vue.DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: boolean) => any;
|
|
16
16
|
} & {
|
|
17
|
-
"update:modelValue": (value: boolean) => any;
|
|
18
17
|
close: () => any;
|
|
18
|
+
"update:modelValue": (value: boolean) => any;
|
|
19
19
|
closed: () => any;
|
|
20
20
|
}, string, _$vue.PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
21
|
-
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
22
21
|
onClose?: (() => any) | undefined;
|
|
22
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
23
23
|
onClosed?: (() => any) | undefined;
|
|
24
24
|
}>, {
|
|
25
25
|
direction: DrawerDirection;
|