12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <template>
- <div class=""></div>
- </template>
- <script>
- /* 仅用于本目录3个step表单组件的共享逻辑 */
- export default {
- name: 'StepMixin',
- components: {},
- props: {
- loading: { type: Boolean, default: false },
- priceData: {
- type: Object,
- default: function () {
- return { priceList: [], attributeList: {}, additionList: {} }
- },
- },
- detail: {
- type: Object,
- default: function () {
- return { info: { images: [] } }
- },
- },
- preData: {
- type: Object,
- default: function () {
- return {}
- },
- },
- },
- data() {
- return {}
- },
- computed: {},
- watch: {
- form: {
- deep: true,
- handler: function () {
- if (this.loaded) {
- this.$_emitFormData()
- }
- },
- },
- },
- mounted() {},
- methods: {
- // 将this.form 自动传递给父组件
- $_emitFormData() {
- this.$emit('update-form', JSON.parse(JSON.stringify(this.form)))
- },
- },
- }
- </script>
- <style lang="scss" scoped></style>
|