@ctzy-web-client/plugin-component-vue 1.0.22 → 1.0.24

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.
Files changed (132) hide show
  1. package/es/advance-select/advance-operation.mjs +51 -37
  2. package/es/advance-select/advance-option.mjs +167 -97
  3. package/es/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.mjs +7 -0
  4. package/es/advance-select/advance-select.mjs +368 -310
  5. package/es/advance-select/index.mjs +5 -5
  6. package/es/application-slot/breadcrumb-item.mjs +20 -17
  7. package/es/application-slot/header-tools-item.mjs +20 -17
  8. package/es/breadcrumb-select/breadcrumb-select.mjs +134 -112
  9. package/es/contextmenu/contextmenu-item.mjs +19 -15
  10. package/es/contextmenu/contextmenu.mjs +72 -56
  11. package/es/data-form/data-form-item.mjs +48 -30
  12. package/es/data-form/data-form.mjs +213 -166
  13. package/es/data-form/form-components/bwa-date-picker.mjs +51 -39
  14. package/es/data-form/form-components/bwa-date-time-picker.mjs +56 -44
  15. package/es/data-form/form-components/bwa-input-float.mjs +48 -37
  16. package/es/data-form/form-components/bwa-input-integer.mjs +68 -50
  17. package/es/data-form/form-components/bwa-input.mjs +43 -32
  18. package/es/data-form/form-components/bwa-multi-select.mjs +40 -29
  19. package/es/data-form/form-components/bwa-rich-text-tinymce.mjs +554 -218
  20. package/es/data-form/form-components/bwa-rich-text.mjs +404 -316
  21. package/es/data-form/form-components/bwa-select.mjs +84 -70
  22. package/es/data-form/form-components/bwa-textarea.mjs +38 -27
  23. package/es/data-form/form-components/bwa-upload.mjs +172 -148
  24. package/es/data-form/form-components/bwa-user-multi-select.mjs +35 -24
  25. package/es/data-form/form-components/bwa-user-select.mjs +86 -61
  26. package/es/data-table/data-column-view.mjs +146 -115
  27. package/es/data-table/data-table-card.mjs +48 -40
  28. package/es/data-table/data-table-column.mjs +58 -45
  29. package/es/data-table/data-table.mjs +402 -316
  30. package/es/datatable-settings/datatable-settings.mjs +329 -254
  31. package/es/date-range/date-picker.mjs +130 -116
  32. package/es/date-range/date-range.mjs +215 -168
  33. package/es/drag-list/drag-item.mjs +56 -42
  34. package/es/drag-list/drag-list.mjs +60 -47
  35. package/es/dragable/dragable-item.mjs +23 -18
  36. package/es/dragable/dragable-operation.mjs +32 -24
  37. package/es/dragable/dragable.mjs +32 -23
  38. package/es/filter-panel/conditions/date-range-condition.mjs +50 -40
  39. package/es/filter-panel/conditions/department-condition/department-condition.mjs +99 -72
  40. package/es/filter-panel/conditions/department-condition/department-node.mjs +73 -59
  41. package/es/filter-panel/conditions/input-condition.mjs +90 -76
  42. package/es/filter-panel/conditions/multi-user-condition.mjs +67 -57
  43. package/es/filter-panel/conditions/multiple-menu-condition.mjs +54 -35
  44. package/es/filter-panel/conditions/single-menu-condition.mjs +65 -60
  45. package/es/filter-panel/conditions/single-user-condition.mjs +67 -57
  46. package/es/filter-panel/filter-panel-item.mjs +54 -39
  47. package/es/filter-panel/filter-panel.mjs +153 -135
  48. package/es/layout/layout.mjs +85 -78
  49. package/es/menu/menu-item.mjs +67 -52
  50. package/es/menu/menu.mjs +70 -53
  51. package/es/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.mjs +28 -0
  52. package/es/panel/panel.mjs +53 -40
  53. package/es/pct-filter-panel/pct-compents/pct-Input-condition.mjs +74 -63
  54. package/es/pct-filter-panel/pct-compents/pct-date-range-condition.mjs +76 -67
  55. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition.mjs +406 -178
  56. package/es/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.mjs +153 -138
  57. package/es/pct-filter-panel/pct-filter-panel-item.mjs +55 -40
  58. package/es/pct-filter-panel/pct-filter-panel.mjs +247 -227
  59. package/es/progress/progress-item.mjs +81 -61
  60. package/es/progress/progress.mjs +78 -64
  61. package/es/where-filter-panel/where-filter-panel.mjs +15 -12
  62. package/lib/advance-select/advance-operation.js +50 -36
  63. package/lib/advance-select/advance-option.js +166 -96
  64. package/lib/advance-select/advance-option.vue_vue_type_style_index_0_scoped_bc8f5626_lang.js +12 -0
  65. package/lib/advance-select/advance-select.js +366 -308
  66. package/lib/application-slot/breadcrumb-item.js +19 -16
  67. package/lib/application-slot/header-tools-item.js +19 -16
  68. package/lib/breadcrumb-select/breadcrumb-select.js +133 -111
  69. package/lib/contextmenu/contextmenu-item.js +18 -14
  70. package/lib/contextmenu/contextmenu.js +71 -55
  71. package/lib/data-form/data-form-item.js +47 -29
  72. package/lib/data-form/data-form.js +212 -165
  73. package/lib/data-form/form-components/bwa-date-picker.js +50 -38
  74. package/lib/data-form/form-components/bwa-date-time-picker.js +55 -43
  75. package/lib/data-form/form-components/bwa-input-float.js +47 -36
  76. package/lib/data-form/form-components/bwa-input-integer.js +67 -49
  77. package/lib/data-form/form-components/bwa-input.js +42 -31
  78. package/lib/data-form/form-components/bwa-multi-select.js +39 -28
  79. package/lib/data-form/form-components/bwa-rich-text-tinymce.js +553 -217
  80. package/lib/data-form/form-components/bwa-rich-text.js +403 -315
  81. package/lib/data-form/form-components/bwa-select.js +83 -69
  82. package/lib/data-form/form-components/bwa-textarea.js +37 -26
  83. package/lib/data-form/form-components/bwa-upload.js +171 -147
  84. package/lib/data-form/form-components/bwa-user-multi-select.js +34 -23
  85. package/lib/data-form/form-components/bwa-user-select.js +85 -60
  86. package/lib/data-table/data-column-view.js +146 -115
  87. package/lib/data-table/data-table-card.js +48 -40
  88. package/lib/data-table/data-table-column.js +57 -44
  89. package/lib/data-table/data-table.js +401 -315
  90. package/lib/datatable-settings/datatable-settings.js +328 -253
  91. package/lib/date-range/date-picker.js +129 -115
  92. package/lib/date-range/date-range.js +213 -170
  93. package/lib/drag-list/drag-item.js +55 -41
  94. package/lib/drag-list/drag-list.js +59 -46
  95. package/lib/dragable/dragable-item.js +22 -17
  96. package/lib/dragable/dragable-operation.js +31 -23
  97. package/lib/dragable/dragable.js +31 -22
  98. package/lib/filter-panel/conditions/date-range-condition.js +49 -39
  99. package/lib/filter-panel/conditions/department-condition/department-condition.js +98 -71
  100. package/lib/filter-panel/conditions/department-condition/department-node.js +72 -58
  101. package/lib/filter-panel/conditions/input-condition.js +89 -75
  102. package/lib/filter-panel/conditions/multi-user-condition.js +66 -56
  103. package/lib/filter-panel/conditions/multiple-menu-condition.js +53 -34
  104. package/lib/filter-panel/conditions/single-menu-condition.js +64 -59
  105. package/lib/filter-panel/conditions/single-user-condition.js +66 -56
  106. package/lib/filter-panel/filter-panel-item.js +53 -38
  107. package/lib/filter-panel/filter-panel.js +152 -134
  108. package/lib/layout/layout.js +84 -77
  109. package/lib/menu/menu-item.js +66 -51
  110. package/lib/menu/menu.js +69 -52
  111. package/lib/node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js +32 -0
  112. package/lib/panel/panel.js +52 -39
  113. package/lib/pct-filter-panel/pct-compents/pct-Input-condition.js +73 -62
  114. package/lib/pct-filter-panel/pct-compents/pct-date-range-condition.js +75 -66
  115. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition.js +405 -177
  116. package/lib/pct-filter-panel/pct-compents/pct-multiple-menu-condition2.js +152 -137
  117. package/lib/pct-filter-panel/pct-filter-panel-item.js +54 -39
  118. package/lib/pct-filter-panel/pct-filter-panel.js +246 -226
  119. package/lib/progress/progress-item.js +80 -60
  120. package/lib/progress/progress.js +77 -63
  121. package/lib/where-filter-panel/where-filter-panel.js +14 -11
  122. package/package.json +2 -1
  123. package/src/advance-select/advance-option.vue +64 -13
  124. package/src/data-form/form-components/bwa-rich-text-tinymce.vue +1 -1
  125. package/src/datatable-settings/datatable-settings.vue +33 -3
  126. package/src/date-range/date-picker.vue +1 -1
  127. package/src/date-range/date-range.vue +3 -3
  128. package/src/filter-panel/filter-panel.vue +2 -2
  129. package/src/pct-filter-panel/pct-compents/pct-Input-condition.vue +64 -64
  130. package/src/pct-filter-panel/pct-compents/pct-date-range-condition.vue +61 -61
  131. package/src/pct-filter-panel/pct-compents/pct-multiple-menu-condition.vue +302 -178
  132. package/src/pct-filter-panel/pct-filter-panel.vue +4 -4
