10,323
次編輯
變更
小
此模块提供了对通过This module provides easy processing of arguments passed from #invoke 传递的简单参数处理。它是一个元模块,即意味着被其他模块所使用,同时也不应被. It is a meta-module, meant for use by other modules, and should not be called from #invoke 直接调用。特性如下:directly. Its features include:* 对参数的简易修整及移除空参数。Easy trimming of arguments and removal of blank arguments.* 参数可以在当前框架或父框架中同时传递。(具体见下)Arguments can be passed by both the current frame and by the parent frame at the same time. (More details below.)* 参数可以直接通过其他Lua模块或调试控制台传递。Arguments can be passed in directly from another Lua module or from the debug console.* 参数按需获取,这样可以避免一些Arguments are fetched as needed, which can help avoid (some) problems with {{tag|ref}} 标签的问题。tags.* 可自定义更多特性。Most features can be customized.
首先,您需要加载模块。它包含了一个名为First, you need to load the module. It contains one function, named <code>getArgs</code> 的函数。.
导入1个版本
{{NoteTAHigh-risk| G1 = MediaWiki20996736 pages, which is {{#expr:(2099673600/{{NUMBEROFPAGES:R}}) round 0}}{{Documentation subpage% of all}}{{High-risk|1,500,000+Used in system}}{{ 缺乏中文說明Module rating|p}}
== 基本用法 Basic use ==
<source lang="lua">
The use of metatables also has its downsides. Most of the normal Lua table tools won't work properly on the args table, including the <code>#</code> operator, the <code>next()</code> function, and the functions in the table library. If using these is important for your module, you should use your own argument processing function instead of this module.<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
[[Category: 维基百科元模块Lua metamodules]]
}}</includeonly>