我使用以下代码来找到materializecss网站中的NavBar.
<nav>
<div class="nav-wrapper">
<a href="#!" class="brand-logo">Logo</a>
<a href="#" data-target="mobile-demo" class="sidenav-trigger"><i class="material-icons">menu</i></a>
<ul class="right hide-on-med-and-down">
<li><a href="sass.html">Sass</a></li>
<li><a href="badges.html">Components</a></li>
<li><a href="collapsible.html">Javascript</a></li>
<li><a href="mobile.html">Mobile</a></li>
</ul>
</div>
</nav>
<ul class="sidenav" id="mobile-demo">
<li><a href="sass.html">Sass</a></li>
<li><a href="badges.html">Components</a></li>
<li><a href="collapsible.html">Javascript</a></li>
<li><a href="mobile.html">Mobile</a></li>
</ul>
Run Code Online (Sandbox Code Playgroud)
文档说使用以下JavaScript代码来初始化插件.
document.addEventListener('DOMContentLoaded', function() {
var elems = document.querySelectorAll('.sidenav');
var instances = M.Sidenav.init(elems, options);
});
Run Code Online (Sandbox Code Playgroud)
但是,当它运行时说
"选项"未定义.
我不想为此目的使用jQuery.我怎样才能解决这个问题?
我很难理解NestedScrollView和CustomScrollView之间的区别吗?
我使用以下代码来获取最畅销的产品并以 JSON 格式发送结果。但我无法对 wc_get_products() 的结果进行编码。
$best_selling_args = array(
'meta_key' => 'total_sales',
'order' => 'DESC',
'orderby' => 'meta_value_num'
);
$products_posts = wc_get_products( $best_selling_args );
// var_dump( $products_posts );
echo wp_json_encode( $products_posts );
Run Code Online (Sandbox Code Playgroud) 我想像这里一样显示图表https://www.chartjs.org/samples/latest/scales/time/financial.html
我编写了以下代码来显示图表,但是当我运行代码时,出现以下错误:
Chart.min.js?ver=1.0.0:7 未捕获的错误:此方法未实现:要么找不到适配器,要么提供了不完整的集成。在 ri.oi (Chart.min.js?ver=1.0.0:7) 在 i.update (Chart.min.js?ver=1.0.0:7) 在 Chart.min.js?ver=1.0.0 :7 at Object.each (Chart.min.js?ver=1.0.0:7) at Object.update (Chart.min.js?ver=1.0.0:7) at ni.updateLayout (Chart.min.js ?ver=1.0.0:7) at ni.update (Chart.min.js?ver=1.0.0:7) at ni.construct (Chart.min.js?ver=1.0.0:7) at new ni (Chart.min.js?ver=1.0.0:7) 在 initializeCustomerFlowChart (reports.js?ver=1.0.0:83)
/**
* JS Code for the admin-panel/contact/reports.
*
* It handles initializtion of the customer flow chart.
*/
'use strict';
jQuery(document).ready(function() {
console.log('admin-panel/contact/reports');
// Initialize the custome flow chart.
initializeCustomerFlowChart();
});
function initializeCustomerFlowChart() {
var dataSet = [];
for(var i = 0 ; i …
Run Code Online (Sandbox Code Playgroud)我正在尝试使用rest api检索所有产品。我已经读过这个问题。我正在用邮递员打电话。这是我的查询
https://squatwolf.com/wp-json/wc/v2/products?filter[posts_per_page] =-1
Run Code Online (Sandbox Code Playgroud)
该查询仅显示10个结果。
javascript ×2
wordpress ×2
chart.js ×1
css ×1
css3 ×1
dart ×1
flutter ×1
html ×1
json ×1
materialize ×1
php ×1
rest ×1
woocommerce ×1