package/es/menu/menu.mjs CHANGED
@@ -1,60 +1,77 @@
1
- import { defineComponent, resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createElementBlock, Fragment, renderList } from 'vue';
1
+ import { resolveComponent, openBlock, createBlock, normalizeClass, unref, withCtx, createElementBlock, Fragment, renderList } from 'vue';
2
2
  import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
3
3
  import MenuItem from './menu-item.mjs';
4
4
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
5
5
 
6
- const __default__ = defineComponent({
7
- name: "BwaMenu"
8
- });
9
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
10
- props: {
11
- currentMenuID: String,
12
- menus: {
13
- type: Array,
14
- default: () => []
15
- },
16
- collapsed: { type: Boolean, default: false }
17
- },
18
- emits: ["select"],
6
+ const _sfc_main = {
7
+ __name: 'menu',
8
+ props: {
9
+ currentMenuID: String,
10
+ menus: {
11
+ type: Array,
12
+ default: () => [],
13
+ },
14
+ collapsed: { type: Boolean, default: false },
15
+ },
16
+ emits: ['select'],
19
17
  setup(__props, { emit }) {
20
- const props = __props;
21
- const ns = useNamespace("menu");
22
- const getMenuById = (id) => {
23
- const menus = props.menus || [];
24
- let list = [...menus];
25
- for (let i = 0; i < list.length; i++) {
26
- const item = list[i];
27
- if (item.id === id) {
28
- return item;
29
- }
30
- list = list.concat(item.children || []);
31
- }
32
- return null;
33
- };
34
- const handleSelect = (id) => {
35
- emit("select", getMenuById(id));
36
- };
37
- return (_ctx, _cache) => {
38
- const _component_ElMenu = resolveComponent("ElMenu");
39
- return openBlock(), createBlock(_component_ElMenu, {
40
- "default-active": __props.currentMenuID,
41
- class: normalizeClass([unref(ns).b(), __props.collapsed ? unref(ns).m("collapsed") : ""]),
42
- collapse: __props.collapsed,
43
- onSelect: handleSelect
44
- }, {
45
- default: withCtx(() => [
46
- (openBlock(true), createElementBlock(Fragment, null, renderList(__props.menus, (item) => {
47
- return openBlock(), createBlock(MenuItem, {
48
- key: item.id,
49
- item
50
- }, null, 8, ["item"]);
51
- }), 128))
52
- ]),
53
- _: 1
54
- }, 8, ["default-active", "class", "collapse"]);
55
- };
56
- }
57
- });
58
- var Menu = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "menu.vue"]]);
18
+
19
+ const props = __props;
20
+
21
+ defineOptions({
22
+ name: 'BwaMenu',
23
+ });
24
+
25
+
26
+
27
+
28
+
29
+ const ns = useNamespace('menu');
30
+
31
+ const getMenuById = (id) => {
32
+ const menus = props.menus || [];
33
+
34
+ let list = [...menus];
35
+ for (let i = 0; i < list.length; i++) {
36
+ const item = list[i];
37
+
38
+ if (item.id === id) {
39
+ return item;
40
+ }
41
+
42
+ list = list.concat(item.children || []);
43
+ }
44
+
45
+ return null;
46
+ };
47
+
48
+ const handleSelect = (id) => {
49
+ emit('select', getMenuById(id));
50
+ };
51
+
52
+ return (_ctx, _cache) => {
53
+ const _component_ElMenu = resolveComponent("ElMenu");
54
+
55
+ return (openBlock(), createBlock(_component_ElMenu, {
56
+ "default-active": __props.currentMenuID,
57
+ class: normalizeClass([unref(ns).b(), __props.collapsed ? unref(ns).m('collapsed') : '']),
58
+ collapse: __props.collapsed,
59
+ onSelect: handleSelect
60
+ }, {
61
+ default: withCtx(() => [
62
+ (openBlock(true), createElementBlock(Fragment, null, renderList(__props.menus, (item) => {
63
+ return (openBlock(), createBlock(MenuItem, {
64
+ key: item.id,
65
+ item: item
66
+ }, null, 8 /* PROPS */, ["item"]))
67
+ }), 128 /* KEYED_FRAGMENT */))
68
+ ]),
69
+ _: 1 /* STABLE */
70
+ }, 8 /* PROPS */, ["default-active", "class", "collapse"]))
71
+ }
72
+ }
73
+
74
+ };
75
+ var Menu = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"menu.vue"]]);
59
76
 
