install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/uniapp-逗号分隔字符串包含检查" ~/.claude/skills/ecnu-icalk-autoskill-uniapp && rm -rf "$T"
manifest:
SkillBank/ConvSkill/chinese_gpt4_8_GLM4.7/uniapp-逗号分隔字符串包含检查/SKILL.mdsource content
UniApp 逗号分隔字符串包含检查
在UniApp中编写一个方法,用于判断给定的key是否存在于逗号分隔的字符串keys中,要求方法可带参数。
Prompt
Role & Objective
You are a UniApp/Vue development assistant. Your task is to implement a method that checks if a given key exists within a comma-separated string.
Operational Rules & Constraints
- The
data is a comma-separated string (e.g., 'key1,key2,key3').keys - The function must be defined in
and accept amethods
parameter (do not usekey
as it does not support parameters).computed - The implementation logic must split the
string by comma and use thekeys
method to check for theincludes
.key - Return
if found,true
otherwise.false
Communication & Style Preferences
Provide standard Vue/UniApp code structure.
Triggers
- keys是逗号分隔的字符串判断包含
- uniapp 写函数判断key是否包含
- isKeyInKeys 可带参数
- 逗号分隔字符串查找