{"_id":"@composy/attendance-vue","name":"@composy/attendance-vue","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@composy/attendance-vue","version":"0.0.1","description":"Vue components for @composy/attendance-core","keywords":["attendance","vue","vue3","vue2","component"],"author":{"name":"LDesign Team"},"license":"MIT","type":"module","sideEffects":["**/*.css"],"exports":{".":{"types":"./es/index.d.ts","import":"./es/index.js","require":"./lib/index.cjs","default":"./es/index.js"},"./composables/*":{"types":"./es/composables/*.d.ts","import":"./es/composables/*.js","require":"./lib/composables/*.cjs","default":"./es/composables/*.js"},"./plugins/*":{"types":"./es/plugins/*.d.ts","import":"./es/plugins/*.js","require":"./lib/plugins/*.cjs","default":"./es/plugins/*.js"},"./style":{"types":"./es/style/index.d.ts","import":"./es/style/index.css","default":"./es/style/index.css"},"./index.css":"./dist/index.css","./index.min.css":"./dist/index.min.css","./package.json":"./package.json"},"main":"./lib/index.cjs","module":"./es/index.js","types":"./es/index.d.ts","unpkg":"./dist/index.min.js","jsdelivr":"./dist/index.min.js","scripts":{"prebuild":"node --experimental-strip-types ../../../../scripts/index.ts workspace:sync-vue-style --cwd ../..","build":"ldesign-builder build","postbuild":"node --experimental-strip-types ../../../../scripts/index.ts workspace:ensure-style-types --cwd ../.. --target vue","dev":"vite build --watch","lint":"eslint . --cache","lint:check":"eslint . --cache --max-warnings 0","lint:fix":"eslint . --cache --fix","type-check":"vue-tsc -p tsconfig.json --noEmit","test":"ltesting run:unit","test:coverage":"ltesting run:unit --coverage","test:watch":"ltesting run:unit --watch","test:run":"ltesting run:unit","test:changed":"ltesting run:unit --changed","test:failed":"ltesting run:unit --failed","test:ui":"ltesting dashboard"},"dependencies":{"@composy/attendance-core":"^0.0.1","vue-demi":"^0.14.10"},"peerDependencies":{"vue":"^2.7.0 || ^3.5.32"},"devDependencies":{"@antfu/eslint-config":"9.1.0","@composy/builder":"^0.0.1","@composy/testing":"^0.0.1","@vue/test-utils":"^2.4.11","eslint":"10.7.0","fast-check":"^4.9.0","jsdom":"29.1.1","typescript":"5.9.3","vite":"^8.1.4","vue":"3.5.39","vue-tsc":"^3.3.7"},"publishConfig":{"registry":"http://npm.longrise.cn:6286/"},"style":"./dist/index.css","typings":"./es/index.d.ts","browser":"./dist/index.js","_id":"@composy/attendance-vue@0.0.1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-Sy+l+TDJEIErcz750rZvrlBDcN6TzH+qu78Aa3sHdwIWrNbEeKXh4/evamcLX1sSJg/3LiZwrgjk455mX2cq7w==","shasum":"e8d69616f0716afa6212b54043b16cff2741b2e9","tarball":"https://registry.npmjs.org/@composy/attendance-vue/-/attendance-vue-0.0.1.tgz","fileCount":104,"unpackedSize":571707,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCMxENy2kWPbr8W+ROCyak/RQSiQWIWxxWe9NyaxL37QgIhAMYYZ5l0jNKRDBsfseRjlpduZI0BHD8KmKq3h0KBFjLO"}]},"_npmUser":{"name":"swimly","email":"979741120@qq.com"},"directories":{},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/attendance-vue_0.0.1_1786948974550_0.5831049691146633"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T06:42:54.370Z","0.0.1":"2026-08-17T06:42:54.690Z","modified":"2026-08-17T06:42:54.950Z"},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"description":"Vue components for @composy/attendance-core","keywords":["attendance","vue","vue3","vue2","component"],"author":{"name":"LDesign Team"},"license":"MIT","readme":"# @composy/attendance-vue\n\n`@composy/attendance-core` 的 Vue 适配层，提供四个组件、组合式函数和全局插件。\n\n## 特性\n\n- 组件：`AttendanceCalendar`、`AttendanceStats`、`ClockInPanel`、`LeavePanel`。\n- Composables：`useAttendanceCalendar`、`useAttendanceStats`、`useClockInPanel`、`useLeavePanel`。\n- 完整 props 同步：月份、数据、主题、排班、图例、今天按钮、选中日期、禁用态等更新会同步到 core 实例。\n- 事件：`monthChange`、`dateClick`、`clockIn`、`clock`、`recordClick`。\n- 样式：自动引入 `ldesign-attendance-*` 样式，也可显式引入 `@composy/attendance-vue/index.css`。\n\n## 使用\n\n```vue\n<template>\n  <AttendanceCalendar\n    :month=\"month\"\n    :records=\"records\"\n    :schedules=\"schedules\"\n    show-shift\n    show-today-button\n    @date-click=\"handleDateClick\"\n  />\n\n  <ClockInPanel\n    :today-clocks=\"todayClocks\"\n    location=\"总部大楼\"\n    method=\"wifi\"\n    @clock=\"handleClock\"\n  />\n</template>\n\n<script setup lang=\"ts\">\nimport {\n  AttendanceCalendar,\n  ClockInPanel,\n} from '@composy/attendance-vue'\nimport {\n  generateMonthRecords,\n  generateSchedules,\n  getCurrentMonth,\n  type ClockRecord,\n  type DayRecord,\n} from '@composy/attendance-core'\nimport '@composy/attendance-vue/index.css'\n\nconst month = getCurrentMonth()\nconst records = generateMonthRecords(month)\nconst schedules = generateSchedules(month)\nconst todayClocks: ClockRecord[] = []\n\nfunction handleDateClick(date: string, record?: DayRecord) {\n  console.log(date, record)\n}\n\nfunction handleClock(record: ClockRecord, clocks: ClockRecord[]) {\n  console.log(record, clocks)\n}\n</script>\n```\n\n## 插件\n\n```ts\nimport { createApp } from 'vue'\nimport { createAttendancePlugin } from '@composy/attendance-vue'\nimport '@composy/attendance-vue/index.css'\n\ncreateApp(App).use(createAttendancePlugin({ prefix: 'L' }))\n```\n\n注册后组件名为 `LAttendanceCalendar`、`LAttendanceStats`、`LClockInPanel`、`LLeavePanel`。\n\n## 验证\n\n```bash\npnpm --filter @composy/attendance-vue type-check\npnpm --filter @composy/attendance-vue build\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-12eb4e3840e743b743cd5718192e4c15"}