承接 hkw/tools 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hkw/tools

最新稳定版本:v1.0.0

Composer 安装命令:

composer require hkw/tools

包简介

自用综合型扩展

README 文档

README

通过 composer 安装扩展

  composer require hkw/tools

已有表单组件(采用的是Naive UI)

     // 标签
     // each vComponent has watch method
    $form->vTags('tags')
        ->watch('list as field name', <<<JS
            (target, current, store) => {
                // the tag component of naive ui expect format: {label: string, value: string}
                current.options.push({label: target, value: target});
                
                store.request({method: 'get', url: '/admin'})
                    .then(res => console.log(res));
                console.log(store.forms.list)
            }
        JS);
    
    $form->vList('list')
        ->sortable() // 开启排序
        ->max(8); // 限制最大添加数量
        
    $form->vKeyValue('kvs')
        ->sortable() // 开启排序
        ->serial() // 开启固定有序索引 默认为字母A-Z
        ->keys(['一', '二', '三', '四']) // serial后自定义索引
        ->list(); // serial后只提交值,保存为一维数组(索引仅作为显示)
        
    $form->vSelect('select')
        ->options(['123', '456', 'A' => 'aaa']) // 选项
        ->concatKey('separator') // 显示键
        ->optionsFromKeyValue('kvs'); // 用于结合vKeyValue进行选项选择

    $form->vMultipleSelect('ms', '多选')
        ->options(['123', '456', 'A' => 'aaa']) // 选项
        ->concatKey('separator') // 显示键
        ->optionsFromKeyValue('kvs'); // 用于结合vKeyValue进行选项选择

    $form->vNumber('number', '数字')
        ->bothButton() // 按钮位置分离到两端
        ->step(2) // 步进
        ->min(2) // 最小值
        ->max(88) // 最大值
        ->precision(2); // 开启小数,精度

    $form->vIcon('icon', '图标') // icon vIcon oIcon
        ->withColorColumn('color') // 独立的hex颜色字段,默认是合并到图标类型后面
        ->closeColorPicker();

统计信息

  • 总下载量: 2
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-23