generated from siyuan-note/plugin-sample-vite-svelte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
自动隐藏空字段? #1;添加展示字段设置功能,优化数据提取逻辑,更新版本号至v0.1.5
- Loading branch information
Showing
3 changed files
with
17 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,16 @@ | ||
// settings.ts | ||
export function addSettings(settingUtils) { | ||
settingUtils.addItem({ | ||
key: "", | ||
value: true, | ||
type: "checkbox", | ||
title: "此设置暂时不可用,写到一半发现,这个设置选项多了的话好难看~~", | ||
description: "此设置暂时不可用!此设置暂时不可用!此设置暂时不可用!", | ||
key: "dis-show", | ||
value: "", | ||
type: "textarea", | ||
title: "展示的字段(不填默认展示所有支持的字段)", | ||
description: "输入展示的字段(mSelect,number,date,text,mAsset,checkbox,phone,url,email)", | ||
action: { | ||
// Called when focus is lost and content changes | ||
callback: () => { | ||
|
||
settingUtils.takeAndSave("dis-show"); | ||
} | ||
} | ||
}); | ||
|
||
settingUtils.addItem({ | ||
key: "Check-mSelect", | ||
value: true, | ||
type: "checkbox", | ||
title: "多选和单选", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-mSelect"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-number", | ||
value: true, | ||
type: "checkbox", | ||
title: "数字", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-number"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-date", | ||
value: true, | ||
type: "checkbox", | ||
title: "日期", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-date"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-text", | ||
value: true, | ||
type: "checkbox", | ||
title: "文本", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-text"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-mAsset", | ||
value: true, | ||
type: "checkbox", | ||
title: "附件", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-mAsset"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-checkbox", | ||
value: true, | ||
type: "checkbox", | ||
title: "多选框", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-checkbox"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-phone", | ||
value: true, | ||
type: "checkbox", | ||
title: "电话", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-phone"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-url", | ||
value: true, | ||
type: "checkbox", | ||
title: "链接", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-url"); | ||
} | ||
} | ||
}); | ||
settingUtils.addItem({ | ||
key: "Check-email", | ||
value: true, | ||
type: "checkbox", | ||
title: "邮箱", | ||
description: "选择是否显示", | ||
action: { | ||
callback: () => { | ||
settingUtils.takeAndSave("Check-email"); | ||
} | ||
} | ||
}); | ||
|
||
|
||
} |