mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-09 08:08:24 -05:00
move escapeCSS function to mixins
This commit is contained in:
@@ -122,18 +122,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {calculateAmount, GettextMixin, getUserPreference, escapeCSS} from "@/utils/utils"
|
||||
import {calculateAmount, GettextMixin, getUserPreference} from "@/utils/utils"
|
||||
import CompileComponent from "@/components/CompileComponent"
|
||||
import IngredientsCard from "@/components/IngredientsCard"
|
||||
import Vue from "vue"
|
||||
import moment from "moment"
|
||||
import {ResolveUrlMixin, calculateHourMinuteSplit} from "@/utils/utils"
|
||||
import {ResolveUrlMixin, calculateHourMinuteSplit, EscapeCSSMixin} from "@/utils/utils"
|
||||
|
||||
Vue.prototype.moment = moment
|
||||
|
||||
export default {
|
||||
name: "StepComponent",
|
||||
mixins: [GettextMixin, ResolveUrlMixin],
|
||||
mixins: [GettextMixin, ResolveUrlMixin, EscapeCSSMixin],
|
||||
components: {CompileComponent, IngredientsCard},
|
||||
props: {
|
||||
step: Object,
|
||||
@@ -148,7 +148,8 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
step_time: function() {
|
||||
return calculateHourMinuteSplit(this.step.time)},
|
||||
return calculateHourMinuteSplit(this.step.time)
|
||||
},
|
||||
step_name: function() {
|
||||
if (this.step.name) {
|
||||
return this.step.name
|
||||
@@ -196,9 +197,6 @@ export default {
|
||||
},
|
||||
openPopover: function () {
|
||||
this.$refs[`id_reactive_popover_${this.step.id}`].$emit("open")
|
||||
},
|
||||
escapeCSS: function (classname) {
|
||||
return CSS.escape(escapeCSS(classname))
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user