jobsys-newbie 2.0.7 → 2.0.8
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/components/search/components/Expand.jsx +7 -5
- package/components/search/index.less +6 -3
- package/dist/jobsys-newbie.cjs +11 -11
- package/dist/jobsys-newbie.cjs.map +1 -1
- package/dist/jobsys-newbie.css +1 -1
- package/dist/jobsys-newbie.js +681 -677
- package/dist/jobsys-newbie.js.map +1 -1
- package/package.json +1 -1
- package/playground/search/TestSearch.vue +10 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CheckableTag, Space } from "ant-design-vue"
|
|
2
2
|
import { ref } from "vue"
|
|
3
3
|
import { find, isFunction, isNumber, isString } from "lodash-es"
|
|
4
|
-
import { useI18nJoin
|
|
4
|
+
import { useI18nJoin } from "../../../hooks/index.js"
|
|
5
|
+
import { useI18n } from "vue-i18n"
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
*
|
|
@@ -9,6 +10,7 @@ import { useI18nJoin, useT } from "../../../hooks/index.js"
|
|
|
9
10
|
* @param {Object} queryForm
|
|
10
11
|
*/
|
|
11
12
|
const render = (item, queryForm) => {
|
|
13
|
+
const { t } = useI18n()
|
|
12
14
|
let options = isFunction(item.options) ? item.options() : item.options
|
|
13
15
|
options = options.map((op) => (isString(op) || isNumber(op) ? { value: op, label: op } : op))
|
|
14
16
|
|
|
@@ -60,11 +62,11 @@ const render = (item, queryForm) => {
|
|
|
60
62
|
value = null
|
|
61
63
|
} else {
|
|
62
64
|
const label = value.map((val) => find(options, { value: val })?.label)?.join(",")
|
|
63
|
-
searchLabel = `${useI18nJoin(item.title,
|
|
65
|
+
searchLabel = `${useI18nJoin(item.title, t("search.include"))}: ${label}`
|
|
64
66
|
}
|
|
65
67
|
} else {
|
|
66
68
|
value = queryForm[item.key].value?.[0] || null
|
|
67
|
-
searchLabel = `${useI18nJoin(item.title,
|
|
69
|
+
searchLabel = `${useI18nJoin(item.title, t("search.equal"))}: ${find(options, { value })?.label}`
|
|
68
70
|
}
|
|
69
71
|
return { value, searchLabel }
|
|
70
72
|
}
|
|
@@ -73,7 +75,7 @@ const render = (item, queryForm) => {
|
|
|
73
75
|
<div class={"newbie-search-expand-item"}>
|
|
74
76
|
<div class={"newbie-search-expand-item-title"}>{item.title}:</div>
|
|
75
77
|
<div class={"newbie-search-expand-item-options"}>
|
|
76
|
-
<Space size={
|
|
78
|
+
<Space size={[8, 2]} wrap={true}>
|
|
77
79
|
{{
|
|
78
80
|
default: () =>
|
|
79
81
|
options.map((option, index) => (
|
|
@@ -84,7 +86,7 @@ const render = (item, queryForm) => {
|
|
|
84
86
|
}}
|
|
85
87
|
</Space>
|
|
86
88
|
</div>
|
|
87
|
-
<div class={"newbie-search-expand-item-extra"}>{item.expandable === "multiple" ?
|
|
89
|
+
<div class={"newbie-search-expand-item-extra"}>{item.expandable === "multiple" ? t("search.multiple-choice-available") : ""}</div>
|
|
88
90
|
</div>
|
|
89
91
|
)
|
|
90
92
|
}
|
|
@@ -128,11 +128,10 @@
|
|
|
128
128
|
|
|
129
129
|
.newbie-search-expand-item {
|
|
130
130
|
display: flex;
|
|
131
|
-
align-items:
|
|
131
|
+
align-items: stretch;
|
|
132
132
|
justify-content: space-between;
|
|
133
133
|
border-top: 1px solid #eee;
|
|
134
134
|
border-radius: 4px;
|
|
135
|
-
overflow: hidden;
|
|
136
135
|
|
|
137
136
|
&:last-child {
|
|
138
137
|
border-bottom: 1px solid #eee;
|
|
@@ -152,8 +151,12 @@
|
|
|
152
151
|
.newbie-search-expand-item-options {
|
|
153
152
|
flex-grow: 1;
|
|
154
153
|
margin-left: 20px;
|
|
154
|
+
padding: 4px 0;
|
|
155
|
+
.ant-space{
|
|
156
|
+
margin-bottom: 0 !important;
|
|
157
|
+
}
|
|
155
158
|
|
|
156
|
-
|
|
159
|
+
.ant-tag {
|
|
157
160
|
font-size: 13px;
|
|
158
161
|
}
|
|
159
162
|
}
|