{"id":17967315,"url":"https://github.com/cromarmot/v2-nut-picker","last_synced_at":"2025-06-28T07:32:55.878Z","repository":{"id":57104487,"uuid":"289877934","full_name":"CroMarmot/v2-nut-picker","owner":"CroMarmot","description":"Vue2 mobile/pc picker, Demo(https://eyqgw.csb.app/)","archived":false,"fork":false,"pushed_at":"2021-05-13T09:10:14.000Z","size":671,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T15:47:10.540Z","etag":null,"topics":["mobile","nutui","picker","vue","vue2"],"latest_commit_sha":null,"homepage":"https://cromarmot.github.io/v2-nut-picker/","language":"Vue","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CroMarmot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-24T08:59:32.000Z","updated_at":"2021-05-13T09:09:38.000Z","dependencies_parsed_at":"2022-08-20T22:10:37.695Z","dependency_job_id":null,"html_url":"https://github.com/CroMarmot/v2-nut-picker","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CroMarmot%2Fv2-nut-picker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CroMarmot%2Fv2-nut-picker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CroMarmot%2Fv2-nut-picker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CroMarmot%2Fv2-nut-picker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CroMarmot","download_url":"https://codeload.github.com/CroMarmot/v2-nut-picker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247081355,"owners_count":20880415,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mobile","nutui","picker","vue","vue2"],"created_at":"2024-10-29T14:06:18.707Z","updated_at":"2025-04-03T21:28:21.950Z","avatar_url":"https://github.com/CroMarmot.png","language":"Vue","funding_links":[],"categories":[],"sub_categories":[],"readme":"# v2-nut-picker\n\nvue2 mobile picker components modified based on nutui.\n\n[![Build Status](https://badgen.net/travis/cromarmot/v2-nut-picker/master)](https://travis-ci.com/cromarmot/v2-nut-picker)\n[![NPM Download](https://badgen.net/npm/dm/@cromarmot/v2-nut-picker)](https://www.npmjs.com/package/@cromarmot/v2-nut-picker)\n[![NPM Version](https://badge.fury.io/js/%40cromarmot%2Fv2-nut-picker.svg)](https://www.npmjs.com/package/@cromarmot/v2-nut-picker)\n[![NPM License](https://badgen.net/npm/license/@cromarmot/v2-nut-picker)](https://github.com/cromarmot/v2-nut-picker/blob/master/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/cromarmot/v2-nut-picker/pulls)\n[![Automated Release Notes by gren](https://img.shields.io/badge/%F0%9F%A4%96-release%20notes-00B2EE.svg)](https://github-tools.github.io/github-release-notes/)\n\n## Demo\n\n- [codesandbox.io](https://codesandbox.io/s/late-glade-eyqgw?file=/src/App.vue)\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Install](#install)\n- [Usage](#usage)\n- [Links](#links)\n- [Contributing](#contributing)\n- [Contributors](#contributors)\n- [License](#license)\n\n## Introduction\n\n基于: https://github.com/jdf2e/nutui 修改\n\n修改了一点 typo\n\nindex 下标从 1 开始改为从 0 开始\n\n考虑到 vue 的`$event` 只能把 emit 的首个参数处理掉，因此所有 emit 改为单个 emit 参数\n\n去掉了没有必要的 把 index 向子组件传递再传回给父组件的动作\n\n增加了 pc mouse 事件支持\n\n修复了 异步取值的一致性问题\n\n## Features\n\nRemoved the title confirmation and cancel button, so you can use this components anywhere you want.\n\nOptimize the part of the code written and fix some typo.\n\nAdd warning message in development environment.\n\nSupport mouse event on PC\n\n## Install\n\n`yarn add @cromarmot/v2-nut-picker`\n\n## Usage\n\n```\n\u003ctemplate\u003e\n  \u003cv2-nut-picker\n    :list-data=\"listData\"\n    :default-value-data=\"defaultValue\"\n    @choose=\"choose\"\n  /\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nimport V2NutPicker from '@cromarmot/v2-nut-picker'\nexport default {\n  components: { V2NutPicker },\n  data() {\n    return {\n      listData: [\n        ['2020-01', '2020-02', '2020-03', '2020-04', '2020-05', '2020-06', '2020-07'],\n        ['2020-01', '2020-02', '2020-03', '2020-04', '2020-05', '2020-06']\n      ],\n      defaultValue: [\n        '2020-01',\n        '2020-02'\n      ]\n    }\n  },\n  methods: {\n    choose({ self, index, value, changeValueData }) {\n      console.log(index, value, changeValueData)\n      if (index === 0) {\n        if (value \u003e changeValueData[1]) {\n          self.updateChooseValue(self, 1, value)\n        }\n      } else if (index === 1) {\n        if (value \u003c changeValueData[0]) {\n          self.updateChooseValue(self, 0, value)\n        }\n      }\n    }\n  }\n}\n\u003c/script\u003e\n```\n\n## Links\n\n- [docs](https://cromarmot.github.io/v2-nut-picker/)\n\n## Contributing\n\nFor those who are interested in contributing to this project, such as:\n\n- report a bug\n- request new feature\n- fix a bug\n- implement a new feature\n\nPlease refer to our [contributing guide](https://github.com/FEMessage/.github/blob/master/CONTRIBUTING.md).\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## License\n\n[MIT](./LICENSE)\n\n# Based on\n\nhttps://github.com/FEMessage/vue-sfc-cli\n\nhttps://github.com/jdf2e/nutui\n\nhttps://github.com/jdf2e/nutui/tree/v2-dev/src/packages/picker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcromarmot%2Fv2-nut-picker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcromarmot%2Fv2-nut-picker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcromarmot%2Fv2-nut-picker/lists"}