@opentiny/vue-renderless 3.12.0 → 3.12.1
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/col/index.js +7 -2
- package/col/vue.js +2 -3
- package/package.json +1 -1
- package/select/index.js +9 -3
- package/types/date-picker.type.d.ts +1 -1
package/col/index.js
CHANGED
|
@@ -81,9 +81,14 @@ const getStyle = ({ props, state }) => () => {
|
|
|
81
81
|
const no = props.no;
|
|
82
82
|
const styles = [];
|
|
83
83
|
let gutter = parent ? parent.gutter : null;
|
|
84
|
+
let noSpace = parent ? parent.noSpace : null;
|
|
84
85
|
let order = "";
|
|
85
|
-
|
|
86
|
-
|
|
86
|
+
if (gutter) {
|
|
87
|
+
gutter = gutter / 2;
|
|
88
|
+
styles.push(`padding-left:${gutter}px;padding-right:${gutter}px;`);
|
|
89
|
+
} else if (noSpace) {
|
|
90
|
+
styles.push("padding-left:0;padding-right:0;");
|
|
91
|
+
}
|
|
87
92
|
if (parent && parent.flex && parent.order) {
|
|
88
93
|
order = parent.order === "asc" ? no : -no;
|
|
89
94
|
styles.push(`order:${order};-webkit-order:${order};-ms-order:${order};-moz-order:${order};`);
|
package/col/vue.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import "../chunk-G2ADBYYC.js";
|
|
2
2
|
import { setSubitemAttrValue, setGlobalAttrValue, getClassName, getStyle, row } from "./index";
|
|
3
3
|
const api = ["state"];
|
|
4
|
-
const renderless = (props, { computed, reactive
|
|
4
|
+
const renderless = (props, { computed, reactive }, { parent }) => {
|
|
5
5
|
const api2 = {};
|
|
6
6
|
const state = reactive({
|
|
7
7
|
row: computed(() => api2.row()),
|
|
8
8
|
style: computed(() => api2.getStyle()),
|
|
9
|
-
className: computed(() => api2.getClassName())
|
|
10
|
-
layout: inject("layout")
|
|
9
|
+
className: computed(() => api2.getClassName())
|
|
11
10
|
});
|
|
12
11
|
Object.assign(api2, {
|
|
13
12
|
state,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opentiny/vue-renderless",
|
|
3
|
-
"version": "3.12.
|
|
3
|
+
"version": "3.12.1",
|
|
4
4
|
"description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
|
|
5
5
|
"homepage": "https://opentiny.design/tiny-vue",
|
|
6
6
|
"keywords": [
|
package/select/index.js
CHANGED
|
@@ -204,10 +204,16 @@ const getOption = ({ props, state }) => (value) => {
|
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
206
|
if (option) {
|
|
207
|
-
if (
|
|
208
|
-
|
|
207
|
+
if (props.optimization) {
|
|
208
|
+
const cloneOption = extend(true, {}, option);
|
|
209
|
+
cloneOption.currentLabel = cloneOption[props.textField];
|
|
210
|
+
return cloneOption;
|
|
211
|
+
} else {
|
|
212
|
+
if (!option.currentLabel) {
|
|
213
|
+
option.currentLabel = option[props.textField];
|
|
214
|
+
}
|
|
215
|
+
return option;
|
|
209
216
|
}
|
|
210
|
-
return option;
|
|
211
217
|
}
|
|
212
218
|
let label = "";
|
|
213
219
|
if (!isObject(value) && !isNull(value) && !props.clearNoMatchValue) {
|
|
@@ -28,7 +28,7 @@ declare const $constants: {
|
|
|
28
28
|
};
|
|
29
29
|
declare const datePickerProps: {
|
|
30
30
|
type: {
|
|
31
|
-
type: PropType<"date" | "dates" | "
|
|
31
|
+
type: PropType<"date" | "dates" | "year" | "years" | "yearrange" | "month" | "week" | "daterange" | "datetimerange" | "monthrange" | "datetime">;
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
34
|
_constants: {
|