被否决
这一部分正在贬值。 代码基础已移动到 amf 组件 模块。 此模块将在 PR 1 常规文件 合并.
列表的 HTTP 方法名称显示标签 .
<http-method-label method="get"></http-method-label>
<http-method-label method="POST"></http-method-label>
<http-method-label method="Put"></http-method-label>
<http-method-label method="delete"></http-method-label>
<http-method-label method="patch"></http-method-label>
使用量
安装
npm install @api-components/http-method-label --save
在 html 文件内
<html>
<head>
<script type="module">
import '@api-components/http-method-label/http-method-label.js';
</script>
</head>
<body>
<http-method-label method="get"></http-method-label>
</body>
</html>
在网络组件元素中
import { LitElement, html, css } from 'lit-element';
import '@api-components/http-method-label/http-method-label.js';
class SampleElement extends PolymerElement {
static get template() {
return html`
<http-method-label method="get"></http-method-label>
`;
}
}
customElements.define('sample-element', SampleElement);
发展
git clone https://github.com/advanced-rest-client/http-method-label
cd http-method-label
npm install
本地运行演示
npm start
运行测试
npm test