模板:Diff/doc/zh

From Wikidata
Revision as of 08:44, 24 March 2021 by YFdyh000 (talk | contribs) (Created page with "此模板为一个页面的两个版本之间的差异提供一个链接。</br> 链接形式如下:<code><nowiki>https://www.wikidata.org/w/index.php?title=</nowiki>''页...")
Jump to navigation Jump to search

此模板为一个页面的两个版本之间的差异提供一个链接。
链接形式如下:https://www.wikidata.org/w/index.php?title=页面标题&diff=diff&oldid=oldid

用法

{{Diff|Page title|diff|oldid|label}}
{{Diff|Page=Page title|diff=diff|oldid=oldid|label=label}}

The Page title can be any page. If the page is a Property, for example enter P1234 for ISFDB publication ID (P1234). If the page is an Item, for example enter Q1234 for seaborgium (Q1234).

参数

This template gives a link to the difference between two versions of a page.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Page1

Title of the Page

Default
empty
Page namesuggested
Diff2 diff cur prev next

ID of the recent version

Default
{{REVISIONID}} (actual version of the Page)
Linesuggested
Oldid3 oldid

ID of the old version

Default
prec (previous version of the page)
Numbersuggested
Label4 label

Text to display for the link

Default
empty
Linesuggested

例子

  • {{Diff}} gives [1], the main page of WikiData.
  • {{Diff|Wikidata:Main Page|155692860}} gives [2], the version of September 3, 2014 at 20:44.
  • {{Diff|Wikidata:Main Page|155692860|}} gives [3], also the version of September 3, 2014 at 20:44.
  • {{Diff|Wikidata:Main Page|cur}} gives [4], the difference between the previous version of the current version.
  • {{Diff|Wikidata:Main Page|155694124|155692860}} gives [5], the difference between 2 versions.
  • {{Diff|Wikidata:Main Page|cur|155694124}} gives [6], the difference between a version in time and the current version.
  • {{Diff|Wikidata:Main Page|prev|12062669}} gives [7] which only displays diff changes.
  • {{Diff|Wikidata:Main Page|next|155694124}} gives [8], the difference between a version and its successor.
  • {{Diff|Wikidata:Main Page|155694124|155692860|this link with different versions}} gives this link with different versions.
  • {{Diff|Wikidata:Main Page|diff=155694124|oldid=155692860|label=this another link with different versions}} gives this another link with different versions.
  • {{Diff|label=When the parameters are designated, they can change places|oldid=155692860|diff=155694124|Page=Wikidata:Main Page}} gives When the parameters are designated, they can change places.

参见