60
77
  export { Menu as default };
@@ -0,0 +1,28 @@
1
+ function styleInject(css, ref) {
2
+ if ( ref === void 0 ) ref = {};
3
+ var insertAt = ref.insertAt;
4
+
5
+ if (!css || typeof document === 'undefined') { return; }
6
+
7
+ var head = document.head || document.getElementsByTagName('head')[0];
8
+ var style = document.createElement('style');
9
+ style.type = 'text/css';
10
+
11
+ if (insertAt === 'top') {
12
+ if (head.firstChild) {
13
+ head.insertBefore(style, head.firstChild);
14
+ } else {
15
+ head.appendChild(style);
16
+ }
17
+ } else {
18
+ head.appendChild(style);
19
+ }
20
+
21
+ if (style.styleSheet) {
22
+ style.styleSheet.cssText = css;
23
+ } else {
24
+ style.appendChild(document.createTextNode(css));
25
+ }
26
+ }
27
+
28
+ export { styleInject as default };
@@ -1,55 +1,68 @@
1
- import { defineComponent, useSlots, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createCommentVNode, createElementVNode } from 'vue';
1
+ import { useSlots, openBlock, createElementBlock, normalizeClass, unref, renderSlot, createCommentVNode, createElementVNode } from 'vue';
2
2
  import { useNamespace } from '@ctzy-web-client/web-base-client-vue';
