登录、注册页样式修改
This commit is contained in:
15
fixUser.js
15
fixUser.js
@@ -1,7 +1,7 @@
|
||||
const fs = require('fs');
|
||||
const path = 'D:/骅锋/mall/pages/mall/admin/userCenter/index.uvue';
|
||||
const fs = require("fs");
|
||||
const path = "D:/骅锋/mall/pages/mall/admin/userCenter/index.uvue";
|
||||
|
||||
let text = fs.readFileSync(path, 'utf-8');
|
||||
let text = fs.readFileSync(path, "utf-8");
|
||||
|
||||
const targetScript = `<script setup lang="uts">
|
||||
import { reactive, computed, onMounted } from 'vue'
|
||||
@@ -135,9 +135,12 @@ const onSubmit = async () => {
|
||||
}
|
||||
</script>`;
|
||||
|
||||
text = text.replace(/<script setup lang=["']uts["']>[\s\S]*?<\/script>/, targetScript);
|
||||
text = text.replace(
|
||||
/<script setup lang=["']uts["']>[\s\S]*?<\/script>/,
|
||||
targetScript,
|
||||
);
|
||||
text = text.replace(/value="demo"/, ':value="userAccount"');
|
||||
text = text.replace(/src="\/static\/logo\.png"/, ':src="avatarUrl"');
|
||||
|
||||
fs.writeFileSync(path, text, 'utf-8');
|
||||
console.log('Done');
|
||||
fs.writeFileSync(path, text, "utf-8");
|
||||
console.log("Done");
|
||||
|
||||
Reference in New Issue
Block a user