@vipl520/dk-ui 1.0.76 → 1.0.77

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/dist/attributes.json +8 -0
  2. package/dist/index.css +1 -1
  3. package/dist/index.js +285 -12
  4. package/dist/index.min.js +5 -5
  5. package/dist/index.min.js.map +1 -1
  6. package/dist/index.min.mjs +5 -5
  7. package/dist/index.min.mjs.map +1 -1
  8. package/dist/index.mjs +282 -11
  9. package/dist/tags.json +7 -0
  10. package/dist/web-types.json +34 -0
  11. package/es/index.d.ts +1 -0
  12. package/es/index.mjs +4 -1
  13. package/es/index.mjs.map +1 -1
  14. package/es/index.scss +1 -0
  15. package/es/style-custom-input/style/index.scss +0 -1
  16. package/es/table-form/index.d.ts +53 -0
  17. package/es/table-form/index.mjs +8 -0
  18. package/es/table-form/index.mjs.map +1 -0
  19. package/es/table-form/src/props.d.ts +23 -0
  20. package/es/table-form/src/props.mjs +26 -0
  21. package/es/table-form/src/props.mjs.map +1 -0
  22. package/es/table-form/src/table-form.vue.d.ts +52 -0
  23. package/es/table-form/src/table-form.vue.mjs +7 -0
  24. package/es/table-form/src/table-form.vue.mjs.map +1 -0
  25. package/es/table-form/src/table-form.vue2.mjs +250 -0
  26. package/es/table-form/src/table-form.vue2.mjs.map +1 -0
  27. package/es/table-form/style/index.css +1 -0
  28. package/es/table-form/style/index.scss +110 -0
  29. package/lib/index.d.ts +1 -0
  30. package/lib/index.js +187 -182
  31. package/lib/index.js.map +1 -1
  32. package/lib/index.scss +1 -0
  33. package/lib/style-custom-input/style/index.scss +0 -1
  34. package/lib/table-form/index.d.ts +53 -0
  35. package/lib/table-form/index.js +14 -0
  36. package/lib/table-form/index.js.map +1 -0
  37. package/lib/table-form/src/props.d.ts +23 -0
  38. package/lib/table-form/src/props.js +28 -0
  39. package/lib/table-form/src/props.js.map +1 -0
  40. package/lib/table-form/src/table-form.vue.d.ts +52 -0
  41. package/lib/table-form/src/table-form.vue.js +11 -0
  42. package/lib/table-form/src/table-form.vue.js.map +1 -0
  43. package/lib/table-form/src/table-form.vue2.js +254 -0
  44. package/lib/table-form/src/table-form.vue2.js.map +1 -0
  45. package/lib/table-form/style/index.css +1 -0
  46. package/lib/table-form/style/index.scss +110 -0
  47. package/package.json +1 -1
