<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[胡伟明]]></title> 
<description><![CDATA[记录生活的点点滴滴]]></description>
<link>https://note.huweiming.cn/</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>
<item>
	<title>图片居中</title>
	<link>https://note.huweiming.cn/ruanjianshiyong/133.html</link>
	<description><![CDATA[<p>
	zblog博客添加的图片在编辑器里显示居中，但实际还是不居中，需要切换到html模式添加
</p>
<p>
<pre class="prettyprint lang-js linenums">style="float:middle"</pre>
	<p>
		&nbsp;
	</p>
	<p>
		添加
	</p>
	<p>
<pre class="prettyprint lang-js linenums">align="middle"</pre>
		<p>
			&nbsp;
		</p>
		<p>
			无效
		</p>
		<p>
			两种方式都无效，懒得折腾了。
		</p>]]></description>
	<pubDate>Sun, 15 Dec 2019 08:46:59 +0000</pubDate>
	<author>胡伟明</author>
	<guid>https://note.huweiming.cn/ruanjianshiyong/133.html</guid>

</item>
<item>
	<title>Excel计算快速填充</title>
	<link>https://note.huweiming.cn/ruanjianshiyong/130.html</link>
	<description><![CDATA[<p class="MsoNormal">
	问题描述：<?xml:namespace prefix = "o" /><o:p></o:p> 
</p>
<p class="MsoNormal">
	Excel<span style="font-family:宋体;">中单元格的值是通过前一个单元格通过公式计算的，后面的可以通过拖动来自动计算，但是一旦数据多的话，比如说有几万个数据需要拖动来生成，那这个拖动就很不方便了。这时候就需要采用别的方法，这里就介绍这样一个方法。</span><o:p></o:p> 
</p>
<p class="MsoNormal">
	解决方法：<o:p></o:p> 
</p>
<p class="MsoNormal" style="text-align:center;">
	<a id="ematt:406" href="https://note.huweiming.cn/content/uploadfile/201910/d85b1570511770.png" target="_blank"><img title="点击查看原图" border="0" alt="示例.png" src="https://note.huweiming.cn/content/uploadfile/201910/thum-d85b1570511770.png" width="420" height="121" /></a>&nbsp;
</p>
<p class="MsoNormal">
	A3<span style="font-family:宋体;">的值等于</span><span style="font-family:Calibri;">A2+1</span><span style="font-family:宋体;">，后面的值都为前一个值</span><span style="font-family:Calibri;">+1</span><span style="font-family:宋体;">，也就是</span><span style="font-family:Calibri;">A4=A3+1</span><span style="font-family:宋体;">，</span><span style="font-family:Calibri;">A5=A4+1</span><span style="font-family:宋体;">等等。</span><o:p></o:p> 
</p>
<p class="MsoNormal">
	首先选中全部列，在图示位置输入后回车。<o:p></o:p> 
</p>
<p class="MsoNormal" style="text-align:center;">
	<a id="ematt:408" href="https://note.huweiming.cn/content/uploadfile/201910/4c9a1570511796.png" target="_blank"><img title="点击查看原图" border="0" alt="选中全部列.png" src="https://note.huweiming.cn/content/uploadfile/201910/thum-4c9a1570511796.png" width="420" height="132" /></a>&nbsp;
</p>
<p class="MsoNormal">
	<span style="font-family:宋体;">然后点击值之后</span>Ctrl+Enter<span style="font-family:宋体;">就可以把</span><span style="font-family:Calibri;">A3~A50002</span><span style="font-family:宋体;">的值填充好。效果跟拉动填充序列是一样的。</span><o:p></o:p> 
</p>
<p class="MsoNormal" style="text-align:center;">
	<span style="font-family:宋体;"><a id="ematt:410" href="https://note.huweiming.cn/content/uploadfile/201910/f93a1570511892.png" target="_blank"><img title="点击查看原图" border="0" alt="最终效果.png" src="https://note.huweiming.cn/content/uploadfile/201910/thum-f93a1570511892.png" width="408" height="460" /></a><br />
</span>
</p>
<p class="MsoNormal">
	其他也可采用这种方法来操作。<o:p></o:p> 
</p>
<p class="MsoNormal" style="text-align:center;">
	&nbsp;<a id="ematt:412" href="https://note.huweiming.cn/content/uploadfile/201910/20c11570511940.png" target="_blank"><img title="点击查看原图" border="0" alt="相加填充.png" src="https://note.huweiming.cn/content/uploadfile/201910/thum-20c11570511940.png" width="420" height="445" /></a> 
</p>
<p class="MsoNormal">
	最后效果<o:p></o:p> 
</p>
<p class="MsoNormal" style="text-align:center;">
	<a id="ematt:414" href="https://note.huweiming.cn/content/uploadfile/201910/5d511570511962.png" target="_blank"><img title="点击查看原图" border="0" alt="相加填充效果.png" src="https://note.huweiming.cn/content/uploadfile/201910/thum-5d511570511962.png" width="278" height="460" /></a> 
</p>
<p class="MsoNormal">
	这个用来计算生成一些表格还是很有的，当然这么大有规律的数据量，有时候还是用编程的方式来实现比较好。<o:p></o:p> 
</p>]]></description>
	<pubDate>Tue, 08 Oct 2019 05:15:08 +0000</pubDate>
	<author>胡伟明</author>
	<guid>https://note.huweiming.cn/ruanjianshiyong/130.html</guid>

