ct-component-plus 0.0.12 → 0.0.15
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/package.json
CHANGED
|
@@ -124,13 +124,15 @@ const getComponentProps = (item) => {
|
|
|
124
124
|
param: item.param,
|
|
125
125
|
label: item.label,
|
|
126
126
|
options: item.list,
|
|
127
|
-
placeholder: item.placeholder,
|
|
128
127
|
multiple: item.multiple,
|
|
128
|
+
api: item.api,
|
|
129
|
+
placeholder: item.placeholder,
|
|
129
130
|
clearable: item.clearable,
|
|
130
131
|
disabled: item.disabled,
|
|
131
132
|
range: item.range,
|
|
132
133
|
mapObj: item.mapObj,
|
|
133
134
|
name: item.param, //用作插槽名
|
|
135
|
+
rawAttr: item.rawAttr,
|
|
134
136
|
|
|
135
137
|
["on" + bpKey]: handleBuriedParams,
|
|
136
138
|
};
|
|
@@ -78,13 +78,13 @@ const serviceConfig = inject("$ctServiceConfig");
|
|
|
78
78
|
const props = defineProps(selectProps);
|
|
79
79
|
const emit = defineEmits(selectEmits);
|
|
80
80
|
|
|
81
|
-
const getBuriedContent = () => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
};
|
|
81
|
+
// const getBuriedContent = () => {
|
|
82
|
+
// const select = selectObj.value;
|
|
83
|
+
// if (isArray(select)) {
|
|
84
|
+
// return select.map((item) => item.label);
|
|
85
|
+
// }
|
|
86
|
+
// return select.label;
|
|
87
|
+
// };
|
|
88
88
|
const ns = useNamespace("select");
|
|
89
89
|
const optionsByApi = ref([]);
|
|
90
90
|
const showOptions = computed(() => {
|
|
@@ -107,12 +107,21 @@ const selectLength = computed(() => {
|
|
|
107
107
|
});
|
|
108
108
|
const filterOptions = ref([]);
|
|
109
109
|
const noFilterOptions = ref(false);
|
|
110
|
-
const selectObj = computed(
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
return
|
|
115
|
-
|
|
110
|
+
const selectObj = computed({
|
|
111
|
+
get() {
|
|
112
|
+
if (!props.multiple)
|
|
113
|
+
return showOptions.value.find((item) => item.value === valueModel.value);
|
|
114
|
+
return showOptions.value.filter((item) => {
|
|
115
|
+
return valueModel.value.includes(item.value);
|
|
116
|
+
});
|
|
117
|
+
},
|
|
118
|
+
set(newValue) {
|
|
119
|
+
if (!props.multiple) {
|
|
120
|
+
valueModel.value = newValue.value;
|
|
121
|
+
} else {
|
|
122
|
+
valueModel.value = newValue.map((item) => item.value);
|
|
123
|
+
}
|
|
124
|
+
},
|
|
116
125
|
});
|
|
117
126
|
const selectText = computed(() => {
|
|
118
127
|
if (!props.multiple) return "";
|
|
@@ -109,7 +109,7 @@ import { tableEmits, tableProps } from "./index";
|
|
|
109
109
|
import TableSort from "./TableSort.vue";
|
|
110
110
|
const props = defineProps(tableProps);
|
|
111
111
|
const emit = defineEmits(tableEmits);
|
|
112
|
-
const tableEmptyDom = inject("$tableEmptyDom");
|
|
112
|
+
const tableEmptyDom = inject("$tableEmptyDom", null);
|
|
113
113
|
|
|
114
114
|
const ns = useNamespace("table");
|
|
115
115
|
const tableRef = ref(null);
|