@@ -0,0 +1,52 @@
1
+ declare const _default: import("vue").DefineComponent<{
2
+ formCreateInject: ObjectConstructor;
3
+ modelValue: {
4
+ type: ArrayConstructor;
5
+ default: () => never[];
6
+ };
7
+ columns: {
8
+ type: ArrayConstructor;
9
+ required: boolean;
10
+ default: () => never[];
11
+ };
12
+ options: {
13
+ type: ObjectConstructor;
14
+ default: () => {
15
+ submitBtn: boolean;
16
+ resetBtn: boolean;
17
+ };
18
+ };
19
+ max: NumberConstructor;
20
+ disabled: BooleanConstructor;
21
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "change" | "delete" | "add")[], "update:modelValue" | "change" | "delete" | "add", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
22
+ formCreateInject: ObjectConstructor;
23
+ modelValue: {
24
+ type: ArrayConstructor;
25
+ default: () => never[];
26
+ };
27
+ columns: {
28
+ type: ArrayConstructor;
29
+ required: boolean;
30
+ default: () => never[];
31
+ };
32
+ options: {
33
+ type: ObjectConstructor;
34
+ default: () => {
35
+ submitBtn: boolean;
36
+ resetBtn: boolean;
37
+ };
38
+ };
39
+ max: NumberConstructor;
40
+ disabled: BooleanConstructor;
41
+ }>> & {
42
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
43
+ onChange?: ((...args: any[]) => any) | undefined;
44
+ onDelete?: ((...args: any[]) => any) | undefined;
45
+ onAdd?: ((...args: any[]) => any) | undefined;
46
+ }, {
47
+ modelValue: unknown[];
48
+ disabled: boolean;
49
+ options: Record<string, any>;
50
+ columns: unknown[];
51
+ }, {}>;
52
+ export default _default;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var tableForm_vue_vue_type_script_setup_true_lang = require('./table-form.vue2.js');
6
+ var _pluginVue_exportHelper = require('../../_virtual/_plugin-vue_export-helper.js');
7
+
8
+ var _TableForm = /* @__PURE__ */ _pluginVue_exportHelper.default(tableForm_vue_vue_type_script_setup_true_lang.default, [["__file", "E:\\project\\monster-admin\\system\\dkgs-ui-back\\packages\\dk-ui\\src\\table-form\\src\\table-form.vue"]]);
9
+
10
+ exports.default = _TableForm;
11
+ //# sourceMappingURL=table-form.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-form.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -0,0 +1,254 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var vue = require('vue');
6
+ var formCreate = require('@form-create/element-ui');
7
+ var props = require('./props.js');
8
+
9
+ const __default__ = vue.defineComponent({
10
+ name: "DkTableForm"
11
+ });
12
+ var _sfc_main = /* @__PURE__ */ vue.defineComponent({
13
+ ...__default__,
14
+ props: props.tableFormProps,
15
+ emits: ["change", "add", "delete", "update:modelValue"],
16
+ setup(__props, { emit }) {
17
+ const props = __props;
18
+ const rule = vue.ref([]);
19
+ const trs = vue.ref([]);
20
+ const fapi = vue.ref({});
21
+ const Form = vue.markRaw(props.formCreateInject?.form?.$form() || {});
22
+ const copyTrs = vue.ref("");
23
+ const oldValue = vue.ref("");
24
+ const formChange = (field, _, rule2, api, flag) => {
25
+ if (!flag) {
26
+ updateValue();
27
+ }
28
+ };
29
+ const updateValue = () => {
30
+ const value = trs.value.map((tr, idx) => ({
31
+ // Vue: Spread types may only be created from object types.
32
+ ...props.modelValue[idx] || {},
33
+ ...fapi.value.getChildrenFormData(tr)
34
+ })).filter((v) => {
35
+ if (v === void 0 || v === null) {
36
+ return false;
37
+ }
38
+ let flag = false;
39
+ Object.keys(v).forEach((k) => {
40
+ flag = flag || v[k] !== void 0 && v[k] !== "" && v[k] !== null;
41
+ });
42
+ return flag;
43
+ });
44
+ const str = JSON.stringify(value);
45
+ if (str !== oldValue.value) {
46
+ oldValue.value = str;
47
+ emit("update:modelValue", value);
48
+ emit("change", value);
49
+ }
50
+ };
51
+ const setRawData = (idx, formData) => {
52
+ const raw = trs.value[idx];
53
+ fapi.value.setChildrenFormData(raw, formData, true);
54
+ };
55
+ const updateTable = () => {
56
+ const str = JSON.stringify(props.modelValue);
57
+ if (oldValue.value === str) {
58
+ return;
59
+ }
60
+ oldValue.value = str;
61
+ trs.value.splice(0, trs.value.length, ...props.modelValue.map(() => null));
62
+ if (!props.modelValue.length) {
63
+ addRaw();
64
+ }
65
+ props.modelValue.forEach((data, idx) => {
66
+ if (!trs.value[idx]) {
67
+ addRaw();
68
+ }
69
+ setRawData(idx, data);
70
+ });
71
+ rule.value[0].children[1].children = trs.value;
72
+ };
73
+ const delRaw = (idx) => {
74
+ if (props.disabled) {
75
+ return;
76
+ }
77
+ trs.value.splice(idx, 1);
78
+ updateValue();
79
+ if (trs.value.length) {
80
+ trs.value.forEach(updateRaw);
81
+ } else {
82
+ addRaw();
83
+ }
84
+ emit("delete", idx);
85
+ };
86
+ const addRaw = (flag = false) => {
87
+ if (flag && props.disabled) {
88
+ return;
89
+ }
90
+ const tr = formCreate.parseJson(copyTrs.value)[0];
91
+ trs.value.push(tr);
92
+ updateRaw(tr);
93
+ if (flag)
94
+ emit("add", trs.value.length);
95
+ };
96
+ const updateRaw = (tr) => {
97
+ const idx = trs.value.indexOf(tr);
98
+ tr.children[0].props.innerText = idx + 1;
99
+ tr.children[tr.children.length - 1].children[0].props.onClick = () => {
100
+ delRaw(idx);
101
+ };
102
+ };
103
+ const loadRule = () => {
104
+ const header = [
105
+ {
106
+ type: "th",
107
+ native: true,
108
+ class: "dk-tf-head-idx",
109
+ props: {
110
+ innerText: "#"
111
+ }
112
+ }
113
+ ];
114
+ const body = [
115
+ {
116
+ type: "td",
117
+ class: "dk-tf-idx",
118
+ native: true,
119
+ props: {
120
+ innerText: "0"
121
+ }
122
+ }
123
+ ];
124
+ props.columns.forEach((column) => {
125
+ header.push({
126
+ type: "th",
127
+ native: true,
128
+ style: column.style,
129
+ props: {
130
+ innerText: column.label || ""
131
+ }
132
+ });
133
+ body.push({
134
+ type: "td",
135
+ native: true,
136
+ children: [...column.rule || []]
137
+ });
138
+ });
139
+ header.push({
140
+ type: "th",
141
+ native: true,
142
+ class: "dk-tf-edit fc-clock",
143
+ props: {
144
+ innerText: "\u64CD\u4F5C"
145
+ }
146
+ });
147
+ body.push({
148
+ type: "td",
149
+ native: true,
150
+ class: "dk-tf-btn fc-clock",
151
+ children: [
152
+ {
153
+ type: "dk-icon",
154
+ native: true,
155
+ class: "fc-icon icon-delete",
156
+ props: {
157
+ icon: "DeleteFilled"
158
+ }
159
+ }
160
+ ]
161
+ });
162
+ copyTrs.value = formCreate.toJson([
163
+ {
164
+ type: "tr",
165
+ native: true,
166
+ subRule: true,
167
+ children: body
168
+ }
169
+ ]);
170
+ rule.value = [
171
+ {
172
+ type: "table",
173
+ native: true,
174
+ class: "dk-tf-table",
175
+ props: {
176
+ border: "1",
177
+ cellspacing: "0",
178
+ cellpadding: "0"
179
+ },
180
+ children: [
181
+ {
182
+ type: "thead",
183
+ native: true,
184
+ children: [
185
+ {
186
+ type: "tr",
187
+ native: true,
188
+ children: header
189
+ }
190
+ ]
191
+ },
192
+ {
193
+ type: "tbody",
194
+ native: true,
195
+ children: trs.value
196
+ }
197
+ ]
198
+ }
199
+ ];
200
+ addRaw();
201
+ };
202
+ vue.watch(() => props.modelValue, updateTable, { deep: true });
203
+ vue.onMounted(() => {
204
+ loadRule();
205
+ updateTable();
206
+ });
207
+ return (_ctx, _cache) => {
208
+ const _component_dk_icon = vue.resolveComponent("dk-icon");
209
+ const _component_el_button = vue.resolveComponent("el-button");
210
+ return vue.openBlock(), vue.createElementBlock(
211
+ "div",
212
+ {
213
+ class: vue.normalizeClass(["dk-table-form", { "dk-disabled": _ctx.disabled }])
214
+ },
215
+ [
216
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(vue.unref(Form)), {
217
+ api: fapi.value,
218
+ "onUpdate:api": _cache[0] || (_cache[0] = ($event) => fapi.value = $event),
219
+ option: _ctx.options,
220
+ rule: rule.value,
221
+ "extend-option": true,
222
+ disabled: _ctx.disabled,
223
+ onChange: formChange,
224
+ onEmitEvent: _ctx.$emit
225
+ }, null, 40, ["api", "option", "rule", "disabled", "onEmitEvent"])),
226
+ !_ctx.max || _ctx.max > trs.value.length ? (vue.openBlock(), vue.createBlock(_component_el_button, {
227
+ key: 0,
228
+ link: "",
229
+ type: "primary",
230
+ class: "fc-clock",
231
+ onClick: _cache[1] || (_cache[1] = ($event) => addRaw(true))
232
+ }, {
233
+ default: vue.withCtx(() => [
234
+ vue.createElementVNode("span", null, [
235
+ vue.createVNode(_component_dk_icon, {
236
+ icon: "CirclePlusFilled",
237
+ size: 14
238
+ }),
239
+ vue.createTextVNode(" \u6DFB\u52A0")
240
+ ])
241
+ ]),
242
+ _: 1
243
+ /* STABLE */
244
+ })) : vue.createCommentVNode("v-if", true)
245
+ ],
246
+ 2
247
+ /* CLASS */
248
+ );
249
+ };
250
+ }
251
+ });
252
+
253
+ exports.default = _sfc_main;
254
+ //# sourceMappingURL=table-form.vue2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"table-form.vue2.js","sources":["../../../src/table-form/src/table-form.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { defineComponent as __MACROS_defineComponent } from \"vue\";\nexport default /*#__PURE__*/ __MACROS_defineComponent({\n name: 'DkTableForm',\n});\n</script>\n<template>\n <div class=\"dk-table-form\" :class=\"{ 'dk-disabled': disabled }\">\n <component\n :is=\"Form\"\n v-model:api=\"fapi\"\n :option=\"options\"\n :rule=\"rule\"\n :extend-option=\"true\"\n :disabled=\"disabled\"\n @change=\"formChange\"\n @emit-event=\"$emit\"\n ></component>\n <el-button v-if=\"!max || max > trs.length\" link type=\"primary\" class=\"fc-clock\" @click=\"addRaw(true)\">\n <span> <dk-icon icon=\"CirclePlusFilled\" :size=\"14\"></dk-icon> 添加</span>\n </el-button>\n </div>\n</template>\n\n<script lang=\"ts\" setup>\nimport { ref, watch, onMounted, markRaw } from 'vue'\nimport formCreate from '@form-create/element-ui' // 根据实际情况调整导入路径\nimport { tableFormProps } from './props'\n\n\n\nconst props = defineProps(tableFormProps)\n\n// 定义事件发射器\nconst emit = defineEmits(['change', 'add', 'delete', 'update:modelValue'])\n\n// 初始化数据\nconst rule: any = ref([])\n// const trs = ref([])\nconst trs = ref<((typeof props.modelValue)[number] | null)[]>([])\nconst fapi: any = ref({})\nconst Form = markRaw(props.formCreateInject?.form?.$form() || {})\nconst copyTrs = ref('')\nconst oldValue = ref('')\n\n// 方法定义\nconst formChange = (field: any, _: any, rule: any, api: any, flag: boolean) => {\n if (!flag) {\n updateValue()\n }\n}\n\nconst updateValue = () => {\n const value = trs.value\n .map((tr: any, idx: number) => ({\n // Vue: Spread types may only be created from object types.\n ...((props.modelValue[idx] as Record<string, any>) || {}),\n ...fapi.value.getChildrenFormData(tr),\n }))\n .filter((v) => {\n if (v === undefined || v === null) {\n return false\n }\n let flag = false\n Object.keys(v).forEach((k) => {\n flag = flag || (v[k] !== undefined && v[k] !== '' && v[k] !== null)\n })\n return flag\n })\n\n const str = JSON.stringify(value)\n if (str !== oldValue.value) {\n oldValue.value = str\n emit('update:modelValue', value)\n emit('change', value)\n }\n}\n\nconst setRawData = (idx: number, formData: any) => {\n const raw = trs.value[idx]\n fapi.value.setChildrenFormData(raw, formData, true)\n}\n\nconst updateTable = () => {\n const str = JSON.stringify(props.modelValue)\n // 定义 trs 的类型为 modelValue 中元素的类型或 null\n if (oldValue.value === str) {\n return\n }\n oldValue.value = str\n // trs.value.splice(0, trs.value.length, ...props.modelValue.map(() => null))\n trs.value.splice(0, trs.value.length, ...props.modelValue.map(() => null as any))\n if (!props.modelValue.length) {\n addRaw()\n }\n props.modelValue.forEach((data: any, idx: number) => {\n if (!trs.value[idx]) {\n addRaw()\n }\n setRawData(idx, data)\n })\n rule.value[0].children[1].children = trs.value\n}\n\nconst delRaw = (idx: number) => {\n if (props.disabled) {\n return\n }\n trs.value.splice(idx, 1)\n updateValue()\n if (trs.value.length) {\n trs.value.forEach(updateRaw)\n } else {\n addRaw()\n }\n emit('delete', idx)\n}\n\nconst addRaw = (flag: boolean = false) => {\n if (flag && props.disabled) {\n return\n }\n const tr = formCreate.parseJson(copyTrs.value)[0]\n trs.value.push(tr)\n updateRaw(tr)\n if (flag) emit('add', trs.value.length)\n}\n\nconst updateRaw = (tr: any) => {\n const idx = trs.value.indexOf(tr)\n tr.children[0].props.innerText = idx + 1\n tr.children[tr.children.length - 1].children[0].props.onClick = () => {\n delRaw(idx)\n }\n}\n\nconst loadRule = () => {\n const header: any = [\n {\n type: 'th',\n native: true,\n class: 'dk-tf-head-idx',\n props: {\n innerText: '#',\n },\n },\n ]\n const body: any = [\n {\n type: 'td',\n class: 'dk-tf-idx',\n native: true,\n props: {\n innerText: '0',\n },\n },\n ]\n\n props.columns.forEach((column: any) => {\n header.push({\n type: 'th',\n native: true,\n style: column.style,\n props: {\n innerText: column.label || '',\n },\n })\n body.push({\n type: 'td',\n native: true,\n children: [...(column.rule || [])],\n })\n })\n\n header.push({\n type: 'th',\n native: true,\n class: 'dk-tf-edit fc-clock',\n props: {\n innerText: '操作',\n },\n })\n\n body.push({\n type: 'td',\n native: true,\n class: 'dk-tf-btn fc-clock',\n children: [\n {\n type: 'dk-icon',\n native: true,\n class: 'fc-icon icon-delete',\n props: {\n icon: 'DeleteFilled',\n },\n },\n ],\n })\n\n copyTrs.value = formCreate.toJson([\n {\n type: 'tr',\n native: true,\n subRule: true,\n children: body,\n },\n ])\n\n rule.value = [\n {\n type: 'table',\n native: true,\n class: 'dk-tf-table',\n props: {\n border: '1',\n cellspacing: '0',\n cellpadding: '0',\n },\n children: [\n {\n type: 'thead',\n native: true,\n children: [\n {\n type: 'tr',\n native: true,\n children: header,\n },\n ],\n },\n {\n type: 'tbody',\n native: true,\n children: trs.value,\n },\n ],\n },\n ]\n\n addRaw()\n}\n\n// 监听和生命周期钩子\nwatch(() => props.modelValue, updateTable, { deep: true })\n\nonMounted(() => {\n loadRule()\n updateTable()\n})\n</script>\n"],"names":["__MACROS_defineComponent","ref","markRaw","rule","watch","onMounted"],"mappings":";;;;;;;;AAEA,MAA6B,cAAAA,mBAAyB,CAAA;AAAA,EACpD,IAAM,EAAA,aAAA;AACR,CAAC,CAAA,CAAA;;;;;;;AAiCD,IAAM,MAAA,IAAA,GAAYC,OAAI,CAAA,EAAE,CAAA,CAAA;AAExB,IAAM,MAAA,GAAA,GAAMA,OAAkD,CAAA,EAAE,CAAA,CAAA;AAChE,IAAM,MAAA,IAAA,GAAYA,OAAI,CAAA,EAAE,CAAA,CAAA;AACxB,IAAM,MAAA,IAAA,GAAOC,YAAQ,KAAM,CAAA,gBAAA,EAAkB,MAAM,KAAM,EAAA,IAAK,EAAE,CAAA,CAAA;AAChE,IAAM,MAAA,OAAA,GAAUD,QAAI,EAAE,CAAA,CAAA;AACtB,IAAM,MAAA,QAAA,GAAWA,QAAI,EAAE,CAAA,CAAA;AAGvB,IAAA,MAAM,aAAa,CAAC,KAAA,EAAY,CAAQE,EAAAA,KAAAA,EAAW,KAAU,IAAkB,KAAA;AAC7E,MAAA,IAAI,CAAC,IAAM,EAAA;AACT,QAAY,WAAA,EAAA,CAAA;AAAA,OACd;AAAA,KACF,CAAA;AAEA,IAAA,MAAM,cAAc,MAAM;AACxB,MAAA,MAAM,QAAQ,GAAI,CAAA,KAAA,CACf,GAAI,CAAA,CAAC,IAAS,GAAiB,MAAA;AAAA;AAAA,QAE9B,GAAK,KAAA,CAAM,UAAW,CAAA,GAAG,KAA6B,EAAC;AAAA,QACvD,GAAG,IAAA,CAAK,KAAM,CAAA,mBAAA,CAAoB,EAAE,CAAA;AAAA,OACpC,CAAA,CAAA,CAC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.form-create .el-form-item.is-error{margin-bottom:22px}.dk-table-form .form-create .el-form-item__label{display:none!important}.dk-table-form .form-create .el-form-item__content{display:flex;margin-left:0!important;width:100%!important}.dk-table-form .dk-tf-head-idx,.dk-table-form .dk-tf-idx{width:40px;min-width:40px;font-weight:500;text-align:center}.dk-table-form .dk-tf-btn,.dk-table-form .dk-tf-edit{width:70px;min-width:70px;text-align:center}.dk-table-form .dk-tf-btn .fc-icon,.dk-table-form .dk-tf-edit .fc-icon{cursor:pointer}.dk-table-form.dk-disabled .dk-tf-btn .fc-icon,.dk-table-form.dk-disabled>.el-button{cursor:not-allowed}.dk-table-form .dk-tf-table{width:100%;height:100%;overflow:hidden;table-layout:fixed;border:1px solid #ebeef5;border-bottom:0 none}.dk-table-form .dk-tf-table thead tr th{border:0 none;border-bottom:1px solid #ebeef5;height:40px;font-weight:500}.dk-table-form .dk-tf-table thead tr th:not(:first-child){border-left:1px solid #ebeef5}.dk-table-form .dk-tf-table tr{min-height:50px}.dk-table-form .dk-tf-table .dk-read-view{text-align:center;width:100%}.dk-table-form .dk-tf-table td{padding:5px;min-height:50px;min-width:80px;position:relative;box-sizing:border-box;overflow-wrap:break-word;overflow:hidden;border:0 none;border-bottom:1px solid #ebeef5}.dk-table-form .dk-tf-table td:not(:first-child){border-left:1px solid #ebeef5}.dk-table-form .dk-tf-table td .el-cascader,.dk-table-form .dk-tf-table td .el-date-editor,.dk-table-form .dk-tf-table td .el-input-number,.dk-table-form .dk-tf-table td .el-select,.dk-table-form .dk-tf-table td .el-slider{width:100%}
@@ -0,0 +1,110 @@
1
+ /* stylelint-disable */
2
+ .dk-table-form {
3
+ overflow: auto;
4
+ color: #666666;
5
+
6
+ .form-create {
7
+ .el-form-item {
8
+ margin-bottom: 1px;
9
+
10
+ &.is-error {
11
+ margin-bottom: 22px;
12
+ }
13
+
14
+ &__label {
15
+ display: none !important;
16
+ }
17
+
18
+ &__content {
19
+ display: flex;
20
+ margin-left: 0px !important;
21
+ width: 100% !important;
22
+ }
23
+ }
24
+ }
25
+
26
+ .dk-tf-head-idx,
27
+ .dk-tf-idx {
28
+ width: 40px;
29
+ min-width: 40px;
30
+ font-weight: 500;
31
+ text-align: center;
32
+ }
33
+
34
+ .dk-tf-edit,
35
+ .dk-tf-btn {
36
+ width: 70px;
37
+ min-width: 70px;
38
+ text-align: center;
39
+
40
+ .fc-icon {
41
+ cursor: pointer;
42
+ }
43
+ }
44
+
45
+ &.dk-disabled {
46
+ .dk-tf-btn .fc-icon,
47
+ > .el-button {
48
+ cursor: not-allowed;
49
+ }
50
+ }
51
+
52
+ .dk-tf-table {
53
+ width: 100%;
54
+ height: 100%;
55
+ overflow: hidden;
56
+ table-layout: fixed;
57
+ border: 1px solid #EBEEF5;
58
+ border-bottom: 0 none;
59
+
60
+ thead {
61
+ tr {
62
+ th {
63
+ border: 0 none;
64
+ border-bottom: 1px solid #EBEEF5;
65
+ height: 40px;
66
+ font-weight: 500;
67
+
68
+ &:not(:first-child) {
69
+ border-left: 1px solid #EBEEF5;
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ tr {
76
+ min-height: 50px;
77
+ }
78
+
79
+ .dk-read-view {
80
+ text-align: center;
81
+ width: 100%;
82
+ }
83
+
84
+ td {
85
+ padding: 5px;
86
+ min-height: 50px;
87
+ min-width: 80px;
88
+ position: relative;
89
+ box-sizing: border-box;
90
+ overflow-wrap: break-word;
91
+ // white-space: nowrap;
92
+ overflow: hidden;
93
+ border: 0 none;
94
+ border-bottom: 1px solid #EBEEF5;
95
+
96
+ &:not(:first-child) {
97
+ border-left: 1px solid #EBEEF5;
98
+ }
99
+
100
+ .el-input-number,
101
+ .el-select,
102
+ .el-slider,
103
+ .el-cascader,
104
+ .el-date-editor {
105
+ width: 100%;
106
+ }
107
+ }
108
+ }
109
+ }
110
+ /* stylelint-enable */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vipl520/dk-ui",
3
- "version": "1.0.76",
3
+ "version": "1.0.77",
4
4
  "description": "多客怪兽框架核心组件,支持diy、crud动态表格、上传组件等",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.mjs",