</item>
<item>
	<title>微信小程序</title>
	<link>https://note.huweiming.cn/ruanjianshiyong/129.html</link>
	<description><![CDATA[<p>
	最近在设计一个微信小程序，记录一下自己犯过的错误：
</p>
<p>
	1：获取的数字如果想加一个另外一个数的话，需要*1后再加
</p>
<p>
	比如<span style="white-space:normal;">this.data.num1的值为60，如果写成下面的形式的话得出的值为60273</span> 
</p>
<p>
	<span style="white-space:normal;"><span style="white-space:normal;">this.data.num1+273</span><span style="white-space:normal;"></span></span> 
</p>
<p>
	<span style="white-space:normal;">而正确的写法是：<br />
</span>
</p>
<p>
	this.data.num1*1+273
</p>
<p>
	2：下拉框
</p>
<p>
	wxml代码
</p>
<pre class="sh_html">&lt;view class='top'&gt;
    &lt;view class='top-text'&gt; 选择接收班级&lt;/view&gt;
    &lt;!-- 下拉框 --&gt;
    &lt;view class='top-selected' bindtap='bindShowMsg'&gt;
      &lt;text&gt;{{grade_name}}&lt;/text&gt;
      &lt;image src='/images/icon/down.png'&gt;&lt;/image&gt;
    &lt;/view&gt;
    &lt;!-- 下拉需要显示的列表 --&gt;
    &lt;view class="select_box" wx:if="{{select}}"&gt;
      &lt;view wx:for="{{grades}}" wx:key="unique"&gt;
        &lt;view class="select_one" bindtap="mySelect" 
    data-name="{{item}}"&gt;{{item}}
           &lt;/view&gt; 
        &lt;/view&gt; 
    &lt;/view&gt; 
&lt;/view&gt;</pre>
<p>
	&nbsp;
</p>
<p>
	wxss代码
</p>
<pre class="prettyprint lang-js linenums">/* 顶部 */
.top{
  width: 100vw;
  height: 80rpx;
  padding: 0 20rpx;
  line-height: 80rpx;
  font-size: 34rpx;
  border-bottom: 1px solid #000;
}
.top-text{
  float: left
}
/* 下拉框 */
.top-selected{
    width: 50%;
    display: flex;
    float: right;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ccc;
    padding: 0 10rpx;
    font-size: 30rpx;
}
/* 下拉内容 */
.select_box {
    background-color: #fff;
    padding: 0 20rpx;
    width: 50%;
    float: right;
    position: relative;
    right: 0;
    z-index: 1;
    overflow: hidden;
    text-align: left;
    animation: myfirst 0.5s;
    font-size: 30rpx;
}
.select_one {
    padding-left: 20rpx;
    width: 100%;
    height: 60rpx;
    position: relative;
    line-height: 60rpx;
    border-bottom: 1px solid #ccc;
}
/* 下拉过度效果 */
@keyframes myfirst {
    from {
        height: 0rpx;
    }
 
    to {
        height: 210rpx;
    }
}
/* 下拉图标 */
.top-selected image{
  height:50rpx;
  width:50rpx;
  position: absolute;
  right: 0rpx;
  top: 20rpx;
}</pre>
<p>
	&nbsp;
</p>
<p>
	js代码
</p>
<pre class="prettyprint lang-js linenums">/**
   * 页面的初始数据
   */
  data: {
    select:false,
    grade_name:'--请选择--',
    grades: [
        '猛犸机器人1班',
        '猛犸机器人2班',
        '口才1班',
      ]
  },/**
 *  点击下拉框
 */
  bindShowMsg() {
    this.setData({
      select: !this.data.select
    })
  },
/**
 * 已选下拉框
 */
  mySelect(e) {
    console.log(e)
    var name = e.currentTarget.dataset.name
    this.setData({
      grade_name: name,
      select: false
    })
  },</pre>
<p>
	&nbsp;
</p>
<p>
	效果如下图：
</p>
<p style="text-align:center;">
	<a id="ematt:416" href="https://note.huweiming.cn/content/uploadfile/201910/9cb81570538457.png" target="_blank"><img title="点击查看原图" border="0" alt="效果.png" src="https://note.huweiming.cn/content/uploadfile/201910/thum-9cb81570538457.png" width="253" height="460" /></a> 
</p>
<p style="text-align:left;">
	3.函数对应关系
</p>
<p style="text-align:left;">
	LN在小程序里面是Math.log在VB里面是log
</p>
<p style="text-align:left;">
	4.函数调用
</p>
<p style="text-align:left;">
	this+函数名
</p>
<p style="text-align:left;">
	6.定义固定长度的数组
</p>
<p style="text-align:left;">
	var r = new Array(5);长度为5
</p>
<p style="text-align:left;">
	7.将变量转为字符串
</p>
<p style="text-align:left;">
	<span style="white-space:pre;">.toString()</span> 
</p>
<p>
	比如：
</p>
<p>
	<span style="white-space:pre;">this.data.grade_name1.toString()</span> 
</p>
就是将grade_name1转换为字符串。
<p>
	8.生成json文件不能用text改后缀来生成，最好是用网上的工具来生成，要不然中文会乱码。
</p>
<p>
	9.表格源码
</p>
<p>
	table.wxml<br />
&lt;view class="table"&gt;<br />
&nbsp; &lt;view class="tr bg-w"&gt;<br />
&nbsp; &nbsp; &lt;view class="th"&gt;head1&lt;/view&gt;<br />
&nbsp; &nbsp; &lt;view class="th"&gt;head2&lt;/view&gt;<br />
&nbsp; &nbsp; &lt;view class="th "&gt;head3&lt;/view&gt;<br />
&nbsp; &lt;/view&gt;<br />
&nbsp; &lt;block wx:for="{{listData}}" wx:key="{{code}}"&gt;<br />
&nbsp; &nbsp; &lt;view class="tr bg-g" wx:if="{{index % 2 == 0}}"&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;view class="td"&gt;{{item.code}}&lt;/view&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;view class="td"&gt;{{item.text}}&lt;/view&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;view class="td"&gt;{{item.type}}&lt;/view&gt;<br />
&nbsp; &nbsp; &lt;/view&gt;<br />
&nbsp; &nbsp; &lt;view class="tr" wx:else&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;view class="td"&gt;{{item.code}}&lt;/view&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;view class="td"&gt;{{item.text}}&lt;/view&gt;<br />
&nbsp; &nbsp; &nbsp; &lt;view class="td"&gt;{{item.type}}&lt;/view&gt;<br />
&nbsp; &nbsp; &lt;/view&gt;<br />
&nbsp; &lt;/block&gt;<br />
&lt;/view&gt;<br />
<br />
table.wxss<br />
<br />
.table {<br />
&nbsp; border: 0px solid darkgray;<br />
}<br />
.tr {<br />
&nbsp; display: flex;<br />
&nbsp; width: 100%;<br />
&nbsp; justify-content: center;<br />
&nbsp; height: 3rem;<br />
&nbsp; align-items: center;<br />
}<br />
.td {<br />
&nbsp; &nbsp; width:40%;<br />
&nbsp; &nbsp; justify-content: center;<br />
&nbsp; &nbsp; text-align: center;<br />
}<br />
.bg-w{<br />
&nbsp; background: snow;<br />
}<br />
.bg-g{<br />
&nbsp; background: #E6F3F9;<br />
}<br />
.th {<br />
&nbsp; width: 40%;<br />
&nbsp; justify-content: center;<br />
&nbsp; background: #3366FF;<br />
&nbsp; color: #fff;<br />
&nbsp; display: flex;<br />
&nbsp; height: 3rem;<br />
&nbsp; align-items: center;<br />
}<br />
<br />
table.js<br />
<br />
Page({<br />
&nbsp; data: {<br />
&nbsp; &nbsp; listData:[<br />
&nbsp; &nbsp; &nbsp; {"code":"01","text":"text1","type":"type1"},<br />
&nbsp; &nbsp; &nbsp; {"code":"02","text":"text2","type":"type2"},<br />
&nbsp; &nbsp; &nbsp; {"code":"03","text":"text3","type":"type3"},<br />
&nbsp; &nbsp; &nbsp; {"code":"04","text":"text4","type":"type4"},<br />
&nbsp; &nbsp; &nbsp; {"code":"05","text":"text5","type":"type5"},<br />
&nbsp; &nbsp; &nbsp; {"code":"06","text":"text6","type":"type6"},<br />
&nbsp; &nbsp; &nbsp; {"code":"07","text":"text7","type":"type7"}<br />
&nbsp; &nbsp; ]<br />
&nbsp; },<br />
&nbsp; onLoad: function () {<br />
&nbsp; &nbsp; console.log('onLoad')&nbsp;<br />
&nbsp; }<br />
<br />
})<br />
<br />
效果图如下&nbsp;<br />
	<div style="text-align:center;">
		<a id="ematt:418" href="https://note.huweiming.cn/content/uploadfile/201910/892a1570958978.png" target="_blank"><img title="点击查看原图" border="0" alt="表格图片.png" src="https://note.huweiming.cn/content/uploadfile/201910/892a1570958978.png" width="378" height="393" /></a> 
	</div>
	<p>
		<br />
	</p>
	<p style="text-align:left;">
		&nbsp;
	</p>]]></description>
	<pubDate>Sun, 06 Oct 2019 06:22:17 +0000</pubDate>
	<author>胡伟明</author>
	<guid>https://note.huweiming.cn/ruanjianshiyong/129.html</guid>

