yc-agent-ui 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/es/components/data-table/src/data-table-pagination.vue.d.ts +3 -3
- package/es/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
- package/es/components/data-table/src/data-table.vue.d.ts +3 -3
- package/es/components/dialog-form/index.d.ts +4 -4
- package/es/components/dialog-form/src/index.vue.d.ts +4 -4
- package/es/components/display-item/index.d.ts +12 -12
- package/es/components/display-item/src/index.vue.d.ts +12 -12
- package/es/components/drawer-form/index.d.ts +10 -10
- package/es/components/drawer-form/src/index.vue.d.ts +6 -6
- package/es/components/form/index.d.ts +36 -36
- package/es/components/form/src/form-content.vue.d.ts +15 -15
- package/es/components/form/src/index.vue.d.ts +18 -18
- package/es/components/form-item/index.d.ts +37 -37
- package/es/components/form-item/src/index.vue.d.ts +16 -16
- package/es/components/index.d.ts +4 -0
- package/es/components/page/index.d.ts +897 -897
- package/es/components/page/src/index.vue.d.ts +302 -302
- package/es/components/search/index.d.ts +242 -242
- package/es/components/search/src/index.vue.d.ts +84 -84
- package/es/components/table/index.d.ts +18 -18
- package/es/components/table/src/index.vue.d.ts +2 -2
- package/es/components/table/src/table-column.vue.d.ts +24 -24
- package/es/components/virtual-table/index.d.ts +10 -10
- package/es/components/virtual-table/src/index.vue.d.ts +3 -3
- package/es/components/yc-controls/capability.d.ts +4 -0
- package/es/components/yc-controls/index.d.ts +17 -0
- package/es/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
- package/es/components/yc-controls/src/segmented.vue.d.ts +16 -0
- package/es/components/yc-controls/src/switch-row.vue.d.ts +13 -0
- package/es/components/yc-controls/src/type.d.ts +39 -0
- package/es/components/yc-coss-table/src/coss-table.vue.d.ts +2 -2
- package/es/components/yc-coss-table/src/table-head.vue.d.ts +1 -1
- package/es/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
- package/es/components/yc-feedback/capability.d.ts +4 -0
- package/es/components/yc-feedback/index.d.ts +21 -0
- package/es/components/yc-feedback/src/banner.vue.d.ts +22 -0
- package/es/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
- package/es/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
- package/es/components/yc-feedback/src/timeline.vue.d.ts +7 -0
- package/es/components/yc-feedback/src/type.d.ts +46 -0
- package/es/components/yc-input/capability.d.ts +4 -0
- package/es/components/yc-input/index.d.ts +21 -0
- package/es/components/yc-input/src/input.vue.d.ts +50 -0
- package/es/components/yc-input/src/money-input.vue.d.ts +26 -0
- package/es/components/yc-input/src/stepper-input.vue.d.ts +18 -0
- package/es/components/yc-input/src/textarea.vue.d.ts +35 -0
- package/es/components/yc-input/src/type.d.ts +82 -0
- package/es/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
- package/es/components/yc-plus-page/src/index.vue.d.ts +917 -917
- package/es/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/es/components/yc-property-table/capability.d.ts +4 -0
- package/es/components/yc-property-table/index.d.ts +30 -0
- package/es/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
- package/es/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
- package/es/components/yc-property-table/src/device-table.vue.d.ts +17 -0
- package/es/components/yc-property-table/src/order-table.vue.d.ts +18 -0
- package/es/components/yc-property-table/src/property-table.vue.d.ts +91 -0
- package/es/components/yc-property-table/src/type.d.ts +214 -0
- package/es/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/es/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/es/hooks/usePlusFormReset.d.ts +66 -66
- package/es/index.css +9 -9
- package/es/index.mjs +4 -0
- package/es/packages/components/index.mjs +4 -0
- package/es/packages/components/table/capability.mjs +10 -29
- package/es/packages/components/yc-card/capability.mjs +53 -13
- package/es/packages/components/yc-controls/capability.mjs +100 -0
- package/es/packages/components/yc-controls/index.mjs +13 -0
- package/es/packages/components/yc-controls/src/choice-cards.vue.mjs +5 -0
- package/es/packages/components/yc-controls/src/choice-cards2.vue.mjs +157 -0
- package/es/packages/components/yc-controls/src/segmented.vue.mjs +5 -0
- package/es/packages/components/yc-controls/src/segmented2.vue.mjs +78 -0
- package/es/packages/components/yc-controls/src/switch-row.vue.mjs +5 -0
- package/es/packages/components/yc-controls/src/switch-row2.vue.mjs +95 -0
- package/es/packages/components/yc-controls/src/type.mjs +1 -0
- package/es/packages/components/yc-feedback/capability.mjs +109 -0
- package/es/packages/components/yc-feedback/index.mjs +16 -0
- package/es/packages/components/yc-feedback/src/banner.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/banner2.vue.mjs +230 -0
- package/es/packages/components/yc-feedback/src/empty-state.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/empty-state2.vue.mjs +97 -0
- package/es/packages/components/yc-feedback/src/key-value-list.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/key-value-list2.vue.mjs +194 -0
- package/es/packages/components/yc-feedback/src/timeline.vue.mjs +5 -0
- package/es/packages/components/yc-feedback/src/timeline2.vue.mjs +134 -0
- package/es/packages/components/yc-feedback/src/type.mjs +1 -0
- package/es/packages/components/yc-input/capability.mjs +112 -0
- package/es/packages/components/yc-input/index.mjs +16 -0
- package/es/packages/components/yc-input/src/input.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/input2.vue.mjs +427 -0
- package/es/packages/components/yc-input/src/money-input.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/money-input2.vue.mjs +242 -0
- package/es/packages/components/yc-input/src/stepper-input.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +211 -0
- package/es/packages/components/yc-input/src/textarea.vue.mjs +5 -0
- package/es/packages/components/yc-input/src/textarea2.vue.mjs +158 -0
- package/es/packages/components/yc-input/src/type.mjs +1 -0
- package/es/packages/components/yc-property-table/capability.mjs +350 -0
- package/es/packages/components/yc-property-table/index.mjs +24 -0
- package/es/packages/components/yc-property-table/src/asset-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/asset-table2.vue.mjs +405 -0
- package/es/packages/components/yc-property-table/src/bill-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/bill-table2.vue.mjs +654 -0
- package/es/packages/components/yc-property-table/src/device-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/device-table2.vue.mjs +324 -0
- package/es/packages/components/yc-property-table/src/order-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/order-table2.vue.mjs +363 -0
- package/es/packages/components/yc-property-table/src/property-table.vue.mjs +5 -0
- package/es/packages/components/yc-property-table/src/property-table2.vue.mjs +1228 -0
- package/es/packages/components/yc-property-table/src/type.mjs +1 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/index.css +1 -1
- package/index.js +6385 -1362
- package/index.min.js +24 -24
- package/index.min.mjs +26 -26
- package/index.mjs +6341 -1355
- package/lib/components/data-table/src/data-table-pagination.vue.d.ts +3 -3
- package/lib/components/data-table/src/data-table-toolbar.vue.d.ts +1 -1
- package/lib/components/data-table/src/data-table.vue.d.ts +3 -3
- package/lib/components/dialog-form/index.d.ts +4 -4
- package/lib/components/dialog-form/src/index.vue.d.ts +4 -4
- package/lib/components/display-item/index.d.ts +12 -12
- package/lib/components/display-item/src/index.vue.d.ts +12 -12
- package/lib/components/drawer-form/index.d.ts +10 -10
- package/lib/components/drawer-form/src/index.vue.d.ts +6 -6
- package/lib/components/form/index.d.ts +36 -36
- package/lib/components/form/src/form-content.vue.d.ts +15 -15
- package/lib/components/form/src/index.vue.d.ts +18 -18
- package/lib/components/form-item/index.d.ts +37 -37
- package/lib/components/form-item/src/index.vue.d.ts +16 -16
- package/lib/components/index.d.ts +4 -0
- package/lib/components/page/index.d.ts +897 -897
- package/lib/components/page/src/index.vue.d.ts +302 -302
- package/lib/components/search/index.d.ts +242 -242
- package/lib/components/search/src/index.vue.d.ts +84 -84
- package/lib/components/table/index.d.ts +18 -18
- package/lib/components/table/src/index.vue.d.ts +2 -2
- package/lib/components/table/src/table-column.vue.d.ts +24 -24
- package/lib/components/virtual-table/index.d.ts +10 -10
- package/lib/components/virtual-table/src/index.vue.d.ts +3 -3
- package/lib/components/yc-controls/capability.d.ts +4 -0
- package/lib/components/yc-controls/index.d.ts +17 -0
- package/lib/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
- package/lib/components/yc-controls/src/segmented.vue.d.ts +16 -0
- package/lib/components/yc-controls/src/switch-row.vue.d.ts +13 -0
- package/lib/components/yc-controls/src/type.d.ts +39 -0
- package/lib/components/yc-coss-table/src/coss-table.vue.d.ts +2 -2
- package/lib/components/yc-coss-table/src/table-head.vue.d.ts +1 -1
- package/lib/components/yc-date-picker/src/date-picker.vue.d.ts +1 -1
- package/lib/components/yc-feedback/capability.d.ts +4 -0
- package/lib/components/yc-feedback/index.d.ts +21 -0
- package/lib/components/yc-feedback/src/banner.vue.d.ts +22 -0
- package/lib/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
- package/lib/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
- package/lib/components/yc-feedback/src/timeline.vue.d.ts +7 -0
- package/lib/components/yc-feedback/src/type.d.ts +46 -0
- package/lib/components/yc-input/capability.d.ts +4 -0
- package/lib/components/yc-input/index.d.ts +21 -0
- package/lib/components/yc-input/src/input.vue.d.ts +50 -0
- package/lib/components/yc-input/src/money-input.vue.d.ts +26 -0
- package/lib/components/yc-input/src/stepper-input.vue.d.ts +18 -0
- package/lib/components/yc-input/src/textarea.vue.d.ts +35 -0
- package/lib/components/yc-input/src/type.d.ts +82 -0
- package/lib/components/yc-plus-page/src/header-filter-cell.vue.d.ts +8 -8
- package/lib/components/yc-plus-page/src/index.vue.d.ts +917 -917
- package/lib/components/yc-plus-tree/src/index.vue.d.ts +1 -1
- package/lib/components/yc-property-table/capability.d.ts +4 -0
- package/lib/components/yc-property-table/index.d.ts +30 -0
- package/lib/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
- package/lib/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
- package/lib/components/yc-property-table/src/device-table.vue.d.ts +17 -0
- package/lib/components/yc-property-table/src/order-table.vue.d.ts +18 -0
- package/lib/components/yc-property-table/src/property-table.vue.d.ts +91 -0
- package/lib/components/yc-property-table/src/type.d.ts +214 -0
- package/lib/components/yc-questionnaire/src/index.vue.d.ts +1 -1
- package/lib/components/yc-select-v2/src/index.vue.d.ts +1 -1
- package/lib/hooks/usePlusFormReset.d.ts +66 -66
- package/lib/index.css +11 -11
- package/lib/index.js +176 -135
- package/lib/packages/components/index.js +172 -131
- package/lib/packages/components/table/capability.js +10 -29
- package/lib/packages/components/yc-card/capability.js +53 -13
- package/lib/packages/components/yc-controls/capability.js +104 -0
- package/lib/packages/components/yc-controls/index.js +23 -0
- package/lib/packages/components/yc-controls/src/choice-cards.vue.js +9 -0
- package/lib/packages/components/yc-controls/src/choice-cards2.vue.js +161 -0
- package/lib/packages/components/yc-controls/src/segmented.vue.js +9 -0
- package/lib/packages/components/yc-controls/src/segmented2.vue.js +82 -0
- package/lib/packages/components/yc-controls/src/switch-row.vue.js +9 -0
- package/lib/packages/components/yc-controls/src/switch-row2.vue.js +99 -0
- package/lib/packages/components/yc-controls/src/type.js +2 -0
- package/lib/packages/components/yc-feedback/capability.js +113 -0
- package/lib/packages/components/yc-feedback/index.js +28 -0
- package/lib/packages/components/yc-feedback/src/banner.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/banner2.vue.js +234 -0
- package/lib/packages/components/yc-feedback/src/empty-state.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/empty-state2.vue.js +101 -0
- package/lib/packages/components/yc-feedback/src/key-value-list.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/key-value-list2.vue.js +198 -0
- package/lib/packages/components/yc-feedback/src/timeline.vue.js +9 -0
- package/lib/packages/components/yc-feedback/src/timeline2.vue.js +138 -0
- package/lib/packages/components/yc-feedback/src/type.js +2 -0
- package/lib/packages/components/yc-input/capability.js +116 -0
- package/lib/packages/components/yc-input/index.js +28 -0
- package/lib/packages/components/yc-input/src/input.vue.js +9 -0
- package/lib/packages/components/yc-input/src/input2.vue.js +431 -0
- package/lib/packages/components/yc-input/src/money-input.vue.js +9 -0
- package/lib/packages/components/yc-input/src/money-input2.vue.js +246 -0
- package/lib/packages/components/yc-input/src/stepper-input.vue.js +9 -0
- package/lib/packages/components/yc-input/src/stepper-input2.vue.js +215 -0
- package/lib/packages/components/yc-input/src/textarea.vue.js +9 -0
- package/lib/packages/components/yc-input/src/textarea2.vue.js +162 -0
- package/lib/packages/components/yc-input/src/type.js +2 -0
- package/lib/packages/components/yc-property-table/capability.js +354 -0
- package/lib/packages/components/yc-property-table/index.js +43 -0
- package/lib/packages/components/yc-property-table/src/asset-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/asset-table2.vue.js +409 -0
- package/lib/packages/components/yc-property-table/src/bill-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/bill-table2.vue.js +658 -0
- package/lib/packages/components/yc-property-table/src/device-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/device-table2.vue.js +328 -0
- package/lib/packages/components/yc-property-table/src/order-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/order-table2.vue.js +367 -0
- package/lib/packages/components/yc-property-table/src/property-table.vue.js +9 -0
- package/lib/packages/components/yc-property-table/src/property-table2.vue.js +1232 -0
- package/lib/packages/components/yc-property-table/src/type.js +2 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/ja.js +1 -1
- package/locale/ja.min.js +1 -1
- package/locale/ja.min.mjs +1 -1
- package/locale/ja.mjs +1 -1
- package/locale/ko.js +1 -1
- package/locale/ko.min.js +1 -1
- package/locale/ko.min.mjs +1 -1
- package/locale/ko.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/locale/zh-tw.js +1 -1
- package/locale/zh-tw.min.js +1 -1
- package/locale/zh-tw.min.mjs +1 -1
- package/locale/zh-tw.mjs +1 -1
- package/package.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/plus-yc-controls.css +1 -0
- package/theme-chalk/plus-yc-feedback.css +1 -0
- package/theme-chalk/plus-yc-input.css +1 -0
- package/theme-chalk/plus-yc-property-table.css +1 -0
- package/theme-chalk/src/index.scss +4 -0
- package/theme-chalk/src/yc-controls.scss +316 -0
- package/theme-chalk/src/yc-feedback.scss +452 -0
- package/theme-chalk/src/yc-input.scss +473 -0
- package/theme-chalk/src/yc-property-table.scss +1700 -0
|
@@ -0,0 +1,1232 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var vue = require('vue');
|
|
6
|
+
|
|
7
|
+
const _hoisted_1 = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "yc-property-header"
|
|
10
|
+
};
|
|
11
|
+
const _hoisted_2 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "yc-property-header__titles"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_3 = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "yc-property-header__title"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_4 = {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "yc-property-header__subtitle"
|
|
22
|
+
};
|
|
23
|
+
const _hoisted_5 = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "yc-property-header__toolbar"
|
|
26
|
+
};
|
|
27
|
+
const _hoisted_6 = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "yc-property-tabs"
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_7 = ["onClick"];
|
|
32
|
+
const _hoisted_8 = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "yc-property-tab__count"
|
|
35
|
+
};
|
|
36
|
+
const _hoisted_9 = {
|
|
37
|
+
key: 0,
|
|
38
|
+
class: "yc-property-search"
|
|
39
|
+
};
|
|
40
|
+
const _hoisted_10 = ["placeholder"];
|
|
41
|
+
const _hoisted_11 = {
|
|
42
|
+
key: 1,
|
|
43
|
+
class: "yc-property-loading"
|
|
44
|
+
};
|
|
45
|
+
const _hoisted_12 = { class: "yc-property-loading__text" };
|
|
46
|
+
const _hoisted_13 = { class: "yc-property-table-container" };
|
|
47
|
+
const _hoisted_14 = {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "yc-property-th is-selection",
|
|
50
|
+
width: "48px"
|
|
51
|
+
};
|
|
52
|
+
const _hoisted_15 = ["checked", "indeterminate"];
|
|
53
|
+
const _hoisted_16 = ["onClick"];
|
|
54
|
+
const _hoisted_17 = { class: "yc-property-th__inner" };
|
|
55
|
+
const _hoisted_18 = {
|
|
56
|
+
key: 1,
|
|
57
|
+
class: "yc-property-th align-right",
|
|
58
|
+
width: "140px"
|
|
59
|
+
};
|
|
60
|
+
const _hoisted_19 = ["onClick"];
|
|
61
|
+
const _hoisted_20 = ["checked", "onChange"];
|
|
62
|
+
const _hoisted_21 = {
|
|
63
|
+
key: 1,
|
|
64
|
+
class: "yc-property-money"
|
|
65
|
+
};
|
|
66
|
+
const _hoisted_22 = { class: "yc-property-money__num" };
|
|
67
|
+
const _hoisted_23 = ["href"];
|
|
68
|
+
const _hoisted_24 = {
|
|
69
|
+
key: 1,
|
|
70
|
+
class: "yc-property-muted"
|
|
71
|
+
};
|
|
72
|
+
const _hoisted_25 = { class: "yc-property-actions" };
|
|
73
|
+
const _hoisted_26 = ["disabled", "onClick"];
|
|
74
|
+
const _hoisted_27 = { class: "yc-property-tr is-empty" };
|
|
75
|
+
const _hoisted_28 = ["colspan"];
|
|
76
|
+
const _hoisted_29 = { class: "yc-property-empty" };
|
|
77
|
+
const _hoisted_30 = { class: "yc-property-empty__text" };
|
|
78
|
+
const _hoisted_31 = { class: "yc-property-card-list" };
|
|
79
|
+
const _hoisted_32 = ["onClick"];
|
|
80
|
+
const _hoisted_33 = { class: "yc-property-card-header" };
|
|
81
|
+
const _hoisted_34 = { class: "yc-property-card-header__left" };
|
|
82
|
+
const _hoisted_35 = ["checked", "onChange"];
|
|
83
|
+
const _hoisted_36 = { class: "yc-property-card-title" };
|
|
84
|
+
const _hoisted_37 = {
|
|
85
|
+
key: 0,
|
|
86
|
+
class: "yc-property-card-header__right"
|
|
87
|
+
};
|
|
88
|
+
const _hoisted_38 = {
|
|
89
|
+
key: 0,
|
|
90
|
+
class: "yc-property-card-subtitle"
|
|
91
|
+
};
|
|
92
|
+
const _hoisted_39 = { class: "yc-property-card-body" };
|
|
93
|
+
const _hoisted_40 = { class: "yc-property-card-grid" };
|
|
94
|
+
const _hoisted_41 = { class: "yc-property-card-field__label" };
|
|
95
|
+
const _hoisted_42 = { class: "yc-property-card-field__value" };
|
|
96
|
+
const _hoisted_43 = {
|
|
97
|
+
key: 1,
|
|
98
|
+
class: "yc-property-money"
|
|
99
|
+
};
|
|
100
|
+
const _hoisted_44 = { class: "yc-property-money__num" };
|
|
101
|
+
const _hoisted_45 = ["href"];
|
|
102
|
+
const _hoisted_46 = {
|
|
103
|
+
key: 1,
|
|
104
|
+
class: "yc-property-muted"
|
|
105
|
+
};
|
|
106
|
+
const _hoisted_47 = ["disabled", "onClick"];
|
|
107
|
+
const _hoisted_48 = { class: "yc-property-empty is-card" };
|
|
108
|
+
const _hoisted_49 = { class: "yc-property-empty__text" };
|
|
109
|
+
const _hoisted_50 = {
|
|
110
|
+
key: 4,
|
|
111
|
+
class: "yc-property-footer"
|
|
112
|
+
};
|
|
113
|
+
const _hoisted_51 = { class: "yc-property-footer__summary" };
|
|
114
|
+
const _hoisted_52 = { class: "yc-property-footer__count" };
|
|
115
|
+
const _hoisted_53 = { class: "yc-property-footer__selected" };
|
|
116
|
+
const _hoisted_54 = { class: "yc-property-pagination" };
|
|
117
|
+
const _hoisted_55 = ["disabled"];
|
|
118
|
+
const _hoisted_56 = { class: "yc-property-pagination__info" };
|
|
119
|
+
const _hoisted_57 = ["disabled"];
|
|
120
|
+
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
121
|
+
...{
|
|
122
|
+
name: "YcPropertyTable"
|
|
123
|
+
},
|
|
124
|
+
__name: "property-table",
|
|
125
|
+
props: {
|
|
126
|
+
data: { default: () => [] },
|
|
127
|
+
columns: { default: () => [] },
|
|
128
|
+
layout: { default: "auto" },
|
|
129
|
+
breakpoint: { default: 768 },
|
|
130
|
+
title: {},
|
|
131
|
+
subtitle: {},
|
|
132
|
+
card: { type: Boolean, default: true },
|
|
133
|
+
bordered: { type: Boolean, default: true },
|
|
134
|
+
striped: { type: Boolean, default: false },
|
|
135
|
+
hoverable: { type: Boolean, default: true },
|
|
136
|
+
density: { default: "default" },
|
|
137
|
+
searchable: { type: Boolean, default: true },
|
|
138
|
+
searchPlaceholder: { default: "\u641C\u7D22\u623F\u53F7\u3001\u5DE5\u5355\u3001\u8D23\u4EFB\u4EBA..." },
|
|
139
|
+
tabs: {},
|
|
140
|
+
activeTab: {},
|
|
141
|
+
tabKey: {},
|
|
142
|
+
selectable: { type: Boolean, default: false },
|
|
143
|
+
selectedRows: {},
|
|
144
|
+
rowKey: { default: "id" },
|
|
145
|
+
pagination: { type: [Boolean, Object] },
|
|
146
|
+
loading: { type: Boolean, default: false },
|
|
147
|
+
loadingText: { default: "\u52A0\u8F7D\u4E2D..." },
|
|
148
|
+
emptyText: { default: "\u6682\u65E0\u6570\u636E\u8BB0\u5F55" },
|
|
149
|
+
actions: { default: () => [] },
|
|
150
|
+
customClass: {},
|
|
151
|
+
customStyle: {}
|
|
152
|
+
},
|
|
153
|
+
emits: ["action", "update:selectedRows", "rowClick", "tabChange", "search", "pageChange"],
|
|
154
|
+
setup(__props, { emit: __emit }) {
|
|
155
|
+
var _a;
|
|
156
|
+
const props = __props;
|
|
157
|
+
const emit = __emit;
|
|
158
|
+
const rootRef = vue.ref(null);
|
|
159
|
+
const containerWidth = vue.ref(0);
|
|
160
|
+
let resizeObserver = null;
|
|
161
|
+
vue.onMounted(() => {
|
|
162
|
+
const root = rootRef.value;
|
|
163
|
+
if (!root || typeof ResizeObserver === "undefined") return;
|
|
164
|
+
resizeObserver = new ResizeObserver((entries) => {
|
|
165
|
+
var _a2, _b;
|
|
166
|
+
containerWidth.value = (_b = (_a2 = entries[0]) == null ? void 0 : _a2.contentRect.width) != null ? _b : 0;
|
|
167
|
+
});
|
|
168
|
+
resizeObserver.observe(root);
|
|
169
|
+
});
|
|
170
|
+
vue.onBeforeUnmount(() => {
|
|
171
|
+
resizeObserver == null ? void 0 : resizeObserver.disconnect();
|
|
172
|
+
});
|
|
173
|
+
const currentLayout = vue.computed(() => {
|
|
174
|
+
if (props.layout === "table") return "table";
|
|
175
|
+
if (props.layout === "card") return "card";
|
|
176
|
+
return containerWidth.value > 0 && containerWidth.value <= props.breakpoint ? "card" : "table";
|
|
177
|
+
});
|
|
178
|
+
const activeTabKey = vue.ref(props.activeTab || props.tabs && ((_a = props.tabs[0]) == null ? void 0 : _a.key) || "");
|
|
179
|
+
vue.watch(() => props.activeTab, (val) => {
|
|
180
|
+
if (val) activeTabKey.value = val;
|
|
181
|
+
});
|
|
182
|
+
const handleTabChange = (tab) => {
|
|
183
|
+
activeTabKey.value = tab.key;
|
|
184
|
+
emit("tabChange", tab);
|
|
185
|
+
};
|
|
186
|
+
const searchQuery = vue.ref("");
|
|
187
|
+
const activeSortProp = vue.ref("");
|
|
188
|
+
const activeSortOrder = vue.ref(null);
|
|
189
|
+
const handleSearchInput = () => {
|
|
190
|
+
currentPage.value = 1;
|
|
191
|
+
emit("search", searchQuery.value);
|
|
192
|
+
};
|
|
193
|
+
const handleSearchClear = () => {
|
|
194
|
+
searchQuery.value = "";
|
|
195
|
+
currentPage.value = 1;
|
|
196
|
+
emit("search", "");
|
|
197
|
+
};
|
|
198
|
+
const handleSort = (prop) => {
|
|
199
|
+
if (activeSortProp.value === prop) {
|
|
200
|
+
if (activeSortOrder.value === "asc") {
|
|
201
|
+
activeSortOrder.value = "desc";
|
|
202
|
+
} else if (activeSortOrder.value === "desc") {
|
|
203
|
+
activeSortProp.value = "";
|
|
204
|
+
activeSortOrder.value = null;
|
|
205
|
+
}
|
|
206
|
+
} else {
|
|
207
|
+
activeSortProp.value = prop;
|
|
208
|
+
activeSortOrder.value = "asc";
|
|
209
|
+
}
|
|
210
|
+
};
|
|
211
|
+
const internalColumns = vue.computed(() => props.columns || []);
|
|
212
|
+
const primaryCol = vue.computed(() => {
|
|
213
|
+
const customPrimary = internalColumns.value.find((c) => c.primary);
|
|
214
|
+
if (customPrimary) return customPrimary;
|
|
215
|
+
return internalColumns.value[0];
|
|
216
|
+
});
|
|
217
|
+
const subPrimaryCol = vue.computed(() => {
|
|
218
|
+
return internalColumns.value.find((c) => c.subPrimary);
|
|
219
|
+
});
|
|
220
|
+
const statusCol = vue.computed(() => {
|
|
221
|
+
return internalColumns.value.find((c) => c.type === "tag" && !c.primary);
|
|
222
|
+
});
|
|
223
|
+
const cardVisibleColumns = vue.computed(() => {
|
|
224
|
+
return internalColumns.value.filter((c) => {
|
|
225
|
+
if (c.hideOnMobile) return false;
|
|
226
|
+
if (c === primaryCol.value) return false;
|
|
227
|
+
if (c === subPrimaryCol.value) return false;
|
|
228
|
+
if (c === statusCol.value) return false;
|
|
229
|
+
return true;
|
|
230
|
+
});
|
|
231
|
+
});
|
|
232
|
+
const filteredData = vue.computed(() => {
|
|
233
|
+
let list = [...props.data || []];
|
|
234
|
+
if (props.tabs && props.tabs.length > 0 && activeTabKey.value && activeTabKey.value !== "all") {
|
|
235
|
+
const currentTab = props.tabs.find((t) => t.key === activeTabKey.value);
|
|
236
|
+
if (currentTab && currentTab.value !== void 0) {
|
|
237
|
+
list = list.filter((item) => {
|
|
238
|
+
const key = props.tabKey || "status";
|
|
239
|
+
return item[key] === currentTab.value;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
const q = searchQuery.value.trim().toLowerCase();
|
|
244
|
+
if (q) {
|
|
245
|
+
list = list.filter((row) => {
|
|
246
|
+
return Object.values(row).some((val) => {
|
|
247
|
+
if (val === null || val === void 0) return false;
|
|
248
|
+
return String(val).toLowerCase().includes(q);
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
if (activeSortProp.value && activeSortOrder.value) {
|
|
253
|
+
const prop = activeSortProp.value;
|
|
254
|
+
const isAsc = activeSortOrder.value === "asc";
|
|
255
|
+
list.sort((a, b) => {
|
|
256
|
+
const va = a[prop];
|
|
257
|
+
const vb = b[prop];
|
|
258
|
+
if (typeof va === "number" && typeof vb === "number") {
|
|
259
|
+
return isAsc ? va - vb : vb - va;
|
|
260
|
+
}
|
|
261
|
+
return isAsc ? String(va).localeCompare(String(vb)) : String(vb).localeCompare(String(va));
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
return list;
|
|
265
|
+
});
|
|
266
|
+
const currentPage = vue.ref(1);
|
|
267
|
+
const paginationConfig = vue.computed(() => {
|
|
268
|
+
if (typeof props.pagination === "object") {
|
|
269
|
+
return {
|
|
270
|
+
pageSize: props.pagination.pageSize || 10,
|
|
271
|
+
enabled: true
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
if (props.pagination === false) {
|
|
275
|
+
return { pageSize: 9999, enabled: false };
|
|
276
|
+
}
|
|
277
|
+
return { pageSize: 10, enabled: true };
|
|
278
|
+
});
|
|
279
|
+
const showPagination = vue.computed(() => {
|
|
280
|
+
return paginationConfig.value.enabled && filteredData.value.length > 0;
|
|
281
|
+
});
|
|
282
|
+
const totalItems = vue.computed(() => filteredData.value.length);
|
|
283
|
+
const totalPages = vue.computed(() => Math.ceil(totalItems.value / paginationConfig.value.pageSize));
|
|
284
|
+
const paginatedData = vue.computed(() => {
|
|
285
|
+
if (!paginationConfig.value.enabled) return filteredData.value;
|
|
286
|
+
const start = (currentPage.value - 1) * paginationConfig.value.pageSize;
|
|
287
|
+
return filteredData.value.slice(start, start + paginationConfig.value.pageSize);
|
|
288
|
+
});
|
|
289
|
+
const changePage = (page) => {
|
|
290
|
+
if (page < 1 || page > totalPages.value) return;
|
|
291
|
+
currentPage.value = page;
|
|
292
|
+
emit("pageChange", page);
|
|
293
|
+
};
|
|
294
|
+
const selectedRowsList = vue.ref(props.selectedRows || []);
|
|
295
|
+
vue.watch(() => props.selectedRows, (rows) => {
|
|
296
|
+
if (rows) selectedRowsList.value = rows;
|
|
297
|
+
});
|
|
298
|
+
const getRowKey = (row, index) => {
|
|
299
|
+
var _a2;
|
|
300
|
+
return (_a2 = row[props.rowKey]) != null ? _a2 : index;
|
|
301
|
+
};
|
|
302
|
+
const isRowSelected = (row) => {
|
|
303
|
+
const key = props.rowKey;
|
|
304
|
+
return selectedRowsList.value.some((r) => r[key] === row[key]);
|
|
305
|
+
};
|
|
306
|
+
const handleToggleSelectRow = (row) => {
|
|
307
|
+
const key = props.rowKey;
|
|
308
|
+
const idx = selectedRowsList.value.findIndex((r) => r[key] === row[key]);
|
|
309
|
+
if (idx > -1) {
|
|
310
|
+
selectedRowsList.value.splice(idx, 1);
|
|
311
|
+
} else {
|
|
312
|
+
selectedRowsList.value.push(row);
|
|
313
|
+
}
|
|
314
|
+
emit("update:selectedRows", [...selectedRowsList.value]);
|
|
315
|
+
};
|
|
316
|
+
const isAllSelected = vue.computed(() => {
|
|
317
|
+
if (paginatedData.value.length === 0) return false;
|
|
318
|
+
return paginatedData.value.every((row) => isRowSelected(row));
|
|
319
|
+
});
|
|
320
|
+
const isIndeterminate = vue.computed(() => {
|
|
321
|
+
if (isAllSelected.value) return false;
|
|
322
|
+
return paginatedData.value.some((row) => isRowSelected(row));
|
|
323
|
+
});
|
|
324
|
+
const handleToggleSelectAll = () => {
|
|
325
|
+
const key = props.rowKey;
|
|
326
|
+
if (isAllSelected.value) {
|
|
327
|
+
const currentKeys = new Set(paginatedData.value.map((r) => r[key]));
|
|
328
|
+
selectedRowsList.value = selectedRowsList.value.filter((r) => !currentKeys.has(r[key]));
|
|
329
|
+
} else {
|
|
330
|
+
const currentKeys = new Set(selectedRowsList.value.map((r) => r[key]));
|
|
331
|
+
paginatedData.value.forEach((row) => {
|
|
332
|
+
if (!currentKeys.has(row[key])) {
|
|
333
|
+
selectedRowsList.value.push(row);
|
|
334
|
+
}
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
emit("update:selectedRows", [...selectedRowsList.value]);
|
|
338
|
+
};
|
|
339
|
+
const handleRowClick = (row, index) => {
|
|
340
|
+
emit("rowClick", row, index);
|
|
341
|
+
};
|
|
342
|
+
const getCellValue = (row, col) => {
|
|
343
|
+
return row[col.prop];
|
|
344
|
+
};
|
|
345
|
+
const formatCellValue = (row, col, index) => {
|
|
346
|
+
const val = getCellValue(row, col);
|
|
347
|
+
if (col.formatter) {
|
|
348
|
+
return col.formatter(val, row, index);
|
|
349
|
+
}
|
|
350
|
+
if (val === null || val === void 0 || val === "") return "-";
|
|
351
|
+
return val;
|
|
352
|
+
};
|
|
353
|
+
const formatMoney = (val) => {
|
|
354
|
+
const num = Number(val);
|
|
355
|
+
if (isNaN(num)) return val || "0.00";
|
|
356
|
+
return num.toLocaleString("zh-CN", { minimumFractionDigits: 2, maximumFractionDigits: 2 });
|
|
357
|
+
};
|
|
358
|
+
const getTagConfig = (col, value) => {
|
|
359
|
+
if (col.tagMap && col.tagMap[value]) {
|
|
360
|
+
return col.tagMap[value];
|
|
361
|
+
}
|
|
362
|
+
return {
|
|
363
|
+
label: String(value != null ? value : "-"),
|
|
364
|
+
type: "info"
|
|
365
|
+
};
|
|
366
|
+
};
|
|
367
|
+
const getVisibleActions = (row) => {
|
|
368
|
+
return (props.actions || []).filter((act) => {
|
|
369
|
+
if (typeof act.visible === "function") return act.visible(row);
|
|
370
|
+
if (typeof act.visible === "boolean") return act.visible;
|
|
371
|
+
return true;
|
|
372
|
+
});
|
|
373
|
+
};
|
|
374
|
+
const isActionDisabled = (act, row) => {
|
|
375
|
+
if (typeof act.disabled === "function") return act.disabled(row);
|
|
376
|
+
if (typeof act.disabled === "boolean") return act.disabled;
|
|
377
|
+
return false;
|
|
378
|
+
};
|
|
379
|
+
const handleAction = (name, row) => {
|
|
380
|
+
emit("action", name, row);
|
|
381
|
+
};
|
|
382
|
+
return (_ctx, _cache) => {
|
|
383
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
384
|
+
"div",
|
|
385
|
+
{
|
|
386
|
+
ref_key: "rootRef",
|
|
387
|
+
ref: rootRef,
|
|
388
|
+
class: vue.normalizeClass(["yc-property-table-wrapper", [
|
|
389
|
+
`is-${currentLayout.value}`,
|
|
390
|
+
`density-${__props.density}`,
|
|
391
|
+
{ "is-card-container": __props.card, "is-bordered": __props.bordered },
|
|
392
|
+
__props.customClass
|
|
393
|
+
]]),
|
|
394
|
+
style: vue.normalizeStyle(__props.customStyle)
|
|
395
|
+
},
|
|
396
|
+
[
|
|
397
|
+
vue.createCommentVNode(" \u5934\u90E8\u533A\u57DF (\u6807\u9898\u3001\u526F\u6807\u9898\u3001\u64CD\u4F5C\u63D2\u69FD) "),
|
|
398
|
+
__props.title || __props.subtitle || _ctx.$slots.header || _ctx.$slots.toolbar || __props.searchable || __props.tabs && __props.tabs.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
399
|
+
vue.renderSlot(_ctx.$slots, "header", {}, () => [
|
|
400
|
+
__props.title || __props.subtitle ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2, [
|
|
401
|
+
__props.title ? (vue.openBlock(), vue.createElementBlock(
|
|
402
|
+
"h3",
|
|
403
|
+
_hoisted_3,
|
|
404
|
+
vue.toDisplayString(__props.title),
|
|
405
|
+
1
|
|
406
|
+
/* TEXT */
|
|
407
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
408
|
+
__props.subtitle ? (vue.openBlock(), vue.createElementBlock(
|
|
409
|
+
"p",
|
|
410
|
+
_hoisted_4,
|
|
411
|
+
vue.toDisplayString(__props.subtitle),
|
|
412
|
+
1
|
|
413
|
+
/* TEXT */
|
|
414
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
415
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
416
|
+
]),
|
|
417
|
+
vue.createCommentVNode(" \u641C\u7D22\u4E0E\u7B5B\u9009\u5DE5\u5177\u680F "),
|
|
418
|
+
__props.searchable || _ctx.$slots.toolbar || __props.tabs && __props.tabs.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_5, [
|
|
419
|
+
vue.createCommentVNode(" \u72B6\u6001\u5207\u6362 Tab \u680F (\u79FB\u52A8\u7AEF\u652F\u6301\u6A2A\u5411\u6ED1\u52A8) "),
|
|
420
|
+
__props.tabs && __props.tabs.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_6, [
|
|
421
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
422
|
+
vue.Fragment,
|
|
423
|
+
null,
|
|
424
|
+
vue.renderList(__props.tabs, (tab) => {
|
|
425
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
426
|
+
key: tab.key,
|
|
427
|
+
type: "button",
|
|
428
|
+
class: vue.normalizeClass(["yc-property-tab", { "is-active": activeTabKey.value === tab.key }]),
|
|
429
|
+
onClick: ($event) => handleTabChange(tab)
|
|
430
|
+
}, [
|
|
431
|
+
vue.createElementVNode(
|
|
432
|
+
"span",
|
|
433
|
+
null,
|
|
434
|
+
vue.toDisplayString(tab.label),
|
|
435
|
+
1
|
|
436
|
+
/* TEXT */
|
|
437
|
+
),
|
|
438
|
+
tab.count !== void 0 ? (vue.openBlock(), vue.createElementBlock(
|
|
439
|
+
"span",
|
|
440
|
+
_hoisted_8,
|
|
441
|
+
vue.toDisplayString(tab.count),
|
|
442
|
+
1
|
|
443
|
+
/* TEXT */
|
|
444
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
445
|
+
], 10, _hoisted_7);
|
|
446
|
+
}),
|
|
447
|
+
128
|
|
448
|
+
/* KEYED_FRAGMENT */
|
|
449
|
+
))
|
|
450
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
451
|
+
vue.renderSlot(_ctx.$slots, "toolbar", {}, () => [
|
|
452
|
+
__props.searchable ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_9, [
|
|
453
|
+
_cache[9] || (_cache[9] = vue.createElementVNode(
|
|
454
|
+
"svg",
|
|
455
|
+
{
|
|
456
|
+
class: "yc-property-search__icon",
|
|
457
|
+
viewBox: "0 0 24 24",
|
|
458
|
+
width: "15",
|
|
459
|
+
height: "15",
|
|
460
|
+
fill: "none",
|
|
461
|
+
stroke: "currentColor",
|
|
462
|
+
"stroke-width": "2"
|
|
463
|
+
},
|
|
464
|
+
[
|
|
465
|
+
vue.createElementVNode("circle", {
|
|
466
|
+
cx: "11",
|
|
467
|
+
cy: "11",
|
|
468
|
+
r: "8"
|
|
469
|
+
}),
|
|
470
|
+
vue.createElementVNode("line", {
|
|
471
|
+
x1: "21",
|
|
472
|
+
y1: "21",
|
|
473
|
+
x2: "16.65",
|
|
474
|
+
y2: "16.65"
|
|
475
|
+
})
|
|
476
|
+
],
|
|
477
|
+
-1
|
|
478
|
+
/* CACHED */
|
|
479
|
+
)),
|
|
480
|
+
vue.withDirectives(vue.createElementVNode("input", {
|
|
481
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchQuery.value = $event),
|
|
482
|
+
type: "text",
|
|
483
|
+
class: "yc-property-search__input",
|
|
484
|
+
placeholder: __props.searchPlaceholder,
|
|
485
|
+
onInput: handleSearchInput
|
|
486
|
+
}, null, 40, _hoisted_10), [
|
|
487
|
+
[vue.vModelText, searchQuery.value]
|
|
488
|
+
]),
|
|
489
|
+
searchQuery.value ? (vue.openBlock(), vue.createElementBlock("button", {
|
|
490
|
+
key: 0,
|
|
491
|
+
type: "button",
|
|
492
|
+
class: "yc-property-search__clear",
|
|
493
|
+
onClick: handleSearchClear
|
|
494
|
+
}, " \xD7 ")) : vue.createCommentVNode("v-if", true)
|
|
495
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
496
|
+
])
|
|
497
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
498
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
499
|
+
vue.createCommentVNode(" \u52A0\u8F7D\u4E2D\u906E\u7F69 "),
|
|
500
|
+
__props.loading ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_11, [
|
|
501
|
+
_cache[10] || (_cache[10] = vue.createElementVNode(
|
|
502
|
+
"div",
|
|
503
|
+
{ class: "yc-property-loading__spinner" },
|
|
504
|
+
null,
|
|
505
|
+
-1
|
|
506
|
+
/* CACHED */
|
|
507
|
+
)),
|
|
508
|
+
vue.createElementVNode(
|
|
509
|
+
"span",
|
|
510
|
+
_hoisted_12,
|
|
511
|
+
vue.toDisplayString(__props.loadingText),
|
|
512
|
+
1
|
|
513
|
+
/* TEXT */
|
|
514
|
+
)
|
|
515
|
+
])) : currentLayout.value === "table" ? (vue.openBlock(), vue.createElementBlock(
|
|
516
|
+
vue.Fragment,
|
|
517
|
+
{ key: 2 },
|
|
518
|
+
[
|
|
519
|
+
vue.createCommentVNode(" 1. PC \u684C\u9762\u7AEF\u591A\u5217\u5B8C\u6574\u8868\u683C\u89C6\u56FE (layout === 'table') "),
|
|
520
|
+
vue.createElementVNode("div", _hoisted_13, [
|
|
521
|
+
vue.createElementVNode(
|
|
522
|
+
"table",
|
|
523
|
+
{
|
|
524
|
+
class: vue.normalizeClass(["yc-property-table", { "is-striped": __props.striped, "is-hoverable": __props.hoverable }])
|
|
525
|
+
},
|
|
526
|
+
[
|
|
527
|
+
vue.createElementVNode("thead", null, [
|
|
528
|
+
vue.createElementVNode("tr", null, [
|
|
529
|
+
vue.createCommentVNode(" \u591A\u9009\u52FE\u9009\u5217 "),
|
|
530
|
+
__props.selectable ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_14, [
|
|
531
|
+
vue.createElementVNode("input", {
|
|
532
|
+
type: "checkbox",
|
|
533
|
+
class: "yc-property-checkbox",
|
|
534
|
+
checked: isAllSelected.value,
|
|
535
|
+
indeterminate: isIndeterminate.value,
|
|
536
|
+
onChange: handleToggleSelectAll
|
|
537
|
+
}, null, 40, _hoisted_15)
|
|
538
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
539
|
+
vue.createCommentVNode(" \u6570\u636E\u5217\u5934 "),
|
|
540
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
541
|
+
vue.Fragment,
|
|
542
|
+
null,
|
|
543
|
+
vue.renderList(internalColumns.value, (col) => {
|
|
544
|
+
return vue.openBlock(), vue.createElementBlock("th", {
|
|
545
|
+
key: col.prop,
|
|
546
|
+
class: vue.normalizeClass(["yc-property-th", [
|
|
547
|
+
`align-${col.align || "left"}`,
|
|
548
|
+
{ "is-sortable": col.sortable },
|
|
549
|
+
col.className
|
|
550
|
+
]]),
|
|
551
|
+
style: vue.normalizeStyle({ width: typeof col.width === "number" ? `${col.width}px` : col.width, minWidth: typeof col.minWidth === "number" ? `${col.minWidth}px` : col.minWidth }),
|
|
552
|
+
onClick: ($event) => col.sortable ? handleSort(col.prop) : void 0
|
|
553
|
+
}, [
|
|
554
|
+
vue.createElementVNode("div", _hoisted_17, [
|
|
555
|
+
vue.renderSlot(_ctx.$slots, `header-${col.prop}`, { column: col }, () => [
|
|
556
|
+
vue.createElementVNode(
|
|
557
|
+
"span",
|
|
558
|
+
null,
|
|
559
|
+
vue.toDisplayString(col.label),
|
|
560
|
+
1
|
|
561
|
+
/* TEXT */
|
|
562
|
+
)
|
|
563
|
+
]),
|
|
564
|
+
vue.createCommentVNode(" \u6392\u5E8F\u7BAD\u5934 "),
|
|
565
|
+
col.sortable ? (vue.openBlock(), vue.createElementBlock(
|
|
566
|
+
"span",
|
|
567
|
+
{
|
|
568
|
+
key: 0,
|
|
569
|
+
class: vue.normalizeClass(["yc-property-sort-arrows", { "is-sorted": activeSortProp.value === col.prop }])
|
|
570
|
+
},
|
|
571
|
+
[
|
|
572
|
+
vue.createElementVNode(
|
|
573
|
+
"span",
|
|
574
|
+
{
|
|
575
|
+
class: vue.normalizeClass(["yc-property-sort-arrow is-asc", { "is-active": activeSortProp.value === col.prop && activeSortOrder.value === "asc" }])
|
|
576
|
+
},
|
|
577
|
+
"\u25B2",
|
|
578
|
+
2
|
|
579
|
+
/* CLASS */
|
|
580
|
+
),
|
|
581
|
+
vue.createElementVNode(
|
|
582
|
+
"span",
|
|
583
|
+
{
|
|
584
|
+
class: vue.normalizeClass(["yc-property-sort-arrow is-desc", { "is-active": activeSortProp.value === col.prop && activeSortOrder.value === "desc" }])
|
|
585
|
+
},
|
|
586
|
+
"\u25BC",
|
|
587
|
+
2
|
|
588
|
+
/* CLASS */
|
|
589
|
+
)
|
|
590
|
+
],
|
|
591
|
+
2
|
|
592
|
+
/* CLASS */
|
|
593
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
594
|
+
])
|
|
595
|
+
], 14, _hoisted_16);
|
|
596
|
+
}),
|
|
597
|
+
128
|
|
598
|
+
/* KEYED_FRAGMENT */
|
|
599
|
+
)),
|
|
600
|
+
vue.createCommentVNode(" \u64CD\u4F5C\u5217\u5934 "),
|
|
601
|
+
__props.actions && __props.actions.length > 0 ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_18, [..._cache[11] || (_cache[11] = [
|
|
602
|
+
vue.createElementVNode(
|
|
603
|
+
"span",
|
|
604
|
+
null,
|
|
605
|
+
"\u64CD\u4F5C",
|
|
606
|
+
-1
|
|
607
|
+
/* CACHED */
|
|
608
|
+
)
|
|
609
|
+
])])) : vue.createCommentVNode("v-if", true)
|
|
610
|
+
])
|
|
611
|
+
]),
|
|
612
|
+
vue.createElementVNode("tbody", null, [
|
|
613
|
+
vue.createCommentVNode(" \u6709\u6570\u636E\u884C "),
|
|
614
|
+
paginatedData.value.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
|
|
615
|
+
vue.Fragment,
|
|
616
|
+
{ key: 0 },
|
|
617
|
+
vue.renderList(paginatedData.value, (row, rIdx) => {
|
|
618
|
+
return vue.openBlock(), vue.createElementBlock("tr", {
|
|
619
|
+
key: getRowKey(row, rIdx),
|
|
620
|
+
class: vue.normalizeClass(["yc-property-tr", { "is-selected": isRowSelected(row) }]),
|
|
621
|
+
onClick: ($event) => handleRowClick(row, rIdx)
|
|
622
|
+
}, [
|
|
623
|
+
vue.createCommentVNode(" \u52FE\u9009\u5355\u5143\u683C "),
|
|
624
|
+
__props.selectable ? (vue.openBlock(), vue.createElementBlock("td", {
|
|
625
|
+
key: 0,
|
|
626
|
+
class: "yc-property-td is-selection",
|
|
627
|
+
onClick: _cache[1] || (_cache[1] = vue.withModifiers(() => {
|
|
628
|
+
}, ["stop"]))
|
|
629
|
+
}, [
|
|
630
|
+
vue.createElementVNode("input", {
|
|
631
|
+
type: "checkbox",
|
|
632
|
+
class: "yc-property-checkbox",
|
|
633
|
+
checked: isRowSelected(row),
|
|
634
|
+
onChange: ($event) => handleToggleSelectRow(row)
|
|
635
|
+
}, null, 40, _hoisted_20)
|
|
636
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
637
|
+
vue.createCommentVNode(" \u6570\u636E\u5355\u5143\u683C "),
|
|
638
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
639
|
+
vue.Fragment,
|
|
640
|
+
null,
|
|
641
|
+
vue.renderList(internalColumns.value, (col) => {
|
|
642
|
+
return vue.openBlock(), vue.createElementBlock(
|
|
643
|
+
"td",
|
|
644
|
+
{
|
|
645
|
+
key: col.prop,
|
|
646
|
+
class: vue.normalizeClass(["yc-property-td", [`align-${col.align || "left"}`, col.className]])
|
|
647
|
+
},
|
|
648
|
+
[
|
|
649
|
+
vue.createCommentVNode(" \u81EA\u5B9A\u4E49\u5217\u63D2\u69FD "),
|
|
650
|
+
vue.renderSlot(_ctx.$slots, col.prop, {
|
|
651
|
+
row,
|
|
652
|
+
column: col,
|
|
653
|
+
index: rIdx,
|
|
654
|
+
value: getCellValue(row, col)
|
|
655
|
+
}, () => [
|
|
656
|
+
vue.createCommentVNode(" \u9884\u7F6E\u6E32\u67D3\u903B\u8F91 "),
|
|
657
|
+
col.type === "tag" ? (vue.openBlock(), vue.createElementBlock(
|
|
658
|
+
"span",
|
|
659
|
+
{
|
|
660
|
+
key: 0,
|
|
661
|
+
class: vue.normalizeClass(["yc-property-tag", `type-${getTagConfig(col, getCellValue(row, col)).type || "info"}`])
|
|
662
|
+
},
|
|
663
|
+
[
|
|
664
|
+
getTagConfig(col, getCellValue(row, col)).dot ? (vue.openBlock(), vue.createElementBlock(
|
|
665
|
+
"span",
|
|
666
|
+
{
|
|
667
|
+
key: 0,
|
|
668
|
+
class: vue.normalizeClass(["yc-property-tag__dot", { "is-pulsing": getTagConfig(col, getCellValue(row, col)).pulse }])
|
|
669
|
+
},
|
|
670
|
+
null,
|
|
671
|
+
2
|
|
672
|
+
/* CLASS */
|
|
673
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
674
|
+
vue.createTextVNode(
|
|
675
|
+
" " + vue.toDisplayString(getTagConfig(col, getCellValue(row, col)).label),
|
|
676
|
+
1
|
|
677
|
+
/* TEXT */
|
|
678
|
+
)
|
|
679
|
+
],
|
|
680
|
+
2
|
|
681
|
+
/* CLASS */
|
|
682
|
+
)) : col.type === "money" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_21, [
|
|
683
|
+
_cache[12] || (_cache[12] = vue.createElementVNode(
|
|
684
|
+
"span",
|
|
685
|
+
{ class: "yc-property-money__symbol" },
|
|
686
|
+
"\xA5",
|
|
687
|
+
-1
|
|
688
|
+
/* CACHED */
|
|
689
|
+
)),
|
|
690
|
+
vue.createElementVNode(
|
|
691
|
+
"span",
|
|
692
|
+
_hoisted_22,
|
|
693
|
+
vue.toDisplayString(formatMoney(getCellValue(row, col))),
|
|
694
|
+
1
|
|
695
|
+
/* TEXT */
|
|
696
|
+
)
|
|
697
|
+
])) : col.type === "phone" ? (vue.openBlock(), vue.createElementBlock(
|
|
698
|
+
vue.Fragment,
|
|
699
|
+
{ key: 2 },
|
|
700
|
+
[
|
|
701
|
+
getCellValue(row, col) ? (vue.openBlock(), vue.createElementBlock("a", {
|
|
702
|
+
key: 0,
|
|
703
|
+
href: `tel:${getCellValue(row, col)}`,
|
|
704
|
+
class: "yc-property-phone",
|
|
705
|
+
onClick: _cache[2] || (_cache[2] = vue.withModifiers(() => {
|
|
706
|
+
}, ["stop"]))
|
|
707
|
+
}, [
|
|
708
|
+
_cache[13] || (_cache[13] = vue.createElementVNode(
|
|
709
|
+
"svg",
|
|
710
|
+
{
|
|
711
|
+
class: "yc-property-phone__icon",
|
|
712
|
+
viewBox: "0 0 24 24",
|
|
713
|
+
width: "13",
|
|
714
|
+
height: "13",
|
|
715
|
+
fill: "none",
|
|
716
|
+
stroke: "currentColor",
|
|
717
|
+
"stroke-width": "2"
|
|
718
|
+
},
|
|
719
|
+
[
|
|
720
|
+
vue.createElementVNode("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" })
|
|
721
|
+
],
|
|
722
|
+
-1
|
|
723
|
+
/* CACHED */
|
|
724
|
+
)),
|
|
725
|
+
vue.createElementVNode(
|
|
726
|
+
"span",
|
|
727
|
+
null,
|
|
728
|
+
vue.toDisplayString(getCellValue(row, col)),
|
|
729
|
+
1
|
|
730
|
+
/* TEXT */
|
|
731
|
+
)
|
|
732
|
+
], 8, _hoisted_23)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_24, "-"))
|
|
733
|
+
],
|
|
734
|
+
64
|
|
735
|
+
/* STABLE_FRAGMENT */
|
|
736
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
737
|
+
vue.Fragment,
|
|
738
|
+
{ key: 3 },
|
|
739
|
+
[
|
|
740
|
+
vue.createTextVNode(
|
|
741
|
+
vue.toDisplayString(formatCellValue(row, col, rIdx)),
|
|
742
|
+
1
|
|
743
|
+
/* TEXT */
|
|
744
|
+
)
|
|
745
|
+
],
|
|
746
|
+
64
|
|
747
|
+
/* STABLE_FRAGMENT */
|
|
748
|
+
))
|
|
749
|
+
])
|
|
750
|
+
],
|
|
751
|
+
2
|
|
752
|
+
/* CLASS */
|
|
753
|
+
);
|
|
754
|
+
}),
|
|
755
|
+
128
|
|
756
|
+
/* KEYED_FRAGMENT */
|
|
757
|
+
)),
|
|
758
|
+
vue.createCommentVNode(" \u64CD\u4F5C\u680F\u5355\u5143\u683C "),
|
|
759
|
+
__props.actions && __props.actions.length > 0 ? (vue.openBlock(), vue.createElementBlock("td", {
|
|
760
|
+
key: 1,
|
|
761
|
+
class: "yc-property-td align-right is-actions",
|
|
762
|
+
onClick: _cache[3] || (_cache[3] = vue.withModifiers(() => {
|
|
763
|
+
}, ["stop"]))
|
|
764
|
+
}, [
|
|
765
|
+
vue.renderSlot(_ctx.$slots, "actions", {
|
|
766
|
+
row,
|
|
767
|
+
index: rIdx
|
|
768
|
+
}, () => [
|
|
769
|
+
vue.createElementVNode("div", _hoisted_25, [
|
|
770
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
771
|
+
vue.Fragment,
|
|
772
|
+
null,
|
|
773
|
+
vue.renderList(getVisibleActions(row), (act) => {
|
|
774
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
775
|
+
key: act.name,
|
|
776
|
+
type: "button",
|
|
777
|
+
class: vue.normalizeClass(["yc-property-btn", [`type-${act.type || "primary"}`, { "is-plain": act.plain }]]),
|
|
778
|
+
disabled: isActionDisabled(act, row),
|
|
779
|
+
onClick: ($event) => handleAction(act.name, row)
|
|
780
|
+
}, vue.toDisplayString(act.label), 11, _hoisted_26);
|
|
781
|
+
}),
|
|
782
|
+
128
|
|
783
|
+
/* KEYED_FRAGMENT */
|
|
784
|
+
))
|
|
785
|
+
])
|
|
786
|
+
])
|
|
787
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
788
|
+
], 10, _hoisted_19);
|
|
789
|
+
}),
|
|
790
|
+
128
|
|
791
|
+
/* KEYED_FRAGMENT */
|
|
792
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
793
|
+
vue.Fragment,
|
|
794
|
+
{ key: 1 },
|
|
795
|
+
[
|
|
796
|
+
vue.createCommentVNode(" \u7A7A\u6570\u636E\u72B6\u6001 "),
|
|
797
|
+
vue.createElementVNode("tr", _hoisted_27, [
|
|
798
|
+
vue.createElementVNode("td", {
|
|
799
|
+
colspan: internalColumns.value.length + (__props.selectable ? 1 : 0) + (__props.actions && __props.actions.length ? 1 : 0),
|
|
800
|
+
class: "yc-property-td is-empty"
|
|
801
|
+
}, [
|
|
802
|
+
vue.renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
803
|
+
vue.createElementVNode("div", _hoisted_29, [
|
|
804
|
+
_cache[14] || (_cache[14] = vue.createElementVNode(
|
|
805
|
+
"svg",
|
|
806
|
+
{
|
|
807
|
+
class: "yc-property-empty__icon",
|
|
808
|
+
viewBox: "0 0 64 64",
|
|
809
|
+
width: "48",
|
|
810
|
+
height: "48",
|
|
811
|
+
fill: "none",
|
|
812
|
+
stroke: "currentColor"
|
|
813
|
+
},
|
|
814
|
+
[
|
|
815
|
+
vue.createElementVNode("rect", {
|
|
816
|
+
x: "12",
|
|
817
|
+
y: "14",
|
|
818
|
+
width: "40",
|
|
819
|
+
height: "36",
|
|
820
|
+
rx: "4",
|
|
821
|
+
"stroke-width": "2",
|
|
822
|
+
"stroke-dasharray": "4 4"
|
|
823
|
+
}),
|
|
824
|
+
vue.createElementVNode("line", {
|
|
825
|
+
x1: "20",
|
|
826
|
+
y1: "26",
|
|
827
|
+
x2: "44",
|
|
828
|
+
y2: "26",
|
|
829
|
+
"stroke-width": "2"
|
|
830
|
+
}),
|
|
831
|
+
vue.createElementVNode("line", {
|
|
832
|
+
x1: "20",
|
|
833
|
+
y1: "36",
|
|
834
|
+
x2: "36",
|
|
835
|
+
y2: "36",
|
|
836
|
+
"stroke-width": "2"
|
|
837
|
+
})
|
|
838
|
+
],
|
|
839
|
+
-1
|
|
840
|
+
/* CACHED */
|
|
841
|
+
)),
|
|
842
|
+
vue.createElementVNode(
|
|
843
|
+
"p",
|
|
844
|
+
_hoisted_30,
|
|
845
|
+
vue.toDisplayString(__props.emptyText),
|
|
846
|
+
1
|
|
847
|
+
/* TEXT */
|
|
848
|
+
)
|
|
849
|
+
])
|
|
850
|
+
])
|
|
851
|
+
], 8, _hoisted_28)
|
|
852
|
+
])
|
|
853
|
+
],
|
|
854
|
+
2112
|
|
855
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
856
|
+
))
|
|
857
|
+
])
|
|
858
|
+
],
|
|
859
|
+
2
|
|
860
|
+
/* CLASS */
|
|
861
|
+
)
|
|
862
|
+
])
|
|
863
|
+
],
|
|
864
|
+
2112
|
|
865
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
866
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
867
|
+
vue.Fragment,
|
|
868
|
+
{ key: 3 },
|
|
869
|
+
[
|
|
870
|
+
vue.createCommentVNode(" 2. \u79FB\u52A8\u7AEF\u4E0E H5 \u4E13\u5C5E\u81EA\u9002\u5E94\u7CBE\u81F4\u5361\u7247\u6D41\u89C6\u56FE (layout === 'card') "),
|
|
871
|
+
vue.createElementVNode("div", _hoisted_31, [
|
|
872
|
+
paginatedData.value.length > 0 ? (vue.openBlock(true), vue.createElementBlock(
|
|
873
|
+
vue.Fragment,
|
|
874
|
+
{ key: 0 },
|
|
875
|
+
vue.renderList(paginatedData.value, (row, rIdx) => {
|
|
876
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
877
|
+
key: getRowKey(row, rIdx),
|
|
878
|
+
class: vue.normalizeClass(["yc-property-card-item", { "is-selected": isRowSelected(row) }]),
|
|
879
|
+
onClick: ($event) => handleRowClick(row, rIdx)
|
|
880
|
+
}, [
|
|
881
|
+
vue.createCommentVNode(" \u5141\u8BB8\u5B8C\u6574\u81EA\u5B9A\u4E49\u5361\u7247\u63D2\u69FD "),
|
|
882
|
+
vue.renderSlot(_ctx.$slots, "card", {
|
|
883
|
+
row,
|
|
884
|
+
index: rIdx,
|
|
885
|
+
columns: internalColumns.value
|
|
886
|
+
}, () => [
|
|
887
|
+
vue.createCommentVNode(" \u9ED8\u8BA4\u7ED3\u6784\u5316\u5361\u7247 "),
|
|
888
|
+
vue.createCommentVNode(" \u5361\u7247\u5934\u90E8 (\u4E3B\u6807 + \u72B6\u6001 Badge) "),
|
|
889
|
+
vue.createElementVNode("div", _hoisted_33, [
|
|
890
|
+
vue.renderSlot(_ctx.$slots, "card-header", {
|
|
891
|
+
row,
|
|
892
|
+
index: rIdx
|
|
893
|
+
}, () => {
|
|
894
|
+
var _a2;
|
|
895
|
+
return [
|
|
896
|
+
vue.createElementVNode("div", _hoisted_34, [
|
|
897
|
+
vue.createCommentVNode(" \u53EF\u9009\u591A\u9009\u6846 "),
|
|
898
|
+
__props.selectable ? (vue.openBlock(), vue.createElementBlock("input", {
|
|
899
|
+
key: 0,
|
|
900
|
+
type: "checkbox",
|
|
901
|
+
class: "yc-property-checkbox",
|
|
902
|
+
checked: isRowSelected(row),
|
|
903
|
+
onClick: _cache[4] || (_cache[4] = vue.withModifiers(() => {
|
|
904
|
+
}, ["stop"])),
|
|
905
|
+
onChange: ($event) => handleToggleSelectRow(row)
|
|
906
|
+
}, null, 40, _hoisted_35)) : vue.createCommentVNode("v-if", true),
|
|
907
|
+
vue.createCommentVNode(" \u4E3B\u6807\u9898 "),
|
|
908
|
+
vue.createElementVNode("div", _hoisted_36, [
|
|
909
|
+
vue.renderSlot(_ctx.$slots, (_a2 = primaryCol.value) == null ? void 0 : _a2.prop, {
|
|
910
|
+
row,
|
|
911
|
+
column: primaryCol.value,
|
|
912
|
+
index: rIdx,
|
|
913
|
+
value: primaryCol.value ? getCellValue(row, primaryCol.value) : ""
|
|
914
|
+
}, () => [
|
|
915
|
+
vue.createElementVNode(
|
|
916
|
+
"span",
|
|
917
|
+
null,
|
|
918
|
+
vue.toDisplayString(primaryCol.value ? formatCellValue(row, primaryCol.value, rIdx) : `\u8BB0\u5F55 #${rIdx + 1}`),
|
|
919
|
+
1
|
|
920
|
+
/* TEXT */
|
|
921
|
+
)
|
|
922
|
+
])
|
|
923
|
+
])
|
|
924
|
+
]),
|
|
925
|
+
vue.createCommentVNode(" \u72B6\u6001\u6807\u7B7E Badge (\u5982\u679C\u6709 tag \u5217) "),
|
|
926
|
+
statusCol.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_37, [
|
|
927
|
+
vue.createElementVNode(
|
|
928
|
+
"span",
|
|
929
|
+
{
|
|
930
|
+
class: vue.normalizeClass(["yc-property-tag", `type-${getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).type || "info"}`])
|
|
931
|
+
},
|
|
932
|
+
[
|
|
933
|
+
getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).dot ? (vue.openBlock(), vue.createElementBlock(
|
|
934
|
+
"span",
|
|
935
|
+
{
|
|
936
|
+
key: 0,
|
|
937
|
+
class: vue.normalizeClass(["yc-property-tag__dot", { "is-pulsing": getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).pulse }])
|
|
938
|
+
},
|
|
939
|
+
null,
|
|
940
|
+
2
|
|
941
|
+
/* CLASS */
|
|
942
|
+
)) : vue.createCommentVNode("v-if", true),
|
|
943
|
+
vue.createTextVNode(
|
|
944
|
+
" " + vue.toDisplayString(getTagConfig(statusCol.value, getCellValue(row, statusCol.value)).label),
|
|
945
|
+
1
|
|
946
|
+
/* TEXT */
|
|
947
|
+
)
|
|
948
|
+
],
|
|
949
|
+
2
|
|
950
|
+
/* CLASS */
|
|
951
|
+
)
|
|
952
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
953
|
+
];
|
|
954
|
+
})
|
|
955
|
+
]),
|
|
956
|
+
vue.createCommentVNode(" \u5361\u7247\u526F\u6807\u9898 (subPrimary) "),
|
|
957
|
+
subPrimaryCol.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_38, [
|
|
958
|
+
vue.renderSlot(_ctx.$slots, subPrimaryCol.value.prop, {
|
|
959
|
+
row,
|
|
960
|
+
column: subPrimaryCol.value,
|
|
961
|
+
index: rIdx,
|
|
962
|
+
value: getCellValue(row, subPrimaryCol.value)
|
|
963
|
+
}, () => [
|
|
964
|
+
vue.createTextVNode(
|
|
965
|
+
vue.toDisplayString(formatCellValue(row, subPrimaryCol.value, rIdx)),
|
|
966
|
+
1
|
|
967
|
+
/* TEXT */
|
|
968
|
+
)
|
|
969
|
+
])
|
|
970
|
+
])) : vue.createCommentVNode("v-if", true),
|
|
971
|
+
vue.createCommentVNode(" \u5361\u7247\u4E3B\u4F53\u591A\u5B57\u6BB5\u7F51\u683C (\u81EA\u52A8\u7D27\u51D1\u6392\u7248) "),
|
|
972
|
+
vue.createElementVNode("div", _hoisted_39, [
|
|
973
|
+
vue.renderSlot(_ctx.$slots, "card-body", {
|
|
974
|
+
row,
|
|
975
|
+
index: rIdx
|
|
976
|
+
}, () => [
|
|
977
|
+
vue.createElementVNode("div", _hoisted_40, [
|
|
978
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
979
|
+
vue.Fragment,
|
|
980
|
+
null,
|
|
981
|
+
vue.renderList(cardVisibleColumns.value, (col) => {
|
|
982
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
983
|
+
key: col.prop,
|
|
984
|
+
class: "yc-property-card-field"
|
|
985
|
+
}, [
|
|
986
|
+
vue.createElementVNode(
|
|
987
|
+
"span",
|
|
988
|
+
_hoisted_41,
|
|
989
|
+
vue.toDisplayString(col.label),
|
|
990
|
+
1
|
|
991
|
+
/* TEXT */
|
|
992
|
+
),
|
|
993
|
+
vue.createElementVNode("span", _hoisted_42, [
|
|
994
|
+
vue.renderSlot(_ctx.$slots, col.prop, {
|
|
995
|
+
row,
|
|
996
|
+
column: col,
|
|
997
|
+
index: rIdx,
|
|
998
|
+
value: getCellValue(row, col)
|
|
999
|
+
}, () => [
|
|
1000
|
+
col.type === "tag" ? (vue.openBlock(), vue.createElementBlock(
|
|
1001
|
+
"span",
|
|
1002
|
+
{
|
|
1003
|
+
key: 0,
|
|
1004
|
+
class: vue.normalizeClass(["yc-property-tag", `type-${getTagConfig(col, getCellValue(row, col)).type || "info"}`])
|
|
1005
|
+
},
|
|
1006
|
+
vue.toDisplayString(getTagConfig(col, getCellValue(row, col)).label),
|
|
1007
|
+
3
|
|
1008
|
+
/* TEXT, CLASS */
|
|
1009
|
+
)) : col.type === "money" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_43, [
|
|
1010
|
+
_cache[15] || (_cache[15] = vue.createElementVNode(
|
|
1011
|
+
"span",
|
|
1012
|
+
{ class: "yc-property-money__symbol" },
|
|
1013
|
+
"\xA5",
|
|
1014
|
+
-1
|
|
1015
|
+
/* CACHED */
|
|
1016
|
+
)),
|
|
1017
|
+
vue.createElementVNode(
|
|
1018
|
+
"span",
|
|
1019
|
+
_hoisted_44,
|
|
1020
|
+
vue.toDisplayString(formatMoney(getCellValue(row, col))),
|
|
1021
|
+
1
|
|
1022
|
+
/* TEXT */
|
|
1023
|
+
)
|
|
1024
|
+
])) : col.type === "phone" ? (vue.openBlock(), vue.createElementBlock(
|
|
1025
|
+
vue.Fragment,
|
|
1026
|
+
{ key: 2 },
|
|
1027
|
+
[
|
|
1028
|
+
getCellValue(row, col) ? (vue.openBlock(), vue.createElementBlock("a", {
|
|
1029
|
+
key: 0,
|
|
1030
|
+
href: `tel:${getCellValue(row, col)}`,
|
|
1031
|
+
class: "yc-property-phone",
|
|
1032
|
+
onClick: _cache[5] || (_cache[5] = vue.withModifiers(() => {
|
|
1033
|
+
}, ["stop"]))
|
|
1034
|
+
}, vue.toDisplayString(getCellValue(row, col)), 9, _hoisted_45)) : (vue.openBlock(), vue.createElementBlock("span", _hoisted_46, "-"))
|
|
1035
|
+
],
|
|
1036
|
+
64
|
|
1037
|
+
/* STABLE_FRAGMENT */
|
|
1038
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
1039
|
+
vue.Fragment,
|
|
1040
|
+
{ key: 3 },
|
|
1041
|
+
[
|
|
1042
|
+
vue.createTextVNode(
|
|
1043
|
+
vue.toDisplayString(formatCellValue(row, col, rIdx)),
|
|
1044
|
+
1
|
|
1045
|
+
/* TEXT */
|
|
1046
|
+
)
|
|
1047
|
+
],
|
|
1048
|
+
64
|
|
1049
|
+
/* STABLE_FRAGMENT */
|
|
1050
|
+
))
|
|
1051
|
+
])
|
|
1052
|
+
])
|
|
1053
|
+
]);
|
|
1054
|
+
}),
|
|
1055
|
+
128
|
|
1056
|
+
/* KEYED_FRAGMENT */
|
|
1057
|
+
))
|
|
1058
|
+
])
|
|
1059
|
+
])
|
|
1060
|
+
]),
|
|
1061
|
+
vue.createCommentVNode(" \u79FB\u52A8\u7AEF\u5E95\u90E8\u5FEB\u6377\u64CD\u4F5C\u680F (\u5927\u89E6\u63A7\u533A\uFF0C\u9002\u5408\u624B\u673A\u5355\u624B\u64CD\u4F5C) "),
|
|
1062
|
+
__props.actions && __props.actions.length > 0 ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
1063
|
+
key: 1,
|
|
1064
|
+
class: "yc-property-card-actions",
|
|
1065
|
+
onClick: _cache[6] || (_cache[6] = vue.withModifiers(() => {
|
|
1066
|
+
}, ["stop"]))
|
|
1067
|
+
}, [
|
|
1068
|
+
vue.renderSlot(_ctx.$slots, "card-actions", {
|
|
1069
|
+
row,
|
|
1070
|
+
index: rIdx
|
|
1071
|
+
}, () => [
|
|
1072
|
+
(vue.openBlock(true), vue.createElementBlock(
|
|
1073
|
+
vue.Fragment,
|
|
1074
|
+
null,
|
|
1075
|
+
vue.renderList(getVisibleActions(row), (act) => {
|
|
1076
|
+
return vue.openBlock(), vue.createElementBlock("button", {
|
|
1077
|
+
key: act.name,
|
|
1078
|
+
type: "button",
|
|
1079
|
+
class: vue.normalizeClass(["yc-property-card-btn", [`type-${act.type || "primary"}`, { "is-plain": act.plain }]]),
|
|
1080
|
+
disabled: isActionDisabled(act, row),
|
|
1081
|
+
onClick: ($event) => handleAction(act.name, row)
|
|
1082
|
+
}, vue.toDisplayString(act.label), 11, _hoisted_47);
|
|
1083
|
+
}),
|
|
1084
|
+
128
|
|
1085
|
+
/* KEYED_FRAGMENT */
|
|
1086
|
+
))
|
|
1087
|
+
])
|
|
1088
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
1089
|
+
])
|
|
1090
|
+
], 10, _hoisted_32);
|
|
1091
|
+
}),
|
|
1092
|
+
128
|
|
1093
|
+
/* KEYED_FRAGMENT */
|
|
1094
|
+
)) : (vue.openBlock(), vue.createElementBlock(
|
|
1095
|
+
vue.Fragment,
|
|
1096
|
+
{ key: 1 },
|
|
1097
|
+
[
|
|
1098
|
+
vue.createCommentVNode(" \u79FB\u52A8\u7AEF\u7A7A\u6570\u636E\u72B6\u6001 "),
|
|
1099
|
+
vue.createElementVNode("div", _hoisted_48, [
|
|
1100
|
+
_cache[16] || (_cache[16] = vue.createElementVNode(
|
|
1101
|
+
"svg",
|
|
1102
|
+
{
|
|
1103
|
+
class: "yc-property-empty__icon",
|
|
1104
|
+
viewBox: "0 0 64 64",
|
|
1105
|
+
width: "48",
|
|
1106
|
+
height: "48",
|
|
1107
|
+
fill: "none",
|
|
1108
|
+
stroke: "currentColor"
|
|
1109
|
+
},
|
|
1110
|
+
[
|
|
1111
|
+
vue.createElementVNode("rect", {
|
|
1112
|
+
x: "12",
|
|
1113
|
+
y: "14",
|
|
1114
|
+
width: "40",
|
|
1115
|
+
height: "36",
|
|
1116
|
+
rx: "4",
|
|
1117
|
+
"stroke-width": "2",
|
|
1118
|
+
"stroke-dasharray": "4 4"
|
|
1119
|
+
}),
|
|
1120
|
+
vue.createElementVNode("line", {
|
|
1121
|
+
x1: "20",
|
|
1122
|
+
y1: "26",
|
|
1123
|
+
x2: "44",
|
|
1124
|
+
y2: "26",
|
|
1125
|
+
"stroke-width": "2"
|
|
1126
|
+
}),
|
|
1127
|
+
vue.createElementVNode("line", {
|
|
1128
|
+
x1: "20",
|
|
1129
|
+
y1: "36",
|
|
1130
|
+
x2: "36",
|
|
1131
|
+
y2: "36",
|
|
1132
|
+
"stroke-width": "2"
|
|
1133
|
+
})
|
|
1134
|
+
],
|
|
1135
|
+
-1
|
|
1136
|
+
/* CACHED */
|
|
1137
|
+
)),
|
|
1138
|
+
vue.createElementVNode(
|
|
1139
|
+
"p",
|
|
1140
|
+
_hoisted_49,
|
|
1141
|
+
vue.toDisplayString(__props.emptyText),
|
|
1142
|
+
1
|
|
1143
|
+
/* TEXT */
|
|
1144
|
+
)
|
|
1145
|
+
])
|
|
1146
|
+
],
|
|
1147
|
+
2112
|
|
1148
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
1149
|
+
))
|
|
1150
|
+
])
|
|
1151
|
+
],
|
|
1152
|
+
2112
|
|
1153
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
1154
|
+
)),
|
|
1155
|
+
vue.createCommentVNode(" \u5206\u9875\u4E0E\u5E95\u90E8\u7EDF\u8BA1\u680F "),
|
|
1156
|
+
showPagination.value ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_50, [
|
|
1157
|
+
vue.createElementVNode("div", _hoisted_51, [
|
|
1158
|
+
_cache[19] || (_cache[19] = vue.createTextVNode(
|
|
1159
|
+
" \u5171 ",
|
|
1160
|
+
-1
|
|
1161
|
+
/* CACHED */
|
|
1162
|
+
)),
|
|
1163
|
+
vue.createElementVNode(
|
|
1164
|
+
"span",
|
|
1165
|
+
_hoisted_52,
|
|
1166
|
+
vue.toDisplayString(totalItems.value),
|
|
1167
|
+
1
|
|
1168
|
+
/* TEXT */
|
|
1169
|
+
),
|
|
1170
|
+
_cache[20] || (_cache[20] = vue.createTextVNode(
|
|
1171
|
+
" \u6761\u8BB0\u5F55 ",
|
|
1172
|
+
-1
|
|
1173
|
+
/* CACHED */
|
|
1174
|
+
)),
|
|
1175
|
+
selectedRowsList.value.length > 0 ? (vue.openBlock(), vue.createElementBlock(
|
|
1176
|
+
vue.Fragment,
|
|
1177
|
+
{ key: 0 },
|
|
1178
|
+
[
|
|
1179
|
+
_cache[17] || (_cache[17] = vue.createTextVNode(
|
|
1180
|
+
" \uFF0C\u5DF2\u9009\u4E2D ",
|
|
1181
|
+
-1
|
|
1182
|
+
/* CACHED */
|
|
1183
|
+
)),
|
|
1184
|
+
vue.createElementVNode(
|
|
1185
|
+
"span",
|
|
1186
|
+
_hoisted_53,
|
|
1187
|
+
vue.toDisplayString(selectedRowsList.value.length),
|
|
1188
|
+
1
|
|
1189
|
+
/* TEXT */
|
|
1190
|
+
),
|
|
1191
|
+
_cache[18] || (_cache[18] = vue.createTextVNode(
|
|
1192
|
+
" \u9879 ",
|
|
1193
|
+
-1
|
|
1194
|
+
/* CACHED */
|
|
1195
|
+
))
|
|
1196
|
+
],
|
|
1197
|
+
64
|
|
1198
|
+
/* STABLE_FRAGMENT */
|
|
1199
|
+
)) : vue.createCommentVNode("v-if", true)
|
|
1200
|
+
]),
|
|
1201
|
+
vue.createCommentVNode(" \u5206\u9875\u63A7\u5236 "),
|
|
1202
|
+
vue.createElementVNode("div", _hoisted_54, [
|
|
1203
|
+
vue.createElementVNode("button", {
|
|
1204
|
+
type: "button",
|
|
1205
|
+
class: "yc-property-pagination__btn",
|
|
1206
|
+
disabled: currentPage.value <= 1,
|
|
1207
|
+
onClick: _cache[7] || (_cache[7] = ($event) => changePage(currentPage.value - 1))
|
|
1208
|
+
}, " \u4E0A\u4E00\u9875 ", 8, _hoisted_55),
|
|
1209
|
+
vue.createElementVNode(
|
|
1210
|
+
"span",
|
|
1211
|
+
_hoisted_56,
|
|
1212
|
+
vue.toDisplayString(currentPage.value) + " / " + vue.toDisplayString(totalPages.value || 1),
|
|
1213
|
+
1
|
|
1214
|
+
/* TEXT */
|
|
1215
|
+
),
|
|
1216
|
+
vue.createElementVNode("button", {
|
|
1217
|
+
type: "button",
|
|
1218
|
+
class: "yc-property-pagination__btn",
|
|
1219
|
+
disabled: currentPage.value >= totalPages.value,
|
|
1220
|
+
onClick: _cache[8] || (_cache[8] = ($event) => changePage(currentPage.value + 1))
|
|
1221
|
+
}, " \u4E0B\u4E00\u9875 ", 8, _hoisted_57)
|
|
1222
|
+
])
|
|
1223
|
+
])) : vue.createCommentVNode("v-if", true)
|
|
1224
|
+
],
|
|
1225
|
+
6
|
|
1226
|
+
/* CLASS, STYLE */
|
|
1227
|
+
);
|
|
1228
|
+
};
|
|
1229
|
+
}
|
|
1230
|
+
});
|
|
1231
|
+
|
|
1232
|
+
exports.default = _sfc_main;
|