Skip to content

Commit

Permalink
Updated with Git-Sync
Browse files Browse the repository at this point in the history
Updated with Git-Sync
  • Loading branch information
Zacharia2 committed Sep 3, 2023
1 parent 61278ce commit fcde7de
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
created: 20230901061523927
creator: WhiteFall
modified: 20230901062733798
modified: 20230903002442704
modifier: WhiteFall
tags: Wiki编程的定义
title: "Hello, TiddlyWiki"
title: Hello, TiddlyWiki

\procedure main()
<$text text="Hello, TiddlyWiki">
Expand Down
10 changes: 7 additions & 3 deletions tiddlers/Wiki编程的定义.tid
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class: autonumhead
created: 20230809234409764
creator: WhiteFall
modified: 20230901073545194
modified: 20230903025847855
modifier: WhiteFall
tags: 插件开发 笔记思维
title: Wiki编程的定义
Expand Down Expand Up @@ -135,6 +135,8 @@ JS变量是用于存储信息的“容器”。

!!! 逻辑

Wiki编程的逻辑运算是通过什么实现的?微件和筛选器?

!!! 视图


Expand All @@ -160,7 +162,9 @@ action-log、log小工具、[[调试筛选器]]

!!! 模块

一个 TiddlyWiki5 的 模块 是包含可运行 JavaScript 的条目,其类型为`application/javascript`且其`modeule-type`字段为该模块的[[模块类型]]
> 为Wiki编程工具封装JS代码。

一个 TiddlyWiki5 的 模块 是包含可运行 JavaScript 的条目,其类型为`application/javascript`且其`modeule-type`字段为该模块的[[模块类型|$:/core/ui/ControlPanel/LoadedModules]]

!!! 条目

Expand All @@ -176,4 +180,4 @@ action-log、log小工具、[[调试筛选器]]
## 配置条目
## 调色板条目

# 普通条目
# 普通条目
45 changes: 45 additions & 0 deletions tiddlers/模块:JS宏定义.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
created: 20230903002115372
creator: WhiteFall
modified: 20230903003054672
modifier: WhiteFall
tags: Wiki编程的定义
title: 模块:JS宏定义

例子:$:/core/modules/macros/now.js

其中exports.name为宏名称,exports.params为宏参数定义,exports.run为宏执行的方法。

```js
/*\
title: $:/core/modules/macros/now.js
type: application/javascript
module-type: macro

Macro to return a formatted version of the current time

\*/
(function(){

/*jslint node: true, browser: true */
/*global $tw: false */
"use strict";

/*
Information about this macro
*/

exports.name = "now";

exports.params = [
{name: "format"}
];

/*
Run the macro
*/
exports.run = function(format) {
return $tw.utils.formatDateString(new Date(),format || "0hh:0mm, DDth MMM YYYY");
};

})();
```

0 comments on commit fcde7de

Please sign in to comment.