|
|
import {trim} from 'lodash';
|
|
|
import {createNamespacedHelpers} from 'vuex';
|
|
|
const {mapActions} = createNamespacedHelpers('comment');
|
|
|
import YAS from 'utils/yas-constants';
|
...
|
...
|
@@ -61,6 +62,17 @@ export default { |
|
|
}
|
|
|
},
|
|
|
async comment(content) {
|
|
|
content = trim(content);
|
|
|
|
|
|
if (!content) {
|
|
|
this.$createToast({
|
|
|
txt: '请输入评论内容',
|
|
|
type: 'warn',
|
|
|
time: 1000
|
|
|
}).show();
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.posting) {
|
|
|
return;
|
|
|
}
|
...
|
...
|
|