Skip to content

Commit aa44d45

Browse files
committed
VanUI 0.11.2: choose function: Put the label to the top.
1 parent 1ac3137 commit aa44d45

28 files changed

+73
-76
lines changed

components/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ import { <components you want to import> } from "vanjs-ui"
5252
Alternatively, you can import **VanUI** from CDN via a `<script type="text/javascript">` tag:
5353

5454
```html
55-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vanjs-ui@0.11.0/dist/van-ui.nomodule.min.js"></script>
55+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vanjs-ui@0.11.2/dist/van-ui.nomodule.min.js"></script>
5656
```
5757

58-
`https://cdn.jsdelivr.net/npm/vanjs-ui@0.11.0/dist/van-ui.nomodule.js` can be used for the non-minified version.
58+
`https://cdn.jsdelivr.net/npm/vanjs-ui@0.11.2/dist/van-ui.nomodule.js` can be used for the non-minified version.
5959

6060
Note that: **VanJS** needs to be imported via a `<script type="text/javascript">` tag for **VanUI** to work properly.
6161

components/dist/van-ui.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@ export const choose = ({ label, options, selectedColor = "#f5f5f5", customModalP
454454
let resolve;
455455
const res = new Promise(r => resolve = r);
456456
const textFilterStyle = {
457-
width: "100%",
457+
width: "98%",
458+
"margin-top": "0.5rem",
459+
"margin-bottom": "0.5rem",
458460
...textFilterStyleOverrides,
459461
};
460462
const optionsContainerStyle = {
@@ -468,7 +470,7 @@ export const choose = ({ label, options, selectedColor = "#f5f5f5", customModalP
468470
style: toStyleStr(textFilterStyle),
469471
oninput: e => query.val = e.target.value
470472
});
471-
const modalDom = div(Modal(modalProps, div(textFilterDom), () => div({ class: optionsContainerClass, style: toStyleStr(optionsContainerStyle) }, div(label), filtered.val.map((o, i) => div({
473+
const modalDom = div(Modal(modalProps, div(label), div(textFilterDom), () => div({ class: optionsContainerClass, style: toStyleStr(optionsContainerStyle) }, filtered.val.map((o, i) => div({
472474
class: () => [].concat(optionClass ? optionClass : [], i === index.val ? "vanui-choose-selected" : [], i === index.val && selectedClass ? selectedClass : []).join(" "),
473475
style: () => toStyleStr({
474476
padding: "0.5rem",

components/dist/van-ui.nomodule.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,9 @@
454454
let resolve;
455455
const res = new Promise(r => resolve = r);
456456
const textFilterStyle = {
457-
width: "100%",
457+
width: "98%",
458+
"margin-top": "0.5rem",
459+
"margin-bottom": "0.5rem",
458460
...textFilterStyleOverrides,
459461
};
460462
const optionsContainerStyle = {
@@ -468,7 +470,7 @@
468470
style: toStyleStr(textFilterStyle),
469471
oninput: e => query.val = e.target.value
470472
});
471-
const modalDom = div(Modal(modalProps, div(textFilterDom), () => div({ class: optionsContainerClass, style: toStyleStr(optionsContainerStyle) }, div(label), filtered.val.map((o, i) => div({
473+
const modalDom = div(Modal(modalProps, div(label), div(textFilterDom), () => div({ class: optionsContainerClass, style: toStyleStr(optionsContainerStyle) }, filtered.val.map((o, i) => div({
472474
class: () => [].concat(optionClass ? optionClass : [], i === index.val ? "vanui-choose-selected" : [], i === index.val && selectedClass ? selectedClass : []).join(" "),
473475
style: () => toStyleStr({
474476
padding: "0.5rem",

components/dist/van-ui.nomodule.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/examples/await/package-lock.json

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/examples/await/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
},
1616
"dependencies": {
1717
"vanjs-core": "^1.5.2",
18-
"vanjs-ui": "^0.11.0"
18+
"vanjs-ui": "^0.11.2"
1919
}
2020
}

components/examples/banner/package-lock.json

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/examples/banner/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
},
1616
"dependencies": {
1717
"vanjs-core": "^1.5.2",
18-
"vanjs-ui": "^0.11.0"
18+
"vanjs-ui": "^0.11.2"
1919
}
2020
}

components/examples/choose/package-lock.json

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/examples/choose/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
},
1616
"dependencies": {
1717
"vanjs-core": "^1.5.2",
18-
"vanjs-ui": "^0.11.0"
18+
"vanjs-ui": "^0.11.2"
1919
}
2020
}

0 commit comments

Comments
 (0)