update scroll effect
This commit is contained in:
@@ -72,7 +72,7 @@ export default {
|
||||
|
||||
created() {},
|
||||
mounted() {
|
||||
console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
|
||||
// console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
|
||||
|
||||
this.headConfig.fields.forEach((field, index) => {
|
||||
// 没有 field.prop ,则为按钮之类的
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<script>
|
||||
import { pick as __pick } from "@/utils/filters";
|
||||
import Cookies, { get } from "js-cookie";
|
||||
import Cookies from "js-cookie";
|
||||
import moment from "moment";
|
||||
|
||||
export default {
|
||||
@@ -112,7 +112,7 @@ export default {
|
||||
|
||||
if (col.fetchData)
|
||||
col.fetchData().then(({ data: res }) => {
|
||||
console.log("[DialogJustForm fetchData -->]", res.data.list);
|
||||
// console.log("[DialogJustForm fetchData -->]", res.data.list);
|
||||
if (res.code === 0 && res.data.list) {
|
||||
if ("injectTo" in col) {
|
||||
// 保存完整的数据列表
|
||||
@@ -136,7 +136,7 @@ export default {
|
||||
else if (col.fetchTreeData) {
|
||||
// 获取设备类型时触发的,用于前端构建属性结构,约定,parentId 为0时是顶级节点
|
||||
col.fetchTreeData().then(({ data: res }) => {
|
||||
console.log("[DialogJustForm fetchTreeData -->]", res.data);
|
||||
// console.log("[DialogJustForm fetchTreeData -->]", res.data);
|
||||
if (res.code === 0 && res.data) {
|
||||
if ("list" in res.data) {
|
||||
this.$set(col, "options", res.data.list);
|
||||
@@ -165,7 +165,7 @@ export default {
|
||||
this.configs.form.rows.forEach((row) => {
|
||||
row.forEach((col) => {
|
||||
if ("injectTo" in col && Array.isArray(col.injectTo)) {
|
||||
console.log("watching options ..... ", col);
|
||||
// console.log("watching options ..... ", col);
|
||||
col.injectTo.map((item) => {
|
||||
const unwatch = this.$watch(
|
||||
() => this.dataForm[col.prop],
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
if (excludeId && key === "id") return;
|
||||
this.dataForm[key] = null;
|
||||
});
|
||||
console.log("[DialogJustForm resetForm()] clearing form...");
|
||||
// console.log("[DialogJustForm resetForm()] clearing form...");
|
||||
this.$refs.dataForm.clearValidate();
|
||||
this.$emit("dialog-closed"); // 触发父组件销毁自己
|
||||
this.watchList.map((unwatch) => unwatch());
|
||||
@@ -304,17 +304,17 @@ export default {
|
||||
},
|
||||
|
||||
handleSwitchChange(val) {
|
||||
console.log("[dialog] switch change: ", val, this.dataForm);
|
||||
// console.log("[dialog] switch change: ", val, this.dataForm);
|
||||
},
|
||||
|
||||
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
|
||||
this.dataForm[propName] = JSON.stringify(data);
|
||||
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
|
||||
// console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
|
||||
},
|
||||
|
||||
addOrUpdate(method = "POST") {
|
||||
if ("parentId" in this.dataForm) {
|
||||
console.log("[DialogJustForm parentId]", this.dataForm.parentId);
|
||||
// console.log("[DialogJustForm parentId]", this.dataForm.parentId);
|
||||
// 对特殊的键做特殊处理,如 parentId 是一个 cascader,获取的值是 ["xxx"],后端只需要xxx
|
||||
const lastItem = this.dataForm.parentId.length - 1;
|
||||
this.dataForm.parentId = this.dataForm.parentId[lastItem];
|
||||
@@ -369,7 +369,7 @@ export default {
|
||||
data: httpPayload,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
console.log("[add&update] res is: ", res);
|
||||
// console.log("[add&update] res is: ", res);
|
||||
this.loadingStatus = false;
|
||||
if (res.code === 0) {
|
||||
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
|
||||
@@ -394,7 +394,7 @@ export default {
|
||||
},
|
||||
|
||||
handleBtnClick(payload) {
|
||||
console.log("btn click payload: ", payload);
|
||||
// console.log("btn click payload: ", payload);
|
||||
|
||||
if ("name" in payload) {
|
||||
switch (payload.name) {
|
||||
@@ -415,7 +415,7 @@ export default {
|
||||
},
|
||||
|
||||
handleUploadChange(file, fileList) {
|
||||
console.log("[Upload] handleUploadChange...", file, fileList);
|
||||
// console.log("[Upload] handleUploadChange...", file, fileList);
|
||||
},
|
||||
|
||||
handleClose() {
|
||||
|
||||
@@ -335,7 +335,7 @@ export default {
|
||||
this.renderDialog = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
console.log("init dialog", row_id, detail_mode);
|
||||
// console.log("init dialog", row_id, detail_mode);
|
||||
this.$refs["order-dialog"].init(/** some args... */ row_id, detail_mode);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user