3
3
  import _export_sfc from '../_virtual/_plugin-vue_export-helper.mjs';
4
4
 
5
- const __default__ = defineComponent({
6
- name: "BwaPanel"
7
- });
8
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
9
- props: {
10
- name: {
11
- type: String
12
- },
13
- label: {
14
- type: String,
15
- default: ""
16
- }
17
- },
5
+ const _sfc_main = {
6
+ __name: 'panel',
7
+ props: {
8
+ name: {
9
+ type: String,
10
+ },
11
+ label: {
12
+ type: String,
13
+ default: '',
14
+ },
15
+ },
18
16
  setup(__props) {
19
- ;
20
- const ns = useNamespace("panel");
21
- const slots = useSlots();
22
- return (_ctx, _cache) => {
23
- return openBlock(), createElementBlock("div", {
24
- class: normalizeClass(unref(ns).b())
25
- }, [
26
- unref(slots).header ? (openBlock(), createElementBlock("div", {
17
+
18
+ defineOptions({
19
+ name: 'BwaPanel',
20
+ });
21
+
22
+
23
+
24
+ const ns = useNamespace('panel');
25
+
26
+ const slots = useSlots();
27
+
28
+ return (_ctx, _cache) => {
29
+ return (openBlock(), createElementBlock("div", {
30
+ class: normalizeClass(unref(ns).b())
31
+ }, [
32
+ (unref(slots).header)
33
+ ? (openBlock(), createElementBlock("div", {
27
34
  key: 0,
28
- class: normalizeClass(unref(ns).e("header"))
35
+ class: normalizeClass(unref(ns).e('header'))
29
36
  }, [
30
37
  renderSlot(_ctx.$slots, "header")
31
- ], 2)) : createCommentVNode("v-if", true),
32
- unref(slots).tools ? (openBlock(), createElementBlock("div", {
38
+ ], 2 /* CLASS */))
39
+ : createCommentVNode("v-if", true),
40
+ (unref(slots).tools)
41
+ ? (openBlock(), createElementBlock("div", {
33
42
  key: 1,
34
- class: normalizeClass(unref(ns).e("tools"))
43
+ class: normalizeClass(unref(ns).e('tools'))
35
44
  }, [
36
45
  renderSlot(_ctx.$slots, "tools")
37
- ], 2)) : createCommentVNode("v-if", true),
38
- createElementVNode("div", {
39
- class: normalizeClass(unref(ns).e("body"))
40
- }, [
41
- renderSlot(_ctx.$slots, "default")
42
- ], 2),
43
- unref(slots).footer ? (openBlock(), createElementBlock("div", {
46
+ ], 2 /* CLASS */))
47
+ : createCommentVNode("v-if", true),
48
+ createElementVNode("div", {
49
+ class: normalizeClass(unref(ns).e('body'))
50
+ }, [
51
+ renderSlot(_ctx.$slots, "default")
52
+ ], 2 /* CLASS */),
53
+ (unref(slots).footer)
54
+ ? (openBlock(), createElementBlock("div", {
44
55
  key: 2,
45
- class: normalizeClass(unref(ns).e("footer"))
56
+ class: normalizeClass(unref(ns).e('footer'))
46
57
  }, [
47
58
  renderSlot(_ctx.$slots, "footer")
48
- ], 2)) : createCommentVNode("v-if", true)
49
- ], 2);
50
- };
51
- }
52
- });
53
- var Panel = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "panel.vue"]]);
59
+ ], 2 /* CLASS */))
60
+ : createCommentVNode("v-if", true)
61
+ ], 2 /* CLASS */))
62
+ }
63
+ }
64
+
65
+ };
66
+ var Panel = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"panel.vue"]]);
54
67
 
