Merge branches 'dev_aliyun', 'dev_jupyter' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into develop
commit
ad77dae87d
@ -0,0 +1,10 @@
|
||||
class ModifyViewedCountForSubjects < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
|
||||
subjects = Subject.where(status: 2).includes(:shixuns)
|
||||
subjects.find_each do |subject|
|
||||
subject.update_attribute(:visits, subject.visits + subject.shixuns.pluck(:myshixuns_count).sum)
|
||||
end
|
||||
|
||||
end
|
||||
end
|
@ -0,0 +1,7 @@
|
||||
namespace :print_date do
|
||||
desc "print date"
|
||||
|
||||
task :print => :environment do
|
||||
Rails.logger.info("#{Time.now}")
|
||||
end
|
||||
end
|
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* @Description: 填空
|
||||
* @Author: tangjiang
|
||||
* @Github:
|
||||
* @Date: 2020-01-06 09:02:29
|
||||
* @LastEditors : tangjiang
|
||||
* @LastEditTime : 2020-01-06 16:04:46
|
||||
*/
|
||||
import Quill from 'quill';
|
||||
|
||||
let Inline = Quill.import('blots/inline');
|
||||
|
||||
class FillBlot extends Inline {
|
||||
static create (value) {
|
||||
const node = super.cerate();
|
||||
node.classList.add('icon icon-bianji2');
|
||||
node.setAttribute('data-fill', 'fill');
|
||||
node.addEventListener('DOMNodeRemoved', function () {
|
||||
alert(123);
|
||||
}, false);
|
||||
return node;
|
||||
}
|
||||
|
||||
static value (node) {
|
||||
return {
|
||||
dataSet: node.getAttribute('data-fill'),
|
||||
onDOMNodeRemoved: () => {
|
||||
alert('123456');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FillBlot.blotName = "fill";
|
||||
FillBlot.tagName = "span";
|
||||
|
||||
export default FillBlot;
|
Loading…
Reference in new issue