在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):PolymerElements/paper-item开源软件地址(OpenSource Url):https://github.com/PolymerElements/paper-item开源编程语言(OpenSource Language):JavaScript 61.6%开源软件介绍(OpenSource Introduction):<paper-item>
<paper-item>Item</paper-item> Use this element with <paper-item>
<paper-item-body two-line>
<div>Show your status</div>
<div secondary>Your status is visible to everyone</div>
</paper-item-body>
<iron-icon icon="warning"></iron-icon>
</paper-item> To use <a href="https://www.polymer-project.org/" tabindex="-1">
<paper-item raised>Polymer Project</paper-item>
</a> If you are concerned about performance and want to use <style is="custom-style" include="paper-item-shared-styles"></style>
<paper-listbox>
<button class="paper-item" role="option">Inbox</button>
<button class="paper-item" role="option">Starred</button>
<button class="paper-item" role="option">Sent mail</button>
</paper-listbox> StylingThe following custom properties and mixins are available for styling:
AccessibilityThis element has <paper-item role="menuitemcheckbox">
<paper-item-body>
Show your status
</paper-item-body>
<paper-checkbox></paper-checkbox>
</paper-item> <paper-icon-item>
<paper-icon-item>
<iron-icon icon="favorite" slot="item-icon"></iron-icon>
Favorite
</paper-icon-item>
<paper-icon-item>
<div class="avatar" slot="item-icon"></div>
Avatar
</paper-icon-item> StylingThe following custom properties and mixins are available for styling:
Changes in 2.0Distribution is now done with the
<paper-item-body>Use <paper-item>
<paper-item-body two-line>
<div>Show your status</div>
<div secondary>Your status is visible to everyone</div>
</paper-item-body>
</paper-item> The child elements with the StylingThe following custom properties and mixins are available for styling:
See: Documentation, Demo. UsageInstallation
In an html file<html>
<head>
<script type="module">
import '@polymer/paper-item/paper-item.js';
</script>
</head>
<body>
<paper-item>Item</paper-item>
</body>
</html> In a Polymer 3 elementimport {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-item/paper-item.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<paper-item>Item</paper-item>
`;
}
}
customElements.define('sample-element', SampleElement); ContributingIf you want to send a PR to this element, here are the instructions for running the tests and demo locally: Installationgit clone https://github.com/PolymerElements/paper-item
cd paper-item
npm install
npm install -g polymer-cli Running the demo locallypolymer serve --npm
open http://127.0.0.1:<port>/demo/ Running the testspolymer test --npm |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论