Refactor: Extract the cat generator

This commit is contained in:
syuilo 2017-02-01 04:49:23 +09:00
parent 2218dba252
commit 23810d0ce5
3 changed files with 9 additions and 2 deletions

View File

@ -0,0 +1,3 @@
module.exports = function() {
return '(=^・・^=)'
};

View File

@ -285,6 +285,8 @@
</style>
<script>
get-cat = require '../../common/scripts/get-cat'
@mixin \api
@mixin \notify
@mixin \autocomplete
@ -429,6 +431,6 @@
@update!
@cat = ~>
@refs.text.value = @refs.text.value + '(=^・・^=)'
@refs.text.value = @refs.text.value + get-cat!
</script>
</mk-post-form>

View File

@ -178,6 +178,8 @@
</style>
<script>
get-cat = require '../../common/scripts/get-cat'
@mixin \api
@wait = false
@ -264,6 +266,6 @@
@unmount!
@cat = ~>
@refs.text.value = @refs.text.value + '(=^・・^=)'
@refs.text.value = @refs.text.value + get-cat!
</script>
</mk-post-form>