55
68
  export { Panel as default };
@@ -1,71 +1,82 @@
1
- import { defineComponent, inject, computed, useAttrs, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createVNode, isRef } from 'vue';
1
+ import { inject, computed, useAttrs, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createVNode, isRef } from 'vue';
2
2
  import { useNamespace, filterPanelItemKey } from '@ctzy-web-client/web-base-client-vue';
3
3
  import { dataProps } from '../../hooks/use-data/index.mjs';
4
4
  import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
5
5
 
6
- const __default__ = defineComponent({
7
- name: "BwaPctInputCondition",
8
- __conditionTitle__: "\u8F93\u5165\u6846",
9
- __conditionDefault__: () => []
10
- });
11
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
12
- props: {
13
- ...dataProps,
14
- modelValue: {
15
- type: null
16
- },
17
- placeholder: {
18
- type: String,
19
- default: "\u8BF7\u8F93\u5165"
20
- },
21
- prefixIcon: {
22
- type: String,
23
- default: "Search"
24
- },
25
- showIcon: {
26
- type: Boolean,
27
- default: false
28
- }
29
- },
30
- emits: ["update:modelValue"],
6
+ const _sfc_main = {
7
+ __name: 'pct-Input-condition',
8
+ props: {
9
+ ...dataProps,
10
+ modelValue: {
11
+ type: null,
12
+ },
13
+ placeholder: {
14
+ type: String,
15
+ default: '请输入',
16
+ },
17
+ prefixIcon: {
18
+ type: String,
19
+ default: 'Search',
20
+ },
21
+ showIcon: {
22
+ type: Boolean,
23
+ default: false,
24
+ }
25
+ },
26
+ emits: ['update:modelValue'],
31
27
  setup(__props, { emit }) {
32
- const props = __props;
33
- const ns = useNamespace("pct-input");
34
- ;
35
- const filterPanelItem = inject(filterPanelItemKey, null);
36
- const column = computed(() => {
37
- var _a;
38
- return (_a = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a : null;
39
- });
40
- const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title);
41
- const attrs = useAttrs();
42
- const showTitle = computed(() => attrs.showTitle);
43
- const modelValue = computed({
44
- get: () => props.modelValue,
45
- set: (v) => emit("update:modelValue", v)
46
- });
47
- return (_ctx, _cache) => {
48
- const _component_el_input = resolveComponent("el-input");
49
- return openBlock(), createElementBlock("div", {
50
- class: normalizeClass(unref(ns).e("inputCon"))
51
- }, [
52
- unref(showTitle) ? (openBlock(), createElementBlock("span", {
28
+
29
+ const props = __props;
30
+
31
+ const ns = useNamespace('pct-input');
32
+
33
+ defineOptions({
34
+ name: 'BwaPctInputCondition',
35
+ __conditionTitle__: '输入框',
36
+ __conditionDefault__: () => [],
37
+ });
38
+
39
+
40
+
41
+ const filterPanelItem = inject(filterPanelItemKey, null);
42
+ const column = computed(() => filterPanelItem?.column ?? null);
43
+
44
+ const placeholderStr = computed(() => showTitle.value ? props.placeholder : column.value.title);
45
+
46
+ const attrs = useAttrs();
47
+ const showTitle = computed(() => attrs.showTitle);
48
+
49
+
50
+ const modelValue = computed({
51
+ get: () => props.modelValue,
52
+ set: (v) => emit('update:modelValue', v),
53
+ });
54
+
55
+ return (_ctx, _cache) => {
56
+ const _component_el_input = resolveComponent("el-input");
57
+
58
+ return (openBlock(), createElementBlock("div", {
59
+ class: normalizeClass(unref(ns).e('inputCon'))
60
+ }, [
61
+ (unref(showTitle))
62
+ ? (openBlock(), createElementBlock("span", {
53
63
  key: 0,
54
- class: normalizeClass(unref(ns).e("title"))
55
- }, toDisplayString(unref(column).title), 3)) : createCommentVNode("v-if", true),
56
- createVNode(_component_el_input, {
57
- "prefix-icon": __props.showIcon ? __props.prefixIcon : "",
58
- size: "small",
59
- clearable: "",
60
- class: normalizeClass(unref(ns).e("search")),
61
- placeholder: unref(placeholderStr),
62
- modelValue: unref(modelValue),
63
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(modelValue) ? modelValue.value = $event : null)
64
- }, null, 8, ["prefix-icon", "class", "placeholder", "modelValue"])
65
- ], 2);
66
- };
67
- }
68
- });
69
- var PctInputCondition = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "pct-Input-condition.vue"]]);
64
+ class: normalizeClass(unref(ns).e('title'))
65
+ }, toDisplayString(unref(column).title), 3 /* TEXT, CLASS */))
66
+ : createCommentVNode("v-if", true),
67
+ createVNode(_component_el_input, {
68
+ "prefix-icon": __props.showIcon ? __props.prefixIcon : '',
69
+ clearable: "",
70
+ class: normalizeClass(unref(ns).e('search')),
71
+ placeholder: unref(placeholderStr),
72
+ modelValue: unref(modelValue),
73
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(modelValue) ? (modelValue).value = $event : null))
74
+ }, null, 8 /* PROPS */, ["prefix-icon", "class", "placeholder", "modelValue"])
75
+ ], 2 /* CLASS */))
76
+ }
77
+ }
78
+
79
+ };
80
+ var PctInputCondition = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"pct-Input-condition.vue"]]);
70
81
 
