diff --git a/package.json b/package.json
index 01fce83..e957a17 100644
--- a/package.json
+++ b/package.json
@@ -11,6 +11,7 @@
"stylelint": "stylelint resources/assets/sass/**/*"
},
"devDependencies": {
+ "@types/jquery": "^3.3.29",
"bootstrap": "^4.3.1",
"cal-heatmap": "^3.3.10",
"chart.js": "^2.7.1",
@@ -28,7 +29,12 @@
"sass-loader": "^7.1.0",
"stylelint": "^9.10.1",
"stylelint-config-recess-order": "^2.0.1",
- "vue-template-compiler": "^2.6.6"
+ "ts-loader": "^6.0.1",
+ "typescript": "^3.4.5",
+ "vue": "^2.6.10",
+ "vue-class-component": "^7.1.0",
+ "vue-property-decorator": "^8.1.1",
+ "vue-template-compiler": "^2.6.10"
},
"stylelint": {
"extends": "stylelint-config-recess-order"
@@ -39,6 +45,9 @@
}
},
"lint-staged": {
- "*.{css,scss}": ["stylelint --fix", "git add"]
+ "*.{css,scss}": [
+ "stylelint --fix",
+ "git add"
+ ]
}
}
diff --git a/resources/assets/js/checkin.js b/resources/assets/js/checkin.js
deleted file mode 100644
index e68fc0c..0000000
--- a/resources/assets/js/checkin.js
+++ /dev/null
@@ -1,58 +0,0 @@
-function updateTags() {
- $('input[name=tags]').val(
- $('#tags')
- .find('li')
- .map(function () {
- return $(this).data('value');
- })
- .get()
- .join(' ')
- );
-}
-
-function insertTag(value) {
- $('
| x')
- .data('value', value)
- .children(':last-child')
- .text(value)
- .end()
- .appendTo('#tags');
-}
-
-var initTags = $('input[name=tags]').val();
-if (initTags.trim() !== '') {
- initTags.split(' ').forEach(function (value) {
- insertTag(value);
- });
-}
-
-$('#tagInput').on('keydown', function (ev) {
- var $this = $(this);
- if ($this.val().trim() !== '') {
- switch (ev.key) {
- case 'Tab':
- case 'Enter':
- case ' ':
- if (ev.originalEvent.isComposing !== true) {
- insertTag($this.val().trim());
- $this.val('');
- updateTags();
- }
- ev.preventDefault();
- break;
- }
- } else if (ev.key === 'Enter') {
- // 誤爆防止
- ev.preventDefault();
- }
-});
-
-$('#tags')
- .on('click', 'li', function (ev) {
- $(this).remove();
- updateTags();
- })
- .parent()
- .on('click', function (ev) {
- $('#tagInput').focus();
- });
\ No newline at end of file
diff --git a/resources/assets/js/checkin.ts b/resources/assets/js/checkin.ts
new file mode 100644
index 0000000..7e54285
--- /dev/null
+++ b/resources/assets/js/checkin.ts
@@ -0,0 +1,9 @@
+import Vue from 'vue';
+import TagInput from "./components/TagInput.vue";
+
+new Vue({
+ el: '#app',
+ components: {
+ TagInput
+ }
+});
diff --git a/resources/assets/js/components/TagInput.vue b/resources/assets/js/components/TagInput.vue
new file mode 100644
index 0000000..a2c1ff3
--- /dev/null
+++ b/resources/assets/js/components/TagInput.vue
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/resources/assets/js/vue-shims.d.ts b/resources/assets/js/vue-shims.d.ts
new file mode 100644
index 0000000..ad17f79
--- /dev/null
+++ b/resources/assets/js/vue-shims.d.ts
@@ -0,0 +1,4 @@
+declare module "*.vue" {
+ import Vue from "vue";
+ export default Vue;
+}
\ No newline at end of file
diff --git a/resources/views/ejaculation/checkin.blade.php b/resources/views/ejaculation/checkin.blade.php
index 669b9cf..6355014 100644
--- a/resources/views/ejaculation/checkin.blade.php
+++ b/resources/views/ejaculation/checkin.blade.php
@@ -3,7 +3,7 @@
@section('title', 'チェックイン')
@section('content')
-
+
今致してる?
@@ -38,12 +38,8 @@