</item>
<item>
	<title>word使用技巧汇总</title>
	<link>https://note.huweiming.cn/ruanjianshiyong/77.html</link>
	<description><![CDATA[<p>
	1.excel粘贴到word超出边界，问题如下图：
</p>
<a id="ematt:273" href="https://note.huweiming.cn/content/uploadfile/201610/785d1477895073.png" target="_blank"></a> 
<p align="center">
	<a id="ematt:273" href="https://note.huweiming.cn/content/uploadfile/201610/785d1477895073.png" target="_blank"><img title="点击查看原图" border="0" alt="QQ截图20161031142409.png" src="https://note.huweiming.cn/content/uploadfile/201610/thum-785d1477895073.png" width="381" height="460" /></a> 
</p>
<p>
	</a><a id="ematt:273" href="http://www.huweiming.com/content/uploadfile/201610/785d1477895073.png" target="_blank"></a>&nbsp;
</p>
<p>
	解决办法如下，单击表格任何位置，选择“布局-自动调整-根据内容自动调整表格”，版本为word2016.
</p>
<p align="center">
	<a id="ematt:275" href="https://note.huweiming.cn/content/uploadfile/201610/08921477895228.png" target="_blank"><img title="点击查看原图" border="0" alt="点点滴滴.png" src="https://note.huweiming.cn/content/uploadfile/201610/08921477895228.png" width="406" height="235" /></a> 
</p>
<p>
	<a id="ematt:275" href="https://note.huweiming.cn/content/uploadfile/201610/08921477895228.png" target="_blank"></a><a id="ematt:275" href="http://www.huweiming.com/content/uploadfile/201610/08921477895228.png" target="_blank"></a>&nbsp;没找到这个方法之前，怎么拉动，调整都没用，这个只要点一下就可以了。
</p>]]></description>
	<pubDate>Mon, 31 Oct 2016 06:21:14 +0000</pubDate>
	<author>胡伟明</author>
	<guid>https://note.huweiming.cn/ruanjianshiyong/77.html</guid>

</item></channel>
</rss>