71
82
  export { PctInputCondition as default };
@@ -1,74 +1,83 @@
1
- import { defineComponent, inject, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createVNode, isRef } from 'vue';
1
+ import { inject, computed, resolveComponent, openBlock, createElementBlock, normalizeClass, unref, toDisplayString, createCommentVNode, createVNode, isRef } from 'vue';
2
2
  import { useNamespace, filterPanelItemKey } from '@ctzy-web-client/web-base-client-vue';
3
3
  import _export_sfc from '../../_virtual/_plugin-vue_export-helper.mjs';
4
4
 
5
- const __default__ = defineComponent({
6
- name: "BwaPctDateRangeCondition",
7
- __conditionTitle__: "\u65E5\u671F\u9009\u62E9",
8
- __conditionDefault__: () => ({ start: "", end: "" })
9
- });
10
- const _sfc_main = /* @__PURE__ */ Object.assign(__default__, {
11
- props: {
12
- modelValue: {
13
- type: null
14
- },
15
- valueFormat: {
16
- type: String,
17
- default: "YYYY-MM-DD"
18
- },
19
- showTitle: {
20
- type: Boolean,
21
- default: false
22
- }
23
- },
24
- emits: ["update:modelValue"],
5
+ const _sfc_main = {
6
+ __name: 'pct-date-range-condition',
7
+ props: {
8
+ modelValue: {
9
+ type: null,
10
+ },
11
+ valueFormat: {
12
+ type: String,
13
+ default: 'YYYY-MM-DD',
14
+ },
15
+ showTitle: {
16
+ type: Boolean,
17
+ default: false
18
+ }
19
+ },
20
+ emits: ['update:modelValue'],
25
21
  setup(__props, { emit }) {
26
- const props = __props;
27
- const ns = useNamespace("pct-daterange");
28
- ;
29
- const filterPanelItem = inject(filterPanelItemKey);
30
- const column = computed(() => {
31
- var _a;
32
- return (_a = filterPanelItem == null ? void 0 : filterPanelItem.column) != null ? _a : null;
33
- });
34
- const value = computed({
35
- get: () => {
36
- if (props.modelValue && props.modelValue.start && props.modelValue.end) {
37
- return [props.modelValue.start, props.modelValue.end];
38
- }
39
- return [];
40
- },
41
- set: (v) => {
42
- if (v && v.length === 2) {
43
- emit("update:modelValue", { start: v[0], end: v[1] });
44
- } else {
45
- emit("update:modelValue", { start: "", end: "" });
46
- }
47
- }
48
- });
49
- return (_ctx, _cache) => {
50
- const _component_el_date_picker = resolveComponent("el-date-picker");
51
- return openBlock(), createElementBlock("div", {
52
- class: normalizeClass(unref(ns).e("cont"))
53
- }, [
54
- unref(column) && __props.showTitle ? (openBlock(), createElementBlock("div", {
22
+
23
+ const props = __props;
24
+
25
+ const ns = useNamespace('pct-daterange');
26
+ defineOptions({
27
+ name: 'BwaPctDateRangeCondition',
28
+ __conditionTitle__: '日期选择',
29
+ __conditionDefault__: () => ({ start: '', end: '' }),
30
+ });
31
+
32
+
33
+
34
+
35
+
36
+ const filterPanelItem = inject(filterPanelItemKey);
37
+ const column = computed(() => filterPanelItem?.column ?? null);
38
+
39
+ const value = computed({
40
+ get: () => {
41
+ if (props.modelValue && props.modelValue.start && props.modelValue.end) {
42
+ return [props.modelValue.start, props.modelValue.end];
43
+ }
44
+ return [];
45
+ },
46
+ set: (v) => {
47
+ if (v && v.length === 2) {
48
+ emit('update:modelValue', { start: v[0], end: v[1] });
49
+ } else {
50
+ emit('update:modelValue', { start: '', end: '' });
51
+ }
52
+ },
53
+ });
54
+
55
+ return (_ctx, _cache) => {
56
+ const _component_el_date_picker = resolveComponent("el-date-picker");
57
+
58
+ return (openBlock(), createElementBlock("div", {
59
+ class: normalizeClass(unref(ns).e('cont'))
60
+ }, [
61
+ (unref(column) && __props.showTitle)
62
+ ? (openBlock(), createElementBlock("div", {
55
63
  key: 0,
56
- class: normalizeClass(unref(ns).e("label"))
57
- }, toDisplayString(unref(column).title), 3)) : createCommentVNode("v-if", true),
58
- createVNode(_component_el_date_picker, {
59
- modelValue: unref(value),
60
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(value) ? value.value = $event : null),
61
- type: "daterange",
62
- "range-separator": "\u81F3",
63
- "start-placeholder": "\u5F00\u59CB\u65E5\u671F",
64
- "end-placeholder": "\u7ED3\u675F\u65E5\u671F",
65
- "value-format": __props.valueFormat,
66
- size: "small"
67
- }, null, 8, ["modelValue", "value-format"])
68
- ], 2);
69
- };
70
- }
71
- });
72
- var PctDateRangeCondition = /* @__PURE__ */ _export_sfc(_sfc_main, [["__file", "pct-date-range-condition.vue"]]);
64
+ class: normalizeClass(unref(ns).e('label'))
65
+ }, toDisplayString(unref(column).title), 3 /* TEXT, CLASS */))
66
+ : createCommentVNode("v-if", true),
67
+ createVNode(_component_el_date_picker, {
68
+ modelValue: unref(value),
69
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = $event => (isRef(value) ? (value).value = $event : null)),
70
+ type: "daterange",
71
+ "range-separator": "",
72
+ "start-placeholder": "开始日期",
73
+ "end-placeholder": "结束日期",
74
+ "value-format": __props.valueFormat
75
+ }, null, 8 /* PROPS */, ["modelValue", "value-format"])
76
+ ], 2 /* CLASS */))
77
+ }
78
+ }
79
+
80
+ };
81
+ var PctDateRangeCondition = /*#__PURE__*/_export_sfc(_sfc_main, [['__file',"pct-date-range-condition.vue"]]);
73
82
 
74
83
  export { PctDateRangeCondition as default };