When vue starts the service or when npm install encounters an error such as code EPERM errno -4048, and the number of characters exceeds the box, you can set multi-line omission or single-line omission!!!

Question 1: If this problem is not solved, try the first method first, then use methods 2 and 3 to solve it!

package.json.49681428e code EPERM
17
errno -4048 syscall rename
Error: EPERM:operation not permitted,rename'c:\Users\xxxx\Desktop\HPortal_Client\node_modules\post{ [Error: EPERM: operation not permitted, rename 'c:\Users\xxxx\Desktop\HPortal Client\node_modulest
cause:
{ Error: EPERM: operation not permitted, rename'C:\Users\xxxx\Desktop\HPortal Client\node modules errno:-4048, code:'EPERM',
syscall:'rename', path:
C:\\Users1lxxxxxxx\\Desktop\HPortal Clientnode modulespostcss-url\package.json.496814280 dest:
c:\\Users1lxxxx\\Desktop!HPortal client\node_modules\\postcss-url\\package.json’l.' o stack:
"Error:EPERM:operation not permitted,rename\’c:\Users!lxxxx\\Desktop1\HPortal_client\node mo0 ⓧ00e 8 nOC

method one:

①、删除node-modules包文件;

②、npm cache clean --force 清除缓存;

③、用npm install或cnpm install或yarn install命令去下载依赖;

Method Two:

①、npm install -g npm @latest 更新npm版本;

②、npm install -g vue-cli 更新vue-cli;

Method three:

①、进入项目目录,把node_modules文件夹删除,package-lock.json文件也删除

②、以管理员身份运行CMD也就是小黑板

③、cd到项目目录,先清除npm缓存:npm cache clean --force

④、cnpm install 淘宝镜像下载node-modules包

Finish:

Question 2: Too much text exceeds the box element or there is such a requirement during development that requires a single-line text to display an ellipsis or a multi-line text to display an ellipsis. Let me tell you the answer below!

1. Single-line text displays ellipsis!

1. Implement mandatory text display in one line;

//不换行
white-space:nowrap;

2. The place beyond is hidden;

//溢出隐藏
overflow:hidden;

3. Use ellipsis to display the excess text;

//文本转换
text-overflow:ellipsis;

Two, multi-line text display ellipsis!

Premise: Compatibility is relatively strong, webkit or M-side development can be used!

1. Overflow hidden;

//溢出隐藏css
overflow:hidden;

2. Ellipsis instead;

//替换超出文本
text-overflow:ellipsis;

3. Set the flexible box expansion model;

//弹性盒伸缩
display:-webkit-box;

4. Limit the number of lines of text displayed by the element;

//文本行数
-webkit-line-clamp:2;

5. Set the arrangement mode of checking the sub-elements of the telescopic object;

//排列方式
-webkit-box-orient:vertical;

6. Realize that both Chinese and English can be changed;

//所有语言都可识别
word-break:break-all;

Results:

Guess you like

Origin blog.csdn.net/qq_66180056/article/details/127763945