在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):PolymerElements/paper-dialog开源软件地址(OpenSource Url):https://github.com/PolymerElements/paper-dialog开源编程语言(OpenSource Language):HTML 52.3%开源软件介绍(OpenSource Introduction):<paper-dialog>
For example, the following code implements a dialog with a header, scrolling content area and
buttons. Focus will be given to the <paper-dialog>
<h2>Header</h2>
<paper-dialog-scrollable>
Lorem ipsum...
</paper-dialog-scrollable>
<div class="buttons">
<paper-button dialog-dismiss>Cancel</paper-button>
<paper-button dialog-confirm autofocus>Accept</paper-button>
</div>
</paper-dialog> StylingSee the docs for AnimationsSet the For example: <script type="module">
import '@polymer/neon-animation/animations/scale-up-animation.js';
import '@polymer/neon-animation/animations/fade-out-animation.js';
</script>
<paper-dialog entry-animation="scale-up-animation"
exit-animation="fade-out-animation">
<h2>Header</h2>
<div>Dialog body</div>
</paper-dialog> AccessibilitySee the docs for See: Documentation, Demo. UsageInstallation
In an html file<html>
<head>
<script type="module">
import '@polymer/paper-dialog/paper-dialog.js';
</script>
</head>
<body>
<paper-dialog>
<h2>Content</h2>
</paper-dialog>
</body>
</html> In a Polymer 3 elementimport {PolymerElement, html} from '@polymer/polymer';
import '@polymer/paper-dialog/paper-dialog.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<paper-dialog>
<h2>Content</h2>
</paper-dialog>
`;
}
}
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-dialog
cd paper-dialog